Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Monitor and troubleshoot deployments

A worked example

Multiple answers

A scheduled PowerShell script runs non-interactively. It deploys main.bicep to the existing resource group rg-sql by using the command in the exhibit. The Bicep file declares the string parameters administratorLogin and administratorLoginPassword, and neither has a default value. The password parameter has the @secure() decorator. The deployment fails because no values are supplied for these parameters.

New-AzResourceGroupDeployment -Name SqlDeploy -ResourceGroupName rg-sql -TemplateFile ./main.bicep

Which two changes to the command will each allow the deployment to succeed? Each correct answer presents a complete solution. Select two.

Choose 2 answers.
Why

Bicep files and ARM templates are parameterized. When a parameter has no default, the deployment needs a value for it. You can supply the values inline as arguments to New-AzResourceGroupDeployment, or through a file passed with -TemplateParameterFile. Compiling to JSON, creating the resource group, or renaming the deployment leaves the parameters without values.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free