Knowledge check

Completed

You're deploying a template that a colleague has written. They give you a Bicep template named main.bicep with these parameter definitions:

@maxLength(5)
param projectName string = 'dog'

@secure()
param apiKey string

They also give you the following parameter file named main.parameters.production.json:

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "projectName": {
      "value": "cat"
    },
    "apiKey": {
      "reference": {
        "keyVault": {
          "id": "/subscriptions/f0750bbe-ea75-4ae5-b24d-a92ca601da2c/resourceGroups/PlatformResources/providers/Microsoft.KeyVault/vaults/toysecrets"
        },
        "secretName": "KeyToAccessPartnerApi"
      }
    }
  }
}

You deploy the template by using this Azure CLI command:

az deployment group create \
  --template-file main.bicep \
  --parameters main.parameters.production.json \
               projectName=bird

You deploy the template by using this Azure PowerShell command:

New-AzResourceGroupDeployment `
  -TemplateFile main.bicep `
  -TemplateParameterFile main.parameters.production.json `
  -projectName bird
1.

What will the value of the projectName parameter be when this template is deployed?

2.

Which of these values for the projectName parameter would result in a deployment error?

3.

You want to view the value of the apiKey parameter after the deployment has completed. Which of these statements is true?