Plans for the `network` stack are clean, but the `app` stack reading it via `terraform_remote_state` fails with `This object does not have an attribute named "private_subnet_ids"`.
IntermediateTroubleshootingLost, Corrupted and Drifted State
Answer
Likely causes → The output was added to the network code but not applied yet, so it's not in its state; or the app reads the wrong key/workspace.
Diagnose →
cd network && terraform output
terraform state pull | jq '.outputs | keys'
Fix → Apply the network stack so the output is written to state, or fix the config.key/workspace in the terraform_remote_state block.
Prevent → Apply producer stacks before consumers in the pipeline. Prefer SSM parameters or data sources with tags for cross-stack contracts.
More on Lost, Corrupted and Drifted State
Someone deleted the state object from the S3 bucket. `terraform plan` now wants to create 140 resources that already exist.IntermediateState is gone and the bucket had no versioning. How do you recover a production stack?Advanced`Error: Failed to load state` followed by a JSON error like `invalid character '}' looking for beginning of object key string`.IntermediateThe plan prints `Note: Objects have changed outside of Terraform` and lists a security group with an extra ingress rule.BeginnerEvery plan wants to change `desired_capacity` on an Auto Scaling group back to 2, though autoscaling has raised it to 6.BeginnerA resource was deleted manually in the console. The plan wants to create it, and an apply fails because a dependent resource still references the old ID.Intermediate