Interview Prep/Azure/CI/CD and IaC

You need to apply Azure Policy definitions themselves as code. How?

IntermediateScenarioCI/CD and IaC
Answer

Situation read → Policy-as-code repo, deployed by pipeline, tested in a sandbox management group.

What I'd do →

  1. Store definitions, initiatives and assignments in git (Bicep, Terraform azurerm_policy_definition, or the EPAC tool)
  2. Pipeline deploys to a test management group first, runs compliance checks
  3. Promote to production management groups with approval
  4. New deny policies start in Audit (or with enforcementMode: DoNotEnforce)

Why → Policies can break every team at once; they deserve the same review and staging as code.

Interview tip → enforcementMode: DoNotEnforce lets you see impact without blocking.

Azure All Azure questions Roadmap: AKS & Azure DevOps

More on CI/CD and IaC