July 2018
Beginner
552 pages
13h 18m
English
Our first template is rather static, and it uses neither variables in the JSON context nor parameters that a user can set during a deployment. The variables and parameters in templates work exactly as they do in PowerShell cmdlets. Variables can be defined at runtime, and can get their values from parameters, whereas parameters are requested before the template is deployed and are then used internally:
# Extend the existing template by parameters and variables$template.parameters = @{ storageAccountType = @{ type = 'string' allowedValues = @( 'Standard_LRS', 'Standard_ZRS' ) metadata = @{ description = 'The type of storage account. Mandatory.' } } location = @{ type = 'string' defaultValue = $location metadata = @{ ...Read now
Unlock full access