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

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.