• Using terraform_remote_state for getting data from another terraform state

    2 min read

    terraform data remote state terraform_remote_state

    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



From pet to cattle
Treat your kubernetes clusters like cattle, not pets