IssueRaiser

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 1. `terraform init` 2. `terraform 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](https://github.com/terraform-providers/terraform-provider-aws/issues/507)

Posted by beanaroo on Oct 18, 2017, 7:31 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments

github (Software)

prevent_destroy should allow plan to succeed

beanarooOct 18, 2017, 7:31 PM

### 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 1. `terraform init` 2. `terraform 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](https://github.com/terraform-providers/terraform-provider-aws/issues/507)

Comments (0)

No comments yet. Start the discussion.

Comment on this issue