Project files for building, validating and preforming what-if deployment.
See my full blog post here!
Let's gather our tools:
- Az CLI 🧙
- Az Bicep extension
az bicep install
Step 1: Login to Azure
az login
This will prompt a new window in your browser and allow you to log in to your account.
Step 2: Set the subscription
az account set --subscription {SUBSCRIPTION_ID}
Step 3: Build Bicep template
az bicep build --file main.bicep
Step 4: Validate the deployment
az deployment group validate
--resource-group {RESOURCE_GROUP}
--name ValidateDeployment
--template-file main.bicep
--parameters main.bicepparam
Step 5: Perform a What-if deployment
az deployment group what-if
--resource-group {RESOURCE_GROUP}
--name WhatIfDeployment
--template-file main.bicep
--parameters main.bicepparam