Interview Prep/Terraform/Providers, Resources and Data Sources

What is `terraform_remote_state` and what are its drawbacks?

IntermediateConceptProviders, Resources and Data Sources
Answer

It reads root outputs from another configuration's state, so a stack can consume a VPC ID from the network stack. Drawbacks: it needs read access to the entire state (which may contain secrets), it couples consumers to the producer's backend layout, and a renamed output breaks them. We often publish values to SSM Parameter Store or use data sources by tag instead.

All Terraform questions Roadmap: Terraform

More on Providers, Resources and Data Sources