Training: Instruction to develop new skills.
Hi TJ Tshabalala,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
This error usually happens when an error occurs in some step bicep file execution.
First check the error details to confirm the cause of the failure. You can do this in two ways:
- Add the
--debugflag to see full diagnostic output:
az deployment group create ... --debug
- Or run a dry run with
what-ifto preview what Azure will deploy and highlight errors before actually deploying:
az deployment group what-if \
--resource-group <ResourceGroupName> \
--template-file <TemplateFileName>.bicep \
--parameters <ParameterFileName>.json
Below are some common causes for error.
- Make sure the resource group exists and that the name is correct
- Inspect the template file. For example, the
adminPasswordparameter is sometimes set tonull. Azure does not acceptnullfor this value - replace it with a strong password string. - Update the names of VMs, NICs, and NSGs in the template and parameter files to unique values to avoid conflicts.
- Ensure the parameters file includes entries for all parameters in the template. Optional parameters can be set to
nullin the parameters file (but not in the template).