Skip to main content

Command Palette

Search for a command to run...

How to allow terraform to delete resource groups that are not empty

Updated
•1 min read•View as Markdown
How to allow terraform to delete resource groups that are not empty

Sometimes terraform dependency tree is a lifesaver, but sometimes we know better, and we want to delete that RG no matter what.

Add this to the provider block and be happy.

provider "azurerm" {
  features {
    resource_group {
       prevent_deletion_if_contains_resources = false
    }
  }
}