agentleFS
benjaminwesternbenjaminwestern/google-engineer-skills/skills/cloud-foundation-fabric/SKILL.md

cloud-foundation-fabric

Skill5 starsChanged 8 months agoMITView on GitHub

MUST USE when building or modifying Google Cloud infrastructure with Cloud Foundation Fabric Terraform modules. Covers selecting CFF modules, wiring inputs and outputs, applying versioning and repository conventions, and composing Google Cloud architectures on top of Fabric. Do NOT use for generic Terraform work outside Cloud Foundation Fabric or for manual Google Cloud console setup unless the task explicitly depends on CFF.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use explicit prefix instead of random suffixes:

    line 136

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cloud Foundation Fabric (CFF)

Overview

Cloud Foundation Fabric is a comprehensive suite of Terraform modules and end-to-end blueprints designed for Google Cloud Platform (GCP). It provides:

  1. Modules: A library of composable, production-ready Terraform modules (e.g., project, net-vpc, gke-cluster)
  2. FAST: An opinionated, stage-based landing zone toolkit for bootstrapping enterprise-grade GCP organizations

Repository: https://github.com/GoogleCloudPlatform/cloud-foundation-fabric
Latest Version: v53.0.0 (as of February 2025)

Module Usage Pattern

ALWAYS pin modules to a tagged release to ensure stability:

module "project" {
  source  = "github.com/GoogleCloudPlatform/cloud-foundation-fabric//modules/project?ref=v53.0.0"
  name    = "my-project"
  # ... other configuration
}

Version Reference

VersionRelease DateStatus
v53.0.02025-02-12Latest
v52.1.02025-02-12Stable
v52.0.02025-01-31Stable

Quick Examples

Project with APIs and IAM

module "project" {
  source  = "github.com/GoogleCloudPlatform/cloud-foundation-fabric//modules/project?ref=v53.0.0"
  name    = "my-application"
  parent  = "folders/1234567890"
  
  services = [
    "compute.googleapis.com",
    "container.googleapis.com",
    "logging.googleapis.com",
  ]
  
  iam = {
    "roles/viewer" = ["group:developers@example.com"]
    "roles/editor" = ["serviceAccount:ci-cd@my-project.iam.gserviceaccount.com"]
  }
}

VPC with Subnets

module "vpc" {
  source  = "github.com/GoogleCloudPlatform/cloud-foundation-fabric//modules/net-vpc?ref=v53.0.0"
  project_id = module.project.project_id
  name    = "production-vpc"
  
  subnets = [
    {
      name          = "subnet-1"
      region        = "us-central1"
      ip_cidr_range = "10.0.0.0/24"
    },
    {
      name          = "subnet-2"
      region        = "europe-west1"
      ip_cidr_range = "10.0.1.0/24"
    }
  ]
}

GKE Autopilot Cluster

module "gke" {
  source  = "github.com/GoogleCloudPlatform/cloud-foundation-fabric//modules/gke-cluster-autopilot?ref=v53.0.0"
  project_id = module.project.project_id
  name    = "main-cluster"
  location = "us-central1"
  
  vpc_config = {
    network    = module.vpc.self_link
    subnetwork = module.vpc.subnet_self_links["us-central1/subnet-1"]
  }
}

Reference Documentation

For detailed information, see the following reference guides:

  • Module Catalog - Complete list of all CFF modules organized by category
  • Design Principles - The Zen of Fabric, common interfaces, and naming conventions
  • Factory Patterns - Configuration-driven resource creation using YAML
  • Cursed Knowledge - Edge cases, gotchas, and advanced patterns
  • Configuration - Tool setup, environment variables, and provider configuration

Common Patterns

IAM Interface

Most modules support consistent IAM patterns:

iam = {
  "roles/viewer" = ["user:user@example.com"]
  "roles/editor" = ["group:group@example.com"]
}

No Random Suffixes

Use explicit prefix instead of random suffixes:

module "project" {
  source = "github.com/GoogleCloudPlatform/cloud-foundation-fabric//modules/project?ref=v53.0.0"
  name   = "application"
  prefix = "prod"  # Creates: prod-application
}

Key Files

FilePurpose
CURSED_KNOWLEDGE.mdEdge cases and gotchas
FACTORIES.mdFactory patterns documentation
CONTRIBUTING.mdDevelopment guidelines
GEMINI.mdAI assistant context
CHANGELOG.mdRelease history

External References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.