isComplete ? '1a' '2a'
This syntax is incorrect because the conditional operator (? :) requires a : between the two return values. The correct syntax would be isComplete ? '1a' : '2a', but even then, iif is the preferred method in Bicep.
Correct answer : A. iif(isComplete, '1a', '2a')
This is correct because iif is the equivalent function in Bicep for the ARM if expression. It evaluates the condition (isComplete) and returns the corresponding value based on whether the condition is true or false.
It should be answer D, but the ':' is currently missing there.
All the other answers are wrong. There is no if function in bicep that has an else block.
See: https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions
The only way to use 'if' is together with a resource to conditionally deploy it. But you cannot use it to assign a string to a variable or so.
This section is not available anymore. Please use the main Exam Page.AZ-400 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Yameo
Highly Voted 6 months, 4 weeks agoChristian_garcia_martin
Most Recent 3 months agoDankho
3 months, 4 weeks agoswk2az400
5 months, 3 weeks agoGooldmember
5 months, 3 weeks agomaqsoodshah
6 months, 1 week agoGooldmember
5 months, 3 weeks agoschwagalla
6 months, 2 weeks agoMattt
6 months, 2 weeks ago8fc2e85
7 months ago8fc2e85
6 months, 2 weeks ago