Make the tagging policy actually stop untagged resources
A hands-on AZ-900 lab. You produce the real artefact and 6 automated checks verify it behaves the way the exam expects.
Try this labAll AZ-900 practice
- Certification
- AZ-900
- Format
- Structured configuration
- Difficulty
- easy
- Estimated time
- 10 min
- Automated checks
- 6
The brief
Repair policy-definition.json so a resource cannot be created without a CostCenter tag. Keep the definition as one policy rule with an if block and a then block. Two things are wrong and they are independent. The condition asks whether the resource has any tags at all, so a resource tagged only with Owner already passes - address the CostCenter tag by name instead, either as tags['CostCenter'] or with a containsKey check on the tags field. And the effect only records what it finds, which is why untagged resources keep appearing - choose an effect that prevents the request. Leave resources that already carry the tag alone.
Part of AZ-900 preparation
Labs are written by ExamNova to teach the decisions the exam tests. They are not reproductions of vendor lab content.