An Azure service that is used to automate, configure, and install updates across hybrid environments.
Hello Varma,
Thank you for reaching out to the Microsoft Q&A forum.
When investigated it looks like it’s doing exactly what you’ve told it—every time you hand it a brand-new name, an Incremental deployment will happily create a new storage account rather than touching your old one. If you want to “replace” (delete the old and stand up the new in its place) just by tweaking the command, switch your deployment mode from Incremental to Complete:
New-AzResourceGroupDeployment `
-Name testdeployment `
-TemplateFile 'I:\Bicep\BicepUdemy\main.bicep' `
-ResourceGroupName RG `
-Mode Complete
What happens with -Mode Complete is:
• Any resource in the resource group that isn’t in your Bicep template (including your old storage account name) gets removed
• Then it creates the resources you define (your “new” storage account)
If your goal is simply to update an existing storage account in-place, you can stick with Incremental but pass the same storageAccount name on each run—ARM/Bicep will then patch any properties you changed rather than spinning up a new account.
Hope that clears it up!
Reference list
Getting started with Bicep: https://learn.microsoft.com/azure/azure-resource-manager/bicep/install
Troubleshoot Bicep file deployments: https://learn.microsoft.com/azure/azure-resource-manager/troubleshooting/quickstart-troubleshoot-bicep-deployment
Storage account resource reference (Bicep): https://learn.microsoft.com/azure/templates/microsoft.storage/storageAccounts?tabs=bicep