Route53 record resource recreated by Terraform every plan/apply despite no config change
Environment
Terraform v1.5 with aws provider 4.x managing Route53 hosted zone records (A/AAAA and ALIAS records). CI runs terraform plan/apply repeatedly; team uses git-driven pipeline.
Symptoms
Each 'terraform plan' shows a 'replace' for several aws_route53_record resources even when no changes were made to .tf files. Apply recreates records briefly, causing short DNS propagation blips.
Observations
Diff shows only ordering of values in provider response or computed attributes toggling between representation forms (e.g., alias target list ordering or trailing dots). Resource IDs appear consistent but Terraform state marks resources to force-recreate. Pinning provider to earlier minor release temporarily stops behavior.
Already attempted
Tried 'terraform refresh' and state rm/ import cycle for one affected record; attempted adding lifecycle ignore_changes for TTL but replacements persisted. Upgrading/downgrading provider changes which records are affected.
Question
Why does Terraform decide to replace static Route53 records when nothing changed, and how can I stop unnecessary replacements without losing state or causing DNS blips?
Verified community troubleshooting
Most likely the provider is returning attributes in a different form/order each read. First pin the aws provider to a stable minor version and run 'terraform init' then 'terraform plan' to see if plan stops showing replaces. If diffs remain and they involve alias/list ordering, canonicalize the values (add trailing dots to FQDNs, sort lists in code) or add a temporary lifecycle.ignore_changes for the computed fields causing churn. To verify, run 'terraform plan' twice; no-change output proves the fix. If you import/remove state, do it in a maintenance window and keep DNS TTLs low for quick rollback.
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags