Designing and Implementing Microsoft DevOps Solutions — Question 66
You have an Azure Resource Manager (ARM) template that contains the following expression.
[if(parameters('isComplete'), '1a', '2a')]
You need to migrate the template to Bicep.
Which expression should you run?
Answer options
- A. iif(isComplete, '1a', '2a')
- B. if(isComplete, '1a', '2a')
- C. if('isComplete') '1a' else '2a'
- D. isComplete ? '1a' '2a'
Correct answer: D
Explanation
The correct answer is D, as it uses the ternary operator, which is valid in Bicep for conditional expressions. Option A is incorrect because 'iif' is not a valid Bicep function. Option B uses 'if' in a way that is not supported in Bicep, and option C incorrectly formats the conditional expression.