2 min read
On terraform, besides returning some information to the user, returning data as output can be used as an input for terraform code that needs to use a resource created by another team.
On the terraform code that creates the resource, we will have to set the variable and it's value:
output endpoint {
vpc_id = aws_vpc.databases.id
}
Then, on the code that uses this resource we will have to declare the tfstate as a data source using terraform_remote_state
11/03/2021
Read more...