{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/3874","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/3874/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/3874/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/3874/events","html_url":"https://github.com/hashicorp/terraform/issues/3874","id":116500041,"number":3874,"title":"prevent_destroy should let you succeed","user":{"login":"ketzacoatl","id":10122937,"avatar_url":"https://avatars.githubusercontent.com/u/10122937?v=3","gravatar_id":"","url":"https://api.github.com/users/ketzacoatl","html_url":"https://github.com/ketzacoatl","followers_url":"https://api.github.com/users/ketzacoatl/followers","following_url":"https://api.github.com/users/ketzacoatl/following{/other_user}","gists_url":"https://api.github.com/users/ketzacoatl/gists{/gist_id}","starred_url":"https://api.github.com/users/ketzacoatl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ketzacoatl/subscriptions","organizations_url":"https://api.github.com/users/ketzacoatl/orgs","repos_url":"https://api.github.com/users/ketzacoatl/repos","events_url":"https://api.github.com/users/ketzacoatl/events{/privacy}","received_events_url":"https://api.github.com/users/ketzacoatl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/core","name":"core","color":"cccccc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-12T08:11:47Z","updated_at":"2015-11-19T04:12:36Z","closed_at":null,"body":"Call me crazy, but I'm willing to call the current implementation of `prevent_destroy` a bug. Here is why: The current implementation of this flag prevents you from using it for 1/2 the use case.\r\n\r\nThe net result is more frustration when trying to get Terraform to succeed instead of destroying your resources.. `prevent_destroy` adds to the frustration more than alleviating it.\r\n\r\n`prevent_destroy` is for these two primary use cases, right?\r\n1) you don't want this resource to be deleted, and you want to see errors when TF tries to do that\r\n2) you don't want this resource to be deleted, and you don't want to hear a peep out of TF - TF should skip over its usual prerogative to rm -rf on change.\r\n\r\nI see no reason why TF _must_ return an error when using `prevent_destroy` for the second use case, and in doing so, TF is completely ignoring my utterly clear directive to let me get work done. As a user, I end up feeling as though TF is wasting my time because I am focused on simple end goals which I am unable to attain while I spin my wheels begging TF to create more resources without destroying what exists.\r\n\r\nYou might say the user should update their plan to not be in conflict, and I would agree that is what you want to do in most cases.. but, honestly, that is not always the right solution for the situation at hand when using a tool like TF for the real-world. I believe in empowering users, and the current implementation of this flag prevents sensible use of the tool. "},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/157945975","html_url":"https://github.com/hashicorp/terraform/issues/3874#issuecomment-157945975","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/3874","id":157945975,"user":{"login":"erichmond","id":10191,"avatar_url":"https://avatars.githubusercontent.com/u/10191?v=3","gravatar_id":"","url":"https://api.github.com/users/erichmond","html_url":"https://github.com/erichmond","followers_url":"https://api.github.com/users/erichmond/followers","following_url":"https://api.github.com/users/erichmond/following{/other_user}","gists_url":"https://api.github.com/users/erichmond/gists{/gist_id}","starred_url":"https://api.github.com/users/erichmond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erichmond/subscriptions","organizations_url":"https://api.github.com/users/erichmond/orgs","repos_url":"https://api.github.com/users/erichmond/repos","events_url":"https://api.github.com/users/erichmond/events{/privacy}","received_events_url":"https://api.github.com/users/erichmond/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T04:12:36Z","updated_at":"2015-11-19T04:12:36Z","body":"+1, I need something along these lines as well.\r\n\r\nWould #3366 allow you to skip destroying a service, but modify it instead?  My specific use case is that I have a staging RDS instance I want to persist (never be destroyed), but I want the rest of my staging infrastructure to disappear.  As a side effect of the staging environment disappearing, I need to modify the security groups on the RDS instance, since it is being deleted.  \r\n\r\nSo, if I had two AWS instances, one rds security group, and one rds instance. Upon running \"terraform destroy -force\"\r\n\r\ntwo AWS instances would shut down\r\none RDS security group would disappear\r\nthe one RDS instance would change to remove the RDS security group associated with it, but the instance itself would persist (but essentially be unreachable).\r\n\r\n\r\n"}}