7.3 Organization Policies, Tags & Resource Governance
Key Takeaways
- The Google Cloud resource hierarchy (Organization -> Folders -> Projects -> Resources) defines the administrative inheritance path for IAM policies and Organization Policy constraints.
- Organization Policies enforce programmatic guardrails on resource configurations (e.g. data residency, trusted golden images, disabling public IPs), restricting what can be done regardless of a principal's IAM permissions.
- Organization Policy list constraints support Merge (inheritFromParent: true), Replace (inheritFromParent: false), and Reset (reset: true) inheritance behaviors across the hierarchy.
- Resource Tags are first-class, centrally managed Organization resources (unlike unmanaged Resource Labels) that enable dynamic, conditional enforcement of IAM policies and Organization Policies.
- Cloud Asset Inventory (CAI) provides real-time asset tracking, Pub/Sub event streaming, 35-day historical time-travel analysis, and effective IAM policy path evaluations for enterprise compliance audits.
Organization Policies, Tags & Resource Governance
Architectural Guardrail: Enterprise governance in Google Cloud separates identity authorization (IAM) from structural resource constraints (Organization Policies). While IAM governs who is authorized to perform an operation, the Organization Policy Service establishes immutable guardrails dictating how cloud resources can be configured. Effective enterprise architects design hierarchical governance frameworks using Organization Policies, centrally managed Resource Tags, and Cloud Asset Inventory to enforce compliance, sovereignty, and data security at scale.
The Google Cloud Resource Hierarchy
The Google Cloud resource hierarchy provides the structural foundation for access control, policy inheritance, and billing aggregation. It consists of four distinct levels:
+-----------------------------------------------------------------------------------------+
| GOOGLE CLOUD RESOURCE HIERARCHY |
| |
| +------------------------------+ |
| | ORGANIZATION ROOT | |
| | (Domain: example.com) | |
| +------------------------------+ |
| | |
| +----------------------+----------------------+ |
| | | |
| v v |
| +------------------------------+ +------------------------------+ |
| | PRODUCTION FOLDER | | DEVELOPMENT FOLDER | |
| +------------------------------+ +------------------------------+ |
| | | |
| +-----------+-----------+ v |
| | | +------------------------------+ |
| v v | PROJECT: sandbox-dev | |
| +-------------+ +-------------+ +------------------------------+ |
| | PROJECT: | | PROJECT: | | |
| | core-pay-pr | | core-data-pr| v |
| +-------------+ +-------------+ +------------------------------+ |
| | | | Resources: Compute VMs, | |
| v v | GCS Buckets, BigQuery Tables | |
| Resources: VMs, Resources: GCS, +------------------------------+ |
| GKE, Cloud SQL BigQuery, Dataproc |
+-----------------------------------------------------------------------------------------+
Hierarchy Structural Primitives
- Organization Root Node: Represents the enterprise customer (e.g.,
example.com), created automatically via Cloud Identity or Google Workspace. Managed by the Organization Administrator (roles/resourcemanager.organizationAdmin). - Folders: Organizational containers nested up to 10 levels deep. Folders represent business units (Finance, Retail), geographic regions (EMEA, APAC), or lifecycle environments (Production, Staging, Development).
- Projects: The fundamental operational and quota boundary in Google Cloud. All cloud resources must belong to exactly one project. Projects serve as the two-way boundary for:
- Billing: Links resources to a Cloud Billing Account.
- API Quotas & Networks: Bounds API rate limits and VPC hosting.
- Resources: The actual service instances instantiated within projects (Compute Engine VMs, Cloud Storage buckets, BigQuery datasets, Cloud SQL databases).
Organization Policy Service: Constraints & Guardrails
The Organization Policy Service configures centralized, declarative guardrails across the entire resource hierarchy. Unlike IAM policies, Organization Policies apply to all users and automated processes—even Project Owners and Organization Admins cannot violate an enforced constraint.
+-----------------------------------------------------------------------------------------+
| ORGANIZATION POLICY CONSTRAINT TYPES |
+-----------------------------------------------------------------------------------------+
| 1. BOOLEAN CONSTRAINTS |
| - Binary toggles that enforce or disallow specific resource behaviors. |
| - Evaluated as enforced: true or enforced: false. |
+-----------------------------------------------------------------------------------------+
| 2. LIST CONSTRAINTS |
| - Allow or Deny lists that restrict specific strings, projects, regions, or prefixes|
| - Evaluated with allowedValues, deniedValues, allowAll: true, or denyAll: true. |
+-----------------------------------------------------------------------------------------+
Critical Enterprise Organization Policy Constraints
| Constraint Name | Type | Architectural Objective & Impact |
|---|---|---|
constraints/compute.requireOsLogin | Boolean | Enforces OS Login across all Compute Engine instances, binding SSH access to IAM identities and disabling manual metadata SSH keys. |
constraints/compute.disableSerialPortAccess | Boolean | Disables interactive serial console access to VMs, preventing out-of-band administrative tampering. |
constraints/iam.disableServiceAccountKeyCreation | Boolean | Preventatively blocks creation of static user-managed private JSON keys across all projects. |
constraints/storage.uniformBucketLevelAccess | Boolean | Enforces Uniform Bucket-Level Access on all Cloud Storage buckets, disabling legacy object ACLs in favor of IAM. |
constraints/gcp.resourceLocations | List | Enforces Data Residency and data sovereignty by restricting resource deployment strictly to approved regions (e.g., in:eu-locations, in:us-locations). |
constraints/compute.trustedImageProjects | List | Mandates that Compute Engine boot disks can only be created from approved golden image projects (e.g., projects/corp-golden-images). |
constraints/compute.restrictSharedVpcHostProjects | List | Restricts which specific projects can be designated as Shared VPC host projects, preventing rogue network creation. |
constraints/compute.vmExternalIpAccess | List | Blocks allocation of external public IP addresses to Compute Engine VM network interfaces. |
Policy Inheritance Rules: Merge, Replace, Inherit & Reset
When Organization Policies are defined at multiple levels in the hierarchy (e.g., at the Organization root and on a child Folder), Google Cloud evaluates the effective policy using deterministic inheritance rules.
+-----------------------------------------------------------------------------------------+
| POLICY INHERITANCE EVALUATION PATH |
| |
| [ Organization Root Policy ] ===> Allowed: [ projects/corp-images ] |
| | |
| v |
| [ Folder: Analytics Team ] ===> inheritFromParent: true (MERGE) |
| | Allowed: [ projects/analytics-images ] |
| | Result: [ corp-images, analytics-images ] |
| v |
| [ Project: Strict PCI ] ===> inheritFromParent: false (REPLACE) |
| Allowed: [ projects/pci-certified-images ] |
| Result: [ pci-certified-images ONLY ] |
+-----------------------------------------------------------------------------------------+
Inheritance Operators for List Constraints
- Merge (
inheritFromParent: true): The child policy inherits all allowed/denied values from the parent node and unions them with its own local values. This is the standard pattern for expanding allowed service lists in child business units. - Replace (
inheritFromParent: false): The child policy completely ignores parent rules and evaluates its own list of values in isolation. Useful for isolated compliance silos requiring stricter subsets. - Reset (
reset: true): Clears all inherited and local rules, reverting the policy at that specific hierarchy node back to the default constraint behavior defined by Google Cloud. - Allow All / Deny All: Explicitly sets
allowAll: trueordenyAll: trueon the list constraint, bypassing specific value lists.
Centrally Managed Resource Tags vs. Resource Labels
A critical architectural distinction exists between Resource Labels and Resource Tags.
+-----------------------------------------------------------------------------------------+
| RESOURCE LABELS vs. CENTRALLY MANAGED TAGS |
+-----------------------------------------------------------------------------------------+
| RESOURCE LABELS | RESOURCE TAGS (Cloud Resource Manager) |
| ------------------------------------- | ------------------------------------------- |
| - Simple key-value string metadata. | - First-class Organization resources. |
| - Defined directly on resources. | - Managed via central RBAC (Tag Admin). |
| - NOT centrally governed. | - Attached via TagBindings; INHERITED down |
| - Any user with write permissions | the resource hierarchy. |
| can alter or delete labels. | - Project owners CANNOT modify tags without |
| - Used for Billing export filters, | central Tag User permissions. |
| scripts, and reporting. | - Used for CONDITIONAL IAM and CONDITIONAL |
| - CANNOT be evaluated by Org Policies. | ORGANIZATION POLICIES. |
+-----------------------------------------------------------------------------------------+
Architectural Comparison Matrix
| Feature | Resource Labels | Resource Tags |
|---|---|---|
| Resource Representation | Key-value pairs inside resource config. | Dedicated TagKey and TagValue resources at Org/Folder level. |
| Central IAM Governance | No (Tied to local resource edit permissions). | Yes (roles/resourcemanager.tagAdmin, tagUser). |
| Hierarchy Inheritance | No (Must be applied per individual resource). | Yes (Inherited automatically down to all child resources). |
| Conditional Org Policies | Unsupported. | Fully Supported (e.g., enforce constraints based on tags). |
| Conditional Cloud IAM | Very limited (CEL support on select APIs). | Native Global Support via resource.hasTag(). |
| Primary Use Cases | Cost allocation, billing tags, CMDB scripts. | Security guardrails, sovereign compliance, zero-trust RBAC. |
Tag-Based Conditional Organization Policy Example
An architect can enforce a global constraint blocking public IPs (constraints/compute.vmExternalIpAccess), but define a tag condition rule: If the Compute Engine instance or its parent project is attached with Tag env = dmz, allow external IP allocation.
Real-Time Governance: Cloud Asset Inventory (CAI)
Cloud Asset Inventory (CAI) is a fully managed metadata index that provides real-time visibility, search, and historical analysis of all Google Cloud resources and IAM policies across the entire organization hierarchy.
+-----------------------------------------------------------------------------------------+
| CLOUD ASSET INVENTORY CAPABILITIES |
+-----------------------------------------------------------------------------------------+
| 1. REAL-TIME ASSET FEEDS |
| - Streams resource and IAM policy change events directly to Cloud Pub/Sub. |
| - Enables automated Event-Driven Security remediation pipelines (Cloud Functions). |
+-----------------------------------------------------------------------------------------+
| 2. TIME-TRAVEL HISTORICAL ANALYSIS (Up to 35 Days) |
| - Queries exact resource configurations and IAM policies at any past timestamp. |
| - Critical for post-incident forensics and compliance audit evidence. |
+-----------------------------------------------------------------------------------------+
| 3. EFFECTIVE IAM POLICY ANALYSIS |
| - Evaluates full inheritance trees, Google Groups, and IAM Conditions. |
| - Directly answers: "Who has access to this BigQuery dataset and through what role?"|
+-----------------------------------------------------------------------------------------+
| 4. BULK EXPORT SNAPSHOTS |
| - Dumps complete organization metadata snapshots into BigQuery or Cloud Storage. |
| - Powers enterprise security dashboards and SQL-based compliance queries. |
+-----------------------------------------------------------------------------------------+
Cloud Asset Inventory in Compliance Operations
- Auditing Over-Privileged Identities: CAI's IAM policy analyzer traces all effective access paths to critical resources, uncovering shadow admin privileges inherited through nested Google Groups.
- Automated Misconfiguration Remediation: When a developer accidentally opens a Cloud Storage bucket to
allUsers, CAI emits a real-time Pub/Sub message. A subscriber Cloud Function consumes the event, verifies the violation, and immediately reverts the bucket ACL within seconds.
Concrete Architectural Scenario: Multi-Tier Sovereign Cloud Governance
Scenario Profile
- Enterprise: European Healthcare Conglomerate hosting sensitive patient records in Google Cloud.
- Compliance Mandates:
- GDPR Data Sovereignty: Zero patient data or compute resources may exist outside European Union regions.
- Golden OS Image Enforcement: All Compute Engine virtual machines must boot exclusively from corporate hardened images hosted in
projects/corp-hardened-images. - Conditional Ingress: Public IP addresses are prohibited by default, but allowed on instances explicitly tagged by Network Security Admins with
network-zone = external-dmz. - Compliance Forensics: Must maintain full point-in-time configuration records for 35 days to support regulatory inspections.
Solution Blueprint
- Data Sovereignty Constraint: Attach
constraints/gcp.resourceLocationsat the Organization root withallowedValues: ["in:eu-locations"]to systematically block resource creation in US or APAC regions. - Trusted Images Constraint: Attach
constraints/compute.trustedImageProjectsat the Organization root withallowedValues: ["projects/corp-hardened-images"]. - Centrally Governed Tagging & Conditional Public IP Policy:
- Create a centralized Resource Tag
network-zonewith valuesinternalandexternal-dmz. Grantroles/resourcemanager.tagUserstrictly to the Network Security Team. - Apply
constraints/compute.vmExternalIpAccess(Deny all) at the Org root, with a conditional override rule evaluatingresource.hasTag('12345/network-zone', 'external-dmz')to permit public IPs only on certified perimeter proxies.
- Create a centralized Resource Tag
- Cloud Asset Inventory Continuous Compliance:
- Enable Cloud Asset Inventory real-time feeds publishing IAM and resource changes to a Pub/Sub topic.
- Export daily asset inventory snapshots to BigQuery for SQL-driven compliance reporting, and use CAI historical time-travel queries to satisfy European auditor inspections.
[!IMPORTANT] Exam Watch: On the Google Cloud Architect exam, understand the clear division between Organization Policies and IAM: Organization Policies restrict resource configurations (e.g. regions, image sources, public IPs), while IAM restricts principals. When a scenario requires allowing exceptions to Organization Policies for specific teams, use Resource Tags (not labels!) to create conditional policy rules. For compliance questions requiring point-in-time asset and IAM state reconstruction up to 35 days in the past, the answer is Cloud Asset Inventory.
An enterprise organization has an Organization Policy list constraint constraints/compute.trustedImageProjects applied at the Organization root with allowedValues: ['projects/corp-global-images']. A subsidiary folder Folder-Analytics requires deploying images from projects/corp-analytics-images as well as the global images. How should the Organization Policy be configured on Folder-Analytics?
A multinational financial organization subject to strict European banking regulations must ensure that no teams can provision compute, storage, or database resources outside of the European Union (EU) regions across all production projects. How should this compliance requirement be enforced systematically?
An architect needs to enforce an Organization Policy that blocks external public IP addresses on Compute Engine instances across the entire company, except for instances explicitly tagged for DMZ ingress workloads. The tagging system must be centrally governed so that project owners cannot bypass security controls by modifying tags on their own. What is the correct architectural implementation?
During a security compliance audit, the external auditor requires evidence of all IAM permissions and resource configurations for a sensitive customer payment project as they existed exactly 20 days ago, prior to a major platform migration. Which Google Cloud service enables retrieving this historical point-in-time configuration?