PowerShell

For local development and testing of ARM templates on a local machine, Powershell has a quick command to apply an ARM template to a resource group:

New-AzResourceGroupDeployment -ResourceGroupName myResourceGroup -TemplateFile "c:my	emplate.json" ` -TemplateParameterFile "c:myparameters.json"

The preceding command will pick up the specified template and parameter file and apply it to the specified resource group. This command assumes that the current session has already been logged in to Azure.

There are a few variations on the command available:

  • A parameter called -Mode with a Complete or Incremental value is available. This can be used to specify deploymentmode.
  • If no parameter file is specified and the template requires parameters, the cmdlet will prompt for these values on the command line.
  • As an alternative, the -TemplateUri and -TemplateParametersUri options can be used to specify the location of the template and parameters to be retrieved from another location.

The next tool that we'll look into is the Azure CLI.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.236.62