Hidden Terraform 'forces replacement' line can silently destroy production databases
A detailed technical analysis on DEV Community highlights how a routine Terraform plan to upgrade a PostgreSQL database from version 14.9 to 15.4 can silently trigger a full database destruction and recreation. The danger arises when an unrelated change — in this case, enabling storage encryption — is queued alongside the version bump, masking a flag error that would otherwise have halted the deployment with a clear warning. Because Aurora RDS has no in-place path from unencrypted to encrypted storage, Terraform's only option is to destroy the existing cluster and create a fresh, empty one. The plan's summary line, showing '3 to destroy,' provides no context about which resources are affected or whether the run deviates from historical norms. The author reconstructed the scenario on live AWS infrastructure, confirming the behavior, and warns that CI passing and a green plan do not guarantee a safe deployment.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in