terraform-controller icon indicating copy to clipboard operation
terraform-controller copied to clipboard

Support `prevent_destroy` feature for cloud resources

Open zzxwill opened this issue 2 years ago • 1 comments

A few users kept asking whether we can support preventing cloud resources from being deleted. We asked them to use the delete protection feature if the cloud provides the option like https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/ess_scaling_group#group_deletion_protection.

Now Terraform officially provides prevent_destroy in lifecycle with a resource since v1.3 https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion. We might also need to support it.

zzxwill avatar Nov 07 '22 01:11 zzxwill

Good idea! Let's hold the issue and see how many people need it.

chivalryq avatar Nov 07 '22 12:11 chivalryq