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.
More on Providers, Resources and Data Sources
What is a resource block and how is it addressed?BeginnerWhat is the difference between a resource and a data source?BeginnerHow do you configure a provider such as AWS?BeginnerHow do you use the same provider with multiple regions or accounts?IntermediateIn what order does the AWS provider look for credentials?IntermediateWhat does `default_tags` in the AWS provider do and what are its pitfalls?Intermediate