`terraform plan` shows `aws_route53_record` will be created, but apply fails with `Tried to create resource record set ... but it already exists`.
IntermediateTroubleshootingLost, Corrupted and Drifted State
Answer
Likely causes → The record was created manually or by another stack (or ExternalDNS in Kubernetes). Terraform doesn't know it exists.
Diagnose → aws route53 list-resource-record-sets --hosted-zone-id Z123 --query "ResourceRecordSets[?Name=='api.example.com.']"
Fix → Import it (id = "Z123_api.example.com_A"), or set allow_overwrite = true if Terraform should take ownership.
Prevent → Split DNS ownership clearly (for example, ExternalDNS owns *.apps, Terraform owns everything else).
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