Interview Prep/Azure/Identity, Access and Governance

Your Terraform pipeline needs to create role assignments, but it only has Contributor. What do you change?

IntermediateScenarioIdentity, Access and Governance
Answer

Situation read → Contributor excludes Microsoft.Authorization/roleAssignments/write. Give the minimum extra right.

What I'd do →

  1. Add Role Based Access Control Administrator for the pipeline identity at the RG scope, with a condition restricting assignable roles (AcrPull, Key Vault Secrets User, Network Contributor)
  2. Do not grant Owner or User Access Administrator unrestricted
  3. Re-run the pipeline and check that the azurerm_role_assignment resources succeed
  4. Record the exception in the platform's RBAC register

Why → Pipelines that can grant any role are a privilege escalation path for anyone who can edit the pipeline.

Interview tip → Ask "who can change the pipeline?" — that person effectively holds the pipeline's rights.

Azure All Azure questions Roadmap: Azure core services

More on Identity, Access and Governance