Skip to content
Latchkey

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

Terminal
# 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 tsv

Subcommands and flags

FlagWhat it does
--template-filePath to a Bicep or ARM JSON template
--parametersInline key=value or @file.json parameters
--what-ifPreview the change set without deploying
--modeIncremental (default) or Complete
--query properties.outputsRead 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.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →