AZ-104 Question 116
Single answerYou are reviewing a Bicep file that deploys an Azure Web App. The file defines a parameter for the app’s SKU named 'skuName' with a default value of 'B1'. In the resource block for the web app, the 'sku: { name: skuName }' property is used. Which statement accurately describes how the SKU is being defined?
- A
The SKU is being inherited from the resource group’s default location setting.
- B
The SKU is referencing a parameter with a default value set to 'B1'.
- C
The SKU is overridden by a variable that uses the resource group’s name as input.
- D
The SKU must be explicitly defined in a separate variables block before being used.
Show answer and explanation
Correct answer: B
Explanation
In the Bicep file, 'skuName' is declared as a parameter with a default of 'B1'. When the resource block assigns 'sku: { name: skuName }', it uses that parameter’s default value unless overridden by a parameter value at deployment.
- A. Incorrect.
Incorrect. The SKU is not controlled by the resource group's location property or any inherited default.
- B. Correct.
Correct. The Bicep file defines 'skuName' as a parameter with a default value of 'B1', which is used by the resource definition.
- C. Incorrect.
Incorrect. There is no indication that the SKU is being overridden by a variable referencing the resource group’s name.
- D. Incorrect.
Incorrect. You do not need to place the SKU in a separate variables block, as the parameter already provides the value.