az deployment group create: Deploy ARM/Bicep
az deployment group create deploys an ARM or Bicep template into a resource group.
Infrastructure as code lands through deployment group create. Run --what-if first in CI to preview changes before applying them.
What it does
az deployment group create submits an ARM JSON or Bicep template to a resource group, passing parameters inline or from a file. It returns the deployment outputs, which downstream steps consume. --what-if previews the change set without applying it.
Common usage
# preview first
az deployment group what-if \
-g rg-app --template-file main.bicep \
--parameters @prod.parameters.json
# then apply and read an output
az deployment group create \
-g rg-app --template-file main.bicep \
--parameters env=prod \
--query properties.outputs.appUrl.value -o tsvSubcommands and flags
| Flag | What it does |
|---|---|
| --template-file | Path to a Bicep or ARM JSON template |
| --parameters | Inline key=value or @file.json parameters |
| --what-if | Preview the change set without deploying |
| --mode | Incremental (default) or Complete |
| --query properties.outputs | Read deployment outputs |
In CI
Gate merges with what-if so reviewers see the change set. Read outputs with --query properties.outputs.<name>.value -o tsv to pass resource ids forward. Avoid --mode Complete in shared groups: it deletes resources not in the template.
Common errors in CI
"InvalidTemplateDeployment" with a nested "PreflightValidationCheckFailed" points at a resource that fails validation; read the inner details. "DeploymentFailed" wraps the real provider error, often a quota or naming conflict. "AuthorizationFailed" means the identity lacks write on the target resources. A Bicep parse error means the bicep CLI is missing or outdated.