skip to main |
skip to sidebar
RSS Feeds
Technical interview questions for software engineers — languages, databases, cloud, DevOps, and CS fundamentals.
Technical interview questions for software engineers — languages, databases, cloud, DevOps, and CS fundamentals.
Technical interview questions for software engineers — languages, databases, web, cloud, DevOps, and fundamentals. Browse all topics.
Posted by Raj
Interviewers ask, "What is the difference between IAM and Organization Policy?" because they want to know: Do you separate access control (IAM) from configuration guardrails (Org Policy)? This post gives you a ready 30-second answer, the concept in plain English, common mistakes and tips for different roles. It is question 6 of the top 10 GCP resource hierarchy and IAM interview questions.
Short answer (30 seconds): IAM answers who can do what. Organization Policy answers what is allowed at all, no matter who asks. For example, IAM can say Anna may create a VM. Org Policy can say no VM may have an external IP. So even an Owner cannot break that rule. I use IAM for access and Org Policy for guardrails, and I set both as high in the hierarchy as it makes sense.
Do you separate access control (IAM) from configuration guardrails (Org Policy)?
Easy picture: IAM decides who holds the key. Org Policy is the building rule, such as 'no open flames', and it applies even to the owner.
gcloud org-policies list --organization=ORG_ID
gcloud org-policies describe constraints/iam.disableServiceAccountKeyCreation --organization=ORG_ID
Replace ORG_ID, FOLDER_ID and PROJECT_ID with your own values. Check gcloud help for current flags before you use a command.
| Role | What to emphasise |
|---|---|
| Architect | Define the guardrail baseline as part of the landing zone. |
| Data Engineer | Know location constraints for data residency. |
| DevOps Engineer | Troubleshoot 'constraint violated' failures in pipelines. |
| Platform Engineer | Manage constraints and exceptions as a controlled process. |
Use the one-liner: 'IAM is who, Org Policy is what.' Then add a concrete example.
Disclaimer: This blog is independent and not affiliated with or endorsed by Google. Google Cloud features, limits and commands change, so always check the current documentation. Official references: Resource hierarchy, IAM policy types, IAM quotas and limits.