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
This one-page GCP IAM interview revision sheet gives you the key idea of each of the top 10 resource hierarchy and IAM questions in a few words. Read it the day before your interview, then open the full post for any line you cannot explain.
Skim the table once to see the whole map. Pick any row where the key idea feels fuzzy and read the linked article for a 30-second spoken answer. On interview day, use the checklist below after you can explain every row without reading. If you have five minutes left, rehearse questions 1 (hierarchy), 4 (allow/deny/PAB), and 10 (permission denied)—those three show up most often in senior GCP conversations.
Return to the GCP interview questions hub for glossary, gcloud cheat sheet, and common mistakes.
| # | Topic | Key idea |
|---|---|---|
| 1 | Resource Hierarchy | Org → Folder → Project → Resource |
| 2 | IAM Inheritance | Allow is additive; use deny to block |
| 3 | Role Types | Predefined roles first; custom roles rarely |
| 4 | Allow, Deny, PAB | Three gates: eligible, not denied, granted |
| 5 | Folder Design | Folders follow policy, not the org chart |
| 6 | IAM vs Org Policy | IAM = who. Org Policy = what |
| 7 | Least Privilege at Scale | Groups, code, review, expiry |
| 8 | Conditions & Tags | Conditions + tags = 'only if' |
| 9 | Org Admin & Break-glass | Few admins, split duties, test break-glass |
| 10 | Permission Denied | Troubleshooter first, then other layers |
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.
For example: use gcloud projects get-iam-policy PROJECT_ID to inspect bindings on a project.
Posted by Raj
Interviewers do not only listen for correct answers. They listen for mistakes you avoid. Here are 10 common GCP IAM and resource hierarchy mistakes from the top 10 questions, with a tip for how to say it like a senior engineer.
Keep going with the revision sheet or read the glossary.
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.
For example: use gcloud projects get-iam-policy PROJECT_ID to inspect bindings on a project.
Posted by Raj
If you are preparing for a Google Cloud interview, the resource hierarchy and IAM are almost always the first topics. This guide lists the top 10 GCP resource hierarchy and IAM interview questions that I would expect at senior level for Architect, Data Engineer, DevOps and Platform Engineer roles. Each question links to a full post with a 30-second answer, the concept in plain English, common mistakes and tips by role.
In one sentence: Google Cloud is a tree (Organization, Folders, Projects, Resources). Access rules and company rules are set at one level and flow down. Most IAM interview questions test whether you understand that flow.
Engineers with some cloud experience who want clear, short answers in simple English. If some words are new, start with the GCP IAM glossary for beginners.
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.
For example: use gcloud projects get-iam-policy PROJECT_ID to inspect bindings on a project.
Posted by Raj
These gcloud commands support the top 10 GCP IAM and resource hierarchy interview questions. You do not need to memorise them, but showing one real command in an interview makes your answer more believable.
Important: replace ORG_ID, FOLDER_ID, PROJECT_ID and email addresses with your own values. Flags and features change, so check
gcloud helpand the current documentation before running anything in a real environment.
gcloud organizations list
gcloud resource-manager folders list --organization=ORG_ID
gcloud projects list --filter='parent.id=FOLDER_ID'
Read the full answer: GCP Resource Hierarchy Explained: Interview Q&A
gcloud projects get-iam-policy PROJECT_ID
gcloud resource-manager folders get-iam-policy FOLDER_ID
# See all policies that apply to a resource
gcloud asset analyze-iam-policy --organization=ORG_ID --full-resource-name=//cloudresourcemanager.googleapis.com/projects/PROJECT_ID
Read the full answer: GCP IAM Policy Inheritance: Can a Child Remove a Role?
gcloud iam roles describe roles/bigquery.dataViewer
gcloud iam roles create customDeployer --organization=ORG_ID --file=role.yaml
gcloud recommender recommendations list --recommender=google.iam.policy.Recommender --project=PROJECT_ID --location=global
Read the full answer: GCP IAM Roles: Basic vs Predefined vs Custom
gcloud iam policies list --attachment-point=cloudresourcemanager.googleapis.com/projects/PROJECT_ID --kind=denypolicies --format=yaml
# Use Policy Troubleshooter in the console to see allow + deny + PAB for a principal and permission
Read the full answer: GCP IAM Deny Policy vs Principal Access Boundary
# Terraform sketch
resource "google_folder" "prod" {
display_name = "Production"
parent = "organizations/${var.org_id}"
}
Read the full answer: GCP Folder Structure Best Practices for 200 Projects
gcloud org-policies list --organization=ORG_ID
gcloud org-policies describe constraints/iam.disableServiceAccountKeyCreation --organization=ORG_ID
Read the full answer: IAM vs Organization Policy in GCP: Interview Answer
gcloud asset analyze-iam-policy --organization=ORG_ID --identity='group:data-team@example.com'
gcloud projects add-iam-policy-binding PROJECT_ID --member='group:data-team@example.com' --role='roles/bigquery.dataViewer'
Read the full answer: GCP Least Privilege at Scale: Interview Answer
# Condition expression examples
request.time < timestamp('2026-12-31T00:00:00Z')
resource.matchTag('ORG_ID/env', 'dev')
Read the full answer: GCP IAM Conditions and Tags Explained
gcloud organizations get-iam-policy ORG_ID
# Alert idea: log filter on SetIamPolicy at organization level
Read the full answer: GCP Organization Admin and Break-Glass Account
gcloud policy-troubleshoot iam //cloudresourcemanager.googleapis.com/projects/PROJECT_ID --principal-email=user@example.com --permission=storage.objects.get
gcloud logging read 'protoPayload.status.code=7' --project=PROJECT_ID --limit=20
Read the full answer: GCP Permission Denied Error: How to Troubleshoot
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.
Posted by Raj
GCP and IAM have many new words. This glossary explains the terms used in the top 10 GCP resource hierarchy and IAM interview questions in simple words, with how to say them out loud.
Remember: IAM decides who can do what. Organization Policy decides what is allowed to exist. Both flow down the hierarchy.
| Word | Plain meaning | How to say it |
|---|---|---|
| GCP / Google Cloud | Google's service where companies rent computers, storage and databases | "G, C, P" |
| Cloud | Computers you rent over the internet instead of owning them | cloud |
| IAM | Identity and Access Management: the system that decides who can do what | "eye-am" |
| Organization | The top of the tree: your whole company | |
| Folder | A group box that holds projects | |
| Project | A workspace for one app or team; holds services, billing link, limits and access rules | |
| Resource | A real thing you use: a virtual machine, a storage bucket, a database table | |
| Principal | A person, group or program asking for access | |
| Role | A bundle of permissions, like a job badge | |
| Permission | One small action, such as "read a file" | |
| Policy | A written rule | |
| Allow policy / Deny policy | A rule that grants access / a rule that blocks access | |
| PAB (Principal Access Boundary) | A rule that limits which resources a group of principals can ever use | "P, A, B" |
| Organization Policy | Company rules about what is allowed to exist (for example, no public IP addresses) | |
| Least privilege | Give only the access that is needed, and nothing more | |
| Terraform | A tool where you write your cloud setup as code files | "terra-form" |
| Quota | A usage limit for a project | "kwoh-ta" |
| Break-glass account | An emergency admin account, locked away and used only if normal admins cannot get in | |
| VPC Service Controls | A security fence around Google services | "V, P, C service controls" |
| Audit logs | The written record of every request in the cloud |
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.
For example: use gcloud projects get-iam-policy PROJECT_ID to inspect bindings on a project.
Posted by Raj
Interviewers ask, "A user says 'permission denied'. How do you troubleshoot it?" because they want to know: Do you have an ordered troubleshooting method, and do you avoid 'just grant Owner'? This post gives you a ready 30-second answer, the concept in plain English, common mistakes and tips for different roles. It is question 10 of the top 10 GCP resource hierarchy and IAM interview questions.
Short answer (30 seconds): First I get the exact principal, the exact permission and the exact resource from the error. Then I use Policy Troubleshooter. It checks allow, deny and principal access boundary policies and tells me which one blocks the request. If IAM looks correct, I check Organization Policy constraints, VPC Service Controls, and conditions or expired grants. Finally I read the audit logs for the real denied call. I fix it at the right level and never by granting Owner.
Do you have an ordered troubleshooting method, and do you avoid 'just grant Owner'?
Easy picture: Like a doctor: collect symptoms (error), run the right test (Policy Troubleshooter), check other body systems (Org Policy, VPC-SC, API), then treat the cause - not just the symptom.
gcloud policy-troubleshoot iam //cloudresourcemanager.googleapis.com/projects/PROJECT_ID --principal-email=user@example.com --permission=storage.objects.get
gcloud logging read 'protoPayload.status.code=7' --project=PROJECT_ID --limit=20
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 | Design the access model so failures are easy to explain. |
| Data Engineer | Know the BigQuery job vs data permission split. |
| DevOps Engineer | Pipeline failures: check service account, impersonation, API enablement. |
| Platform Engineer | Provide a self-service troubleshooting guide for product teams. |
Tell it as a step-by-step story. Interviewers love a calm, ordered debugging path.
Prefer to watch? See the full video with all 10 questions: GCP Resource Hierarchy & IAM: Top 10 Senior Interview Questions. There is also a 1-minute Short for this question: watch the Short.
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.
Posted by Raj
Interviewers ask, "Who should have Organization Administrator access? How do you protect the top of the hierarchy?" because they want to know: Do you think about security governance, separation of duties and incident readiness? This post gives you a ready 30-second answer, the concept in plain English, common mistakes and tips for different roles. It is question 9 of the top 10 GCP resource hierarchy and IAM interview questions.
Short answer (30 seconds): Very few people, and never daily-use accounts. I use a small group with strong multi-factor authentication and separate duties, so the person who manages the hierarchy is not the same as the one who manages security policy or billing. I keep a break-glass account that is stored safely, tested, and triggers alerts when used. Every change at the organization level is logged and reviewed.
Do you think about security governance, separation of duties and incident readiness?
Easy picture: A bank vault needs two keys held by different people. The emergency key sits in a sealed envelope, and you test it once a year to be sure it still works.
gcloud organizations get-iam-policy ORG_ID
# Alert idea: log filter on SetIamPolicy at organization level
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 | Design the admin model and separation of duties. |
| Data Engineer | Know who approves access to sensitive datasets. |
| DevOps Engineer | Set up alerting on org-level IAM changes. |
| Platform Engineer | Run the break-glass process and rehearse it. |
Mention testing the break-glass process. It shows you have seen real incidents.
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.
Posted by Raj
Interviewers ask, "How do IAM Conditions and Tags help control access?" because they want to know: Can you scope access precisely without creating a mess of bindings? This post gives you a ready 30-second answer, the concept in plain English, common mistakes and tips for different roles. It is question 8 of the top 10 GCP resource hierarchy and IAM interview questions.
Short answer (30 seconds): An IAM Condition adds an 'only if' to a role binding. For example, only until Friday, or only on resources with the tag environment equals development. Tags are key-value pairs attached to resources and they are inherited down the hierarchy. Together they let me say: this group gets this role only on development resources. It reduces the number of separate bindings and keeps policy readable.
Can you scope access precisely without creating a mess of bindings?
Easy picture: A condition is a sticky note saying 'only if'. Tags are coloured stickers on rooms. Together: 'this team may enter rooms with a green sticker, until Friday'.
# Condition expression examples
request.time < timestamp('2026-12-31T00:00:00Z')
resource.matchTag('ORG_ID/env', 'dev')
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 | Use tags to express environment and data sensitivity across projects. |
| Data Engineer | Tag datasets by sensitivity and restrict access by condition. |
| DevOps Engineer | Apply tags in Terraform at project creation. |
| Platform Engineer | Make tagging mandatory in the project factory. |
Always add 'labels vs tags' - it is a classic follow-up trap.
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.
Posted by Raj
Interviewers ask, "How do you manage least privilege at scale across hundreds of users and projects?" because they want to know: Do you have operational maturity: groups, code, reviews, expiry? This post gives you a ready 30-second answer, the concept in plain English, common mistakes and tips for different roles. It is question 7 of the top 10 GCP resource hierarchy and IAM interview questions.
Short answer (30 seconds): I never grant roles to individual users. I use groups that match job functions, and I grant predefined roles to those groups at the lowest sensible level. Everything is defined in Terraform, so changes get reviewed. Then I check regularly with IAM Recommender, which shows unused permissions, and Policy Analyzer, which shows who can access what. For sensitive access I use time-limited or just-in-time grants.
Do you have operational maturity: groups, code, reviews, expiry?
Easy picture: A gym gives access by membership plan (groups) with an end date, not by handing personal keys to each member. Reports show who never used the pool, so you can reduce the plan.
gcloud asset analyze-iam-policy --organization=ORG_ID --identity='group:data-team@example.com'
gcloud projects add-iam-policy-binding PROJECT_ID --member='group:data-team@example.com' --role='roles/bigquery.dataViewer'
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 personas and role bundles, then review them quarterly. |
| Data Engineer | Separate pipeline service accounts from human analyst access. |
| DevOps Engineer | Terraform-managed bindings plus peer review. |
| Platform Engineer | Offer access-request workflows with expiry as a product. |
Say 'groups, code, review, expiry' - four words that cover the whole answer.
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.
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.
Posted by Raj
Interviewers ask, "How would you design the folder structure for a company with 200 projects?" because they want to know: Can you design for governance and growth instead of just drawing boxes? This post gives you a ready 30-second answer, the concept in plain English, common mistakes and tips for different roles. It is question 5 of the top 10 GCP resource hierarchy and IAM interview questions.
Short answer (30 seconds): I design folders around where policy differs, not around the org chart. A common start is top-level folders for Production, Non-Production, Shared Services like networking and security, and Sandbox. Under those I group by business unit or application. I keep it to three or four levels so inheritance stays easy to explain. Every folder should answer: what rule or access is different here?
Can you design for governance and growth instead of just drawing boxes?
Easy picture: Arrange a library by how the rules differ (open shelves, loan desk, restricted room), not by who donated the books. Donors change; rules do not.
# Terraform sketch
resource "google_folder" "prod" {
display_name = "Production"
parent = "organizations/${var.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 | Align folders with the landing zone blueprint. |
| Data Engineer | Ask for raw/curated/sandbox separation by environment. |
| DevOps Engineer | Implement folders and bindings as Terraform with review. |
| Platform Engineer | Own the project factory that places projects in folders automatically. |
Open with 'where does policy differ?' and the interviewer will relax - you are thinking in rules, not boxes.
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.
Posted by Raj
Interviewers ask, "What are allow policies, deny policies and Principal Access Boundary policies? How do they work together?" because they want to know: Do you know modern IAM features beyond the basics - deny policies and PAB? This post gives you a ready 30-second answer, the concept in plain English, common mistakes and tips for different roles. It is question 4 of the top 10 GCP resource hierarchy and IAM interview questions.
Short answer (30 seconds): Allow policies grant access. Deny policies block specific permissions for specific principals, and a deny wins over an allow. Principal Access Boundary, or PAB, is different: it sets the outer limit of which resources a group of principals is even eligible to access. IAM checks all of them. So a user can only get access if they are inside their boundary, not denied, and also granted a role.
Do you know modern IAM features beyond the basics - deny policies and PAB?
Easy picture: At an airport: the boarding pass is the allow policy, the no-fly list is the deny policy, and the terminal boundary is the PAB - it decides which areas you may enter at all.
gcloud iam policies list --attachment-point=cloudresourcemanager.googleapis.com/projects/PROJECT_ID --kind=denypolicies --format=yaml
# Use Policy Troubleshooter in the console to see allow + deny + PAB for a principal and permission
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 | Use PAB and deny as hard guardrails on top of a clean allow model. |
| Data Engineer | Deny delete on critical datasets except for a pipeline owner group. |
| DevOps Engineer | Manage deny/PAB as code and test them before rollout. |
| Platform Engineer | Ship guardrails as default so product teams cannot weaken them. |
This is the freshest topic in IAM. Showing you know PAB signals you keep up with the platform.
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.
Posted by Raj
Interviewers ask, "Basic vs predefined vs custom roles - which do you use and when?" because they want to know: Do you apply least privilege, and do you know the maintenance cost of custom roles? This post gives you a ready 30-second answer, the concept in plain English, common mistakes and tips for different roles. It is question 3 of the top 10 GCP resource hierarchy and IAM interview questions.
Short answer (30 seconds): Basic roles like Owner, Editor and Viewer are very broad, so I avoid them in production. Predefined roles are my default because Google maintains them and updates permissions as services change. I create custom roles only when a predefined role gives too much and I need an exact set of permissions. Custom roles add maintenance work, so I keep them few and manage them in code.
Do you apply least privilege, and do you know the maintenance cost of custom roles?
Easy picture: Roles are job badges. A basic role is a master badge (opens too much). A predefined role is a standard staff badge. A custom role is a special badge you design - and you must keep updating it.
gcloud iam roles describe roles/bigquery.dataViewer
gcloud iam roles create customDeployer --organization=ORG_ID --file=role.yaml
gcloud recommender recommendations list --recommender=google.iam.policy.Recommender --project=PROJECT_ID --location=global
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 a small catalog of approved roles per persona. |
| Data Engineer | Know the BigQuery roles well: dataViewer, dataEditor, jobUser, user. |
| DevOps Engineer | Pipelines get narrow deploy roles, never Editor. |
| Platform Engineer | Publish role bundles (via groups) as part of the platform contract. |
Name one real predefined role and one real reason you would build a custom one.
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.
Posted by Raj
Interviewers ask, "How does IAM policy inheritance work? Can a child remove a parent's grant?" because they want to know: Do you understand that allow policies are additive, and that you cannot 'override' a parent? This post gives you a ready 30-second answer, the concept in plain English, common mistakes and tips for different roles. It is question 2 of the top 10 GCP resource hierarchy and IAM interview questions.
Short answer (30 seconds): Allow policies are additive. The effective access on a resource is the combination of its own policy and every parent's policy. So if a user gets Viewer at folder level, I cannot take that away at the project level by simply not granting it there. If I need to block access, I use an IAM deny policy, or I fix the grant at the level where it was given. That is why I grant at the lowest level that still makes sense.
Do you understand that allow policies are additive, and that you cannot 'override' a parent?
Easy picture: A master key given at floor level opens every room on that floor. The room manager cannot take that key back. You must change it at the floor, or add an extra lock (a deny policy).
gcloud projects get-iam-policy PROJECT_ID
gcloud resource-manager folders get-iam-policy FOLDER_ID
# See all policies that apply to a resource
gcloud asset analyze-iam-policy --organization=ORG_ID --full-resource-name=//cloudresourcemanager.googleapis.com/projects/PROJECT_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 | Decide at which level each persona gets access; document it as the access model. |
| Data Engineer | Grant dataset-level roles instead of project-wide BigQuery Admin. |
| DevOps Engineer | Manage bindings in Terraform at the right level; avoid per-project copies. |
| Platform Engineer | Bake group-based bindings into the project factory template. |
Mention deny policies. Many candidates only know 'additive' and stop there.
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.
Posted by Raj
Interviewers ask, "Explain the GCP resource hierarchy. Why does it matter?" because they want to know: Do you understand the foundation, and do you know why it matters for security, cost and blast radius? This post gives you a ready 30-second answer, the concept in plain English, common mistakes and tips for different roles. It is question 1 of the top 10 GCP resource hierarchy and IAM interview questions.
Short answer (30 seconds): GCP has four levels: Organization at the top, then Folders, then Projects, then the actual resources like VMs and buckets. The Organization is tied to our Cloud Identity or Workspace domain. The hierarchy matters because IAM policies and Org Policies flow down from parent to child. So I set rules once at a high level and every project below gets them. It also decides who pays, who can do what, and how big the blast radius is when something goes wrong.
Do you understand the foundation, and do you know why it matters for security, cost and blast radius?
Easy picture: Think of a building. The company is the Organization, each floor is a Folder, each room is a Project, and the furniture is the Resources. A rule on the front door applies to every floor and room.
gcloud organizations list
gcloud resource-manager folders list --organization=ORG_ID
gcloud projects list --filter='parent.id=FOLDER_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 | Design folder layout by environment and risk, not by org chart. |
| Data Engineer | Separate raw, curated and sandbox projects so access and cost are clear. |
| DevOps Engineer | Automate project creation so every new project lands in the right folder. |
| Platform Engineer | Offer 'project factory' as a self-service product with guardrails built in. |
Say 'inheritance, billing and blast radius' - three words that show you think beyond the diagram.
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.