Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Stop Reinventing the Wheel: Building a Secure G...

Stop Reinventing the Wheel: Building a Secure GCP Foundation with Terraform

Many companies attempting to adopt Google Cloud start by building their infrastructure entirely from scratch, often leading to security gaps, scalability issues, and delayed time-to-market. In this session, we will explore the Google Cloud terraform-example-foundation—a powerful, opinionated framework based on the Cloud Foundation Toolkit (CFT).

Drawing from real-world consulting experience, I will demonstrate how this framework provides a production-ready, secure-by-design baseline. We will break down its multi-stage deployment architecture (Bootstrap, Org, Env, Network, Projects) and discuss how it enforces best practices like least privilege, environment isolation, and GitOps workflows. Attendees will leave with actionable insights on how to leverage this foundation to drastically reduce IaC complexity and accelerate their organization's cloud-native journey.

Patrick Eichler

October 27, 2026

Transcript

39 slides
  1. Patrick Eichler YunaCloud The Cloud Scaling Bottleneck • Agility vs.

    Compliance: The promise of cloud speed frequently collides with strict enterprise security and compliance mandates. • Manual Provisioning Friction: Reliance on manual IT ticketing and security reviews creates bottlenecks and stalls developer productivity. • Multi-Tenant Risks: Scaling without a codified baseline results in bespoke configurations, inconsistent security, and expanded blast radius. • The Core Challenge: Delivering self-service autonomy and speed to developers without sacrificing security, networking, or billing isolation.
  2. Patrick Eichler YunaCloud The Cloud Foundation Challenge • The gap

    between a blank Google Cloud Organization and an enterprise-ready environment (months of implementations, drifts of GCP security blueprints) • The hidden costs of manual configuration: security inconsistencies, delayed provisioning, and operational silos. • The risk of building from scratch versus leveraging opinionated frameworks.
  3. Patrick Eichler YunaCloud Google’s Prescriptive Blueprint • Official, production-ready IaC

    implementation of the GCP Security Foundation Guide • Security by Default: Enforced VPC Service Controls and strict IAM mapping • Modularity: Composable components for customized enterprise needs • GitOps Driven: Infrastructure mutations solely via automated pull-requests • Self-Service Platform: Automated & compliant vending
  4. Patrick Eichler YunaCloud The Layered Architecture • 0-Bootstrap: Establishing the

    foundation's core CI/CD pipelines and Terraform state management. • 1-Org: Configuring resource hierarchy, organization policies, IAM, and centralized audit logging. • 2-Environments: Enforcing strict isolation between Production, Non-Production, and Development. • 3-Networks: Deploying Shared VPCs, hub-and-spoke topologies, and baseline firewall rules. • 4-Projects: Establishing the Project Factory for vending standardized, compliant workspaces to developers. • 5-App: Deploying actual workloads on top of the secure foundation.
  5. Patrick Eichler YunaCloud Stage 0: Bootstrap • The Seed Project:

    Creates a highly restricted central project that acts as the administrative hub for all future automation. • Terraform State Management: Provisions secure, versioned Cloud Storage (GCS) buckets to hold the Terraform state files for all subsequent stages. • CI/CD Pipeline Setup: Deploys the automated pipelines (Cloud Build, GitHub Actions, or Jenkins). From this point forward, no human engineer has the privileges to mutate infrastructure directly; they must commit code to a repository, which the pipeline then executes. • Foundational IAM: Creates the core Service Accounts that the CI/CD pipelines will use, granting them specific roles scoped only to the stages they need to deploy. The Foundation of the Foundation: Before you can build infrastructure via code, you need a place to run that code. The bootstrap stage eliminates the anti-pattern of running terraform apply from a developer’s laptop.
  6. Patrick Eichler YunaCloud Stage 1: Organization • Resource Hierarchy: Creates

    the top-level folder structure (e.g., Shared, Production, Non-Production, Development) to ensure predictable policy inheritance. • Organization Policies: Deploys hard guardrails mathematically preventing bad behavior. Examples include disabling default VPC network creation, restricting resource deployment to approved geographic regions, and enforcing uniform bucket-level access. • Centralized Logging: Configures Organization-level log sinks to route all Admin Activity and Data Access logs into a centralized Log Archive (Cloud Storage for long-term retention) and a Security Analytics hub (BigQuery for querying). • Security Command Center (SCC): Enables SCC to continuously monitor the organization for vulnerabilities and misconfigurations. Governance & Security Baseline: Once the automation is running, this stage establishes the structural and security guardrails across the entire GCP Organization.
  7. Patrick Eichler YunaCloud Stage 2: Environments • Environment Segregation: Creates

    dedicated monitoring and secrets management projects per environment (Production, Non-Production, Development). • Blast Radius Containment: Ensures that a compromised credential or a catastrophic configuration error in the Development environment has zero access to Production resources. • Key Management Service: Creates KMS rings for customer-managed encryption keys (CMEK) Workload Isolation: This stage translates the physical folder structure created in Stage 1 into distinct, isolated operational environments.
  8. Patrick Eichler YunaCloud Stage 3: Networks • Shared VPCs: Creates

    a Host Project for each environment and deploys a Shared VPC. This allows network administrators to manage subnets, routes, and IPs centrally, while allowing developers to consume them later. • Hub and Spoke Topology: (Optional based on configuration) Sets up a centralized Hub network to inspect and route traffic between different environments or on-premises data centers via Cloud Interconnect or VPNs. • Base Firewalls & Egress Control: Implements default-deny ingress rules, baseline allow rules for health checks, Private Google Access (to reach GCP APIs without traversing the public internet), and Cloud NAT for secure outbound internet access. The Centralized Nervous System: Networking in GCP is global, but it must be tightly controlled. This stage builds out the connectivity framework.
  9. Patrick Eichler YunaCloud Stage 4: Projects • Project Factory: Uses

    the Google Cloud Project Factory Terraform module to introduce new service projects for application teams. • Automated Attachment: As projects are vended, they are automatically attached to the correct Shared VPC, associated with the central billing account, and populated with the correct API enablements. • Delegated IAM: Grants the application team (via Google Groups) administrative rights only within the boundary of their new project, keeping them out of the foundational networking and security configurations. The Vending Machine: With the network and security guardrails in place, the foundation is ready to onboard users. This stage acts as a self-service platform.
  10. Patrick Eichler YunaCloud Stage 5: Applications • Workload Deployment: Deploys

    standard, secure architectures (like a private GKE cluster, a Cloud SQL database, or Cloud Run services) into the vended projects from Stage 4. • Platform Consumption: Demonstrates how application developers can now move quickly and autonomously, knowing that the underlying network, logging, and security compliance are automatically handled by the layers beneath them. The Payload: This final stage is technically outside the core foundation, but it proves the foundation works.
  11. Patrick Eichler YunaCloud Technical Advantages Adopting the Terraform Example Foundation

    shifts the organization away from reinventing the wheel, delivering immediate ROI across engineering velocity, security, and operational scale. It fundamentally transforms central IT from a gatekeeper into a platform enabler.
  12. Patrick Eichler YunaCloud Technical Advantages • Pre-Tested Architecture: Leverage Google-authored,

    production-ready modules to reduce foundation deployment from months to weeks. • Default Security Baselines: Automatically embed VPC Service Controls for data perimeters, strict IAM group mapping, and immutable centralized logging. • Automated Validation: Manage infrastructure exclusively via pull requests backed by automated terraform plan execution and policy-as-code checks. • Policy-as-Code Guardrails: Implement Organization Policies to mathematically prevent compliance breaches and enforce blast radius containment. • Standardized Vending: Use the Project Factory module to dynamically stamp out isolated, multi-tenant environments with identical network configurations. By reusing official Terraform Modules
  13. Patrick Eichler YunaCloud Elevated DevEx & Autonomy • From Gatekeepers

    to Enablers: Central IT shifts out of the critical path, acting as platform engineers rather than ticket resolvers. • Automated Guardrails: Organization Policies and predefined IAM roles mathematically prevent compliance breaches, keeping the blast radius contained. • Frictionless Iteration: Developers gain the freedom to build, test, and deploy rapidly within their approved boundaries without waiting on manual security reviews.
  14. Patrick Eichler YunaCloud Self-Service GitOps Automation • Pull Request Provisioning:

    Infrastructure is requested and modified exclusively through code commits, eliminating manual console changes. • Automated Validation: Pipelines run terraform plan and policy checks automatically, ensuring configurations are safe before they are merged. • Rapid Deployment: Peer-reviewed and validated infrastructure changes are deployed in minutes, backed by fully auditable version control.
  15. Patrick Eichler YunaCloud Accelerated Time-to-Market • Pre-Tested Modules: Leverages Google-authored,

    production-ready code based on thousands of enterprise deployments. • Months to Weeks: Drastically reduces the time required to build a secure, compliant cloud foundation from scratch. • Faster ROI: Allows development teams to start deploying revenue-generating applications sooner on a stable architecture.
  16. Patrick Eichler YunaCloud Security & Compliance by Default • Identity

    as a Perimeter: Enforces strict IAM group mapping rather than individual user permissions. • Data Exfiltration Prevention: Natively integrates VPC Service Controls (VPC SC) to build perimeters around sensitive APIs. • Audit-Ready Operations: Establishes immutable, centralized logging to ensure tamper-proof records for compliance and security teams.
  17. Patrick Eichler YunaCloud Scalable Multi-Tenancy • The Project Factory: Standardizes

    the vending process so every new environment is stamped out with identical security and network baselines. • Predictable Scaling: Easily accommodates growth from a pilot program to thousands of globally distributed projects. • Zero Administrative Bottlenecks: Scales infrastructure consumption without requiring a linear increase in central IT headcount.
  18. Patrick Eichler YunaCloud The CI/CD & Governance Layers • Stage

    0: Bootstrap (Multi-Tenant CI/CD Pipelines): ◦ Diverse Tooling: The bootstrap repository provisions dedicated CI/CD infrastructure tailored to each client’s preferred version control system. ◦ Client A & B: Automated triggers configured via GitHub Actions. ◦ Client C: Provisioned to run via GitLab CI. ◦ Client D: Orchestrated using a centralized Jenkins server. ◦ Repository Isolation: Each client’s pipeline looks only at their specific use-case repositories. State buckets and deployment Service Accounts are strictly segregated per client.
  19. Patrick Eichler YunaCloud The CI/CD & Governance Layers • Stage

    1: Organization (Identity Guardrails): ◦ Domain Restricted Sharing: The foundation uses Organization Policies to strictly enforce which identities can access the environment. ◦ Allowed Domains: Client users and service accounts are validated against an allowed domains list (e.g., @client-a.com, @client-b.com), ensuring external or unauthorized identities cannot be granted IAM roles.
  20. Patrick Eichler YunaCloud The Shared Core • Stage 2 &

    3: Environments and Networks (Unchanged & Centralized): ◦ Unified Infrastructure: You do not need to rebuild the wheel for every client. The core Environments and Networks repositories remain unchanged. ◦ Centralized Guardrails: All clients inherit the same baseline monitoring, secrets management, and environmental isolation (Dev, Non-Prod, Prod). ◦ Shared VPCs: Traffic flows through centralized hub-and-spoke Shared VPCs managed by the platform team, ensuring standard firewalling, routing, and egress controls for everyone without duplicating effort.
  21. Patrick Eichler YunaCloud Vending & App Autonomy • Stage 4:

    Projects (The Vending Machine): ◦ Client-Specific Workspaces: The Project Factory provisions distinct, isolated GCP projects for every client and their specific use cases (e.g., prj-clienta-ecommerce-prod, prj-clientc-data-dev). ◦ Automated Attachment: Each vended project is automatically attached to the Shared VPC (from Stage 3) and assigned the correct billing account. ◦ Scoped IAM: Client teams are granted administrative control only within the boundaries of their newly vended projects.
  22. Patrick Eichler YunaCloud Vending & App Autonomy • Stage 5:

    Application (True Developer Autonomy): ◦ Bring Your Own IaC: Each client maintains their own App Repository containing their specific Terraform code (GKE, Cloud SQL, Cloud Run). ◦ Service Project Deployment: The isolated CI/CD pipelines (from Stage 0) execute this code, deploying workloads exclusively into that client’s vended Service Projects. ◦ The Result: Total developer autonomy. Clients build and deploy at their own pace, using their own repositories, completely insulated from one another, yet fully compliant with the central platform guardrails.
  23. Patrick Eichler YunaCloud Conclusion • From Gatekeepers to Enablers: ◦

    Platform Transformation: The foundation shifts central IT from manual gatekeepers to platform engineers driven by self-service GitOps pipelines. ◦ Uncompromised Security: Establishes mathematically enforced security perimeters and immutable audit trails before any workloads are deployed. ◦ True Developer Autonomy: Client teams operate independently within isolated service projects using their own repositories and CI/CD pipelines. ◦ Infinite Scalability: Decoupling central governance from application layers allows vending new environments in minutes with zero administrative drag. ◦ Immediate Next Steps: Map Cloud Identity groups, finalize domain vetting policies, and define architectural blueprints for initial client onboarding.
  24. Patrick Eichler YunaCloud Networking • LinkedIn: https://www.linkedin.com/in/patrick-eichler • Twitter: https://x.com/Itchimonji

    • Medium: https://medium.com/@itchimonji • Speaker Deck: https://speakerdeck.com/itchimonji

More Decks by Patrick Eichler

Other Decks in Technology