You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lifecycle meta-parameter looks like it could be used to prevent some accidental destructive changes. I can set
prevent_destroy = "true"
and it does indeed cause an error if I run terraform destroy.
However, if I remove the configuration of this resource and then run terraform apply, Terraform would happily proceed to remove the resource.
Is this the intended behaviour? Should there be a way to prevent destruction of resources similar to CloudFormation stack policies? Terraform could store this setting in the state file , so that even if a resource is deleted from the configuration, Terraform would still know that it's destruction used to be explicitly denied.
Thanks.
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Apr 2, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
Lifecycle meta-parameter looks like it could be used to prevent some accidental destructive changes. I can set
and it does indeed cause an error if I run
terraform destroy
.However, if I remove the configuration of this resource and then run
terraform apply
, Terraform would happily proceed to remove the resource.Is this the intended behaviour? Should there be a way to prevent destruction of resources similar to CloudFormation stack policies? Terraform could store this setting in the state file , so that even if a resource is deleted from the configuration, Terraform would still know that it's destruction used to be explicitly denied.
Thanks.
The text was updated successfully, but these errors were encountered: