On Google Cloud, the resource hierarchy—organisation, folders, and projects—decides how IAM permissions and organisation policies are inherited. A thoughtful hierarchy combined with a small set of organisation policy constraints gives every new project secure defaults without any per-project work. This guide covers the folder structure, the constraints worth enforcing early, and how to manage both as code.
Google Cloud resource hierarchy
- OrganisationDomain-wide constraints and admin roles
- Bootstrap & commonSeed/CI projects, logging, shared networking
- Environment foldersProduction, non-production, development
- Business-unit foldersOptional, for delegated administration
- ProjectsOne workload and environment each
Design the hierarchy around environments
Google's security foundations guidance puts environments near the top of the hierarchy, because most policy differences are between production and everything else. A common pattern is a bootstrap folder for the seed and CI/CD projects that create everything else, a common folder for shared logging, monitoring, and networking, and environment folders for production, non-production, and development. Business-unit folders, if needed, sit beneath the environments so environment-level policy still applies uniformly.
resource "google_folder" "bootstrap" {
display_name = "fldr-bootstrap"
parent = "organizations/${var.org_id}"
}
resource "google_folder" "common" {
display_name = "fldr-common"
parent = "organizations/${var.org_id}"
}
resource "google_folder" "production" {
display_name = "fldr-production"
parent = "organizations/${var.org_id}"
}
resource "google_folder" "nonproduction" {
display_name = "fldr-nonproduction"
parent = "organizations/${var.org_id}"
}
resource "google_folder" "development" {
display_name = "fldr-development"
parent = "organizations/${var.org_id}"
}Organisation policy constraints worth enforcing early
Organisation policies are guardrails on what can be configured, enforced by Google Cloud itself regardless of IAM permissions. Start with constraints that close common gaps:
| Constraint | What it does | Why it matters |
|---|---|---|
| iam.disableServiceAccountKeyCreation | Blocks creation of downloadable service account keys | Leaked keys are a leading cause of GCP compromises; use workload identity instead |
| iam.allowedPolicyMemberDomains | Restricts IAM grants to your organisation's identities | Prevents sharing resources with personal or external accounts |
| compute.vmExternalIpAccess | Controls which VMs may have external IPs | Keeps workloads private by default |
| gcp.resourceLocations | Restricts where resources can be created | Data residency and compliance |
| storage.uniformBucketLevelAccess | Requires uniform bucket-level access | Removes confusing per-object ACLs |
| compute.requireOsLogin | Requires OS Login for SSH | Ties VM access to IAM identities and audit logs |
resource "google_org_policy_policy" "disable_sa_keys" {
name = "organizations/${var.org_id}/policies/iam.disableServiceAccountKeyCreation"
parent = "organizations/${var.org_id}"
spec {
rules {
enforce = "TRUE"
}
}
}
resource "google_org_policy_policy" "resource_locations" {
name = "organizations/${var.org_id}/policies/gcp.resourceLocations"
parent = "organizations/${var.org_id}"
spec {
rules {
values {
allowed_values = ["in:us-locations"]
}
}
}
}
# Relax a constraint for one folder only, with a reviewed exception
resource "google_org_policy_policy" "dev_external_ip" {
name = "${google_folder.development.name}/policies/compute.vmExternalIpAccess"
parent = google_folder.development.name
spec {
inherit_from_parent = false
rules {
allow_all = "TRUE"
}
}
}IAM at the right level
Grant roles to Google groups, not individual users, and assign them at the folder level where they apply to many projects. Keep powerful roles such as Organisation Administrator and Folder Admin to a tiny group with strong authentication. Applications use service accounts with predefined or custom roles scoped to their project, and workloads on GKE or Cloud Run use workload identity rather than keys.
How does your cloud measure up?
Score your setup across foundation, delivery, reliability, security, and cost in 3 minutes—instant results, no email needed.
Centralise logs and billing visibility
Create an aggregated log sink at the organisation level that routes audit logs from every project to a central logging project—either a log bucket with locked retention or BigQuery for analysis. Export billing data to BigQuery and label projects by owner, environment, and cost centre so spend can be allocated without manual work.
Project factory
New projects should come from a pipeline that places them in the right folder, attaches them to a Shared VPC host if needed, enables only the required APIs, applies labels and budgets, and grants access to the owning group. The open-source Cloud Foundation Fabric and the Terraform example foundation from Google are useful references for this pattern.
Shared VPC and network design
Most organisations centralise networking in host projects inside the common folder—often one Shared VPC host per environment—while workload projects attach as service projects. The networking team owns subnets, firewall policies, Cloud NAT, and interconnects; application teams deploy into subnets they have been granted. Combine this with hierarchical firewall policies at the organisation or folder level to enforce baseline rules, such as allowing Google's health-check ranges and denying broad ingress, that individual projects cannot override.
Test constraints before enforcing them
Organisation policies support a dry-run specification that reports violations without blocking. Use it to measure impact, review the violation logs, and fix or exempt resources before enforcing. Policy Intelligence tools, including Policy Analyzer, help answer who has access to what across the hierarchy before and after IAM changes.
# Effective policy on a project after inheritance and exceptions
gcloud org-policies describe compute.vmExternalIpAccess \
--project=payments-prod --effective
# Which constraints are set on a folder
gcloud org-policies list --folder=123456789012Migrating existing projects
If projects already exist without folders, start by creating the folder structure and applying constraints only to new folders. Then move projects one at a time, checking for broken dependencies—external service account grants that domain-restricted sharing will block, VMs that rely on external IPs, or downloaded service account keys still in use by on-premises jobs. Replace keys with workload identity federation before enforcing the key-creation constraint on the folder that receives the project.
Protect sensitive data with VPC Service Controls
IAM decides who can call an API; VPC Service Controls decide from where. A service perimeter around projects that hold regulated or sensitive data—BigQuery datasets, Cloud Storage buckets, Secret Manager—blocks data exfiltration even if credentials leak, because requests from outside the perimeter are denied. Start perimeters in dry-run mode, review the violation logs, and add ingress and egress rules for legitimate flows such as CI pipelines and partner integrations before enforcing.
Decide who owns each layer
A foundation stays healthy when ownership is explicit. The platform team owns the organisation node, folder structure, organisation policies, logging, and Shared VPC hosts. Security owns perimeters, detection, and the review of policy exceptions. Application teams own their projects inside the guardrails. Write this down, because the most common failure is a well-built foundation that slowly accumulates one-off changes nobody feels responsible for.
Keep the bootstrap project locked down
The bootstrap or seed project holds the service accounts and state that create everything else, so it is the most sensitive project you own. Limit access to a handful of platform engineers, store Terraform state in a bucket with versioning and retention, require approvals for pipeline runs that change organisation-level resources, and alert on any IAM change in that project. If an attacker controls the bootstrap pipeline, they control the whole organisation.
Checklist
- Folder hierarchy with bootstrap, common, and environment folders.
- Starter organisation policy constraints enforced, tested first in dry run.
- Exceptions scoped to specific folders and reviewed regularly.
- Group-based IAM assigned at folder level; minimal organisation-level admins.
- No service account keys—workload identity for GKE, Cloud Run, and CI.
- Organisation-wide audit log sink to a central project with locked retention.
- Billing export to BigQuery with project labels.
- Automated project factory with budgets and Shared VPC attachment.
Foundations that scale are mostly invisible: teams create projects and they are simply secure. That is the outcome our Cloud Landing Zone module delivers on Google Cloud.
Key takeaways
- Design folders for environments and clear ownership before projects multiply.
- Apply org policies for location, public IP, and risky services where they matter most.
- Centralize audit logs and prefer Workload Identity over long-lived keys.
FAQ
Folders vs projects—what should constrain what?
Folders inherit org policies and IAM; projects host resources. Put guardrails at the folder/org layer and keep project IAM least-privilege for day-to-day delivery.
When do VPC Service Controls help?
When you need stronger data exfiltration boundaries for sensitive projects. They add complexity—use them where risk justifies the operational cost.