terraform
terraform copied to clipboard
prevent_destroy should allow plan to succeed
Terraform Version
0.10.7
Output
Error running plan: 1 error(s) occurred:
* aws_db_instance.db: 1 error(s) occurred:
* aws_db_instance.ics_db: aws_db_instance.db: the plan would destroy this resource, but it currently has lifecycle.prevent_destroy set to true. To avoid this error and continue with the plan, either disable lifecycle.prevent_destroy or adjust the scope of the plan using the -target flag.
Expected Behavior
I would like to know why it wants to destroy it. This is provided when prevent_destroy is false by means of (forces new resource)
Actual Behavior
Plan is interrupted before any useful information is displayed.
Steps to Reproduce
terraform initterraform plan
Important Factoids
Current workaround is to turn prevent_destroy off (dangerous!!!) and to run plan again to see cause. In this case it is due to this open issue