How to delete bicep template and the resources it has deployed

Viewed 4054

How can I delete or update bicep template and all the resources it has deployed? just like we can delete or update cloudformation and terraform template

az deployment commands don't have update option and while using az deployment delete it does not delete the resources

1 Answers

It has. You need to use Complete mode

az deployment group create -f ./main.bicep -g my-rg --mode Complete

As it is written here

In complete mode, Resource Manager deletes resources that exist in the resource group but aren't specified in the template.

Related