azurerm_resource_group: change provider feature flag prevent_deletion_if_contains_resources
default to true
#13777
Labels
Milestone
Community Note
Description
The default behaviour of the Azure Platform (and Terraform today) when the deleting a Resource Group is to delete all of the items within this Resource Group.
Whilst this feature makes it easy to clean-up any resources - since resources can be provisioned outside of Terraform, it means that these Resources are untracked by Terraform - and so Terraform is unable to show these Resources in the Plan during the deletion of the Resource Group.
Terraform currently has a feature-flag for this behaviour available within the Features block today - which will check during the deletion of the Resource Group for any Resources within this Resource Group, and raise an error (stating these must be removed first) if any Resources are found. In v2.x versions of the Azure Provider this is disabled by default - however for v3.0 we intend to flip this default to be enabled by default.
New or Affected Resource(s)
Potential Terraform Configuration
To retain the existing behaviour the following can be used
References
prevent_deletion_if_contains_resources
#12657The text was updated successfully, but these errors were encountered: