Interview Prep/Azure/CI/CD and IaC

Portal changes keep drifting from Terraform. How do you get control back?

IntermediateScenarioCI/CD and IaC
Answer

Situation read → Detect, decide, prevent.

What I'd do →

  1. Nightly terraform plan -detailed-exitcode job; exit code 2 posts the diff to the team channel
  2. For each drift: codify in Terraform or revert by applying
  3. Reduce human write access in prod; PIM for emergencies
  4. Azure Policy deny/modify for the properties people keep changing (TLS version, public access)

Why → Detection alone doesn't stop drift; removing the write path does.

Interview tip → Mention terraform apply -refresh-only for accepting harmless drift into state.

Azure All Azure questions Roadmap: AKS & Azure DevOps

More on CI/CD and IaC