Skip to content
infrastructure-standards logo

Infrastructure Standards

infrastructure-standards

Infrastructure, cloud, and DevOps standards. Use when setting up new projects, configuring cloud resources, or working with IaC.

SKILL.md

Full skill instructions

Infrastructure Standards

New Project Preferences

When starting new projects, prefer:

  • Terraform for Infrastructure as Code
  • GCP (Google Cloud Platform) by default, unless otherwise specified
  • Serverless architectures that are free when idle (Cloud Run, Cloud Functions)
  • Docker Compose for local development

Terraform

Project Structure

infrastructure/
├── main.tf           # Main configuration
├── variables.tf      # Input variables
├── outputs.tf        # Output values
├── providers.tf      # Provider configuration
├── terraform.tfvars  # Variable values (gitignored for secrets)
└── modules/          # Reusable modules
    └── api/
        ├── main.tf
        ├── variables.tf
        └── outputs.tf

Best Practices

  • Use remote state (GCS bucket for GCP)
  • Lock state files to prevent concurrent modifications
  • Use workspaces or separate state files for environments
  • Tag all resources consistently
  • Use modules for reusable infrastructure

GCP Provider Setup

terraform {
  required_version = ">= 1.0"

  required_providers {
    google = {
      source  = "hashicorp/​google"
      version = "~> 5.0"
    }
  }

  backend "gcs" {
    bucket = "project-terraform-state"
    prefix = "terraform/​state"
  }
}

provider "google" {
  project = var.project_id
  region  = var.region
}

GCP Services

Preferred Services (Free When Idle)

Use CaseServiceNotes
APIs/​BackendCloud RunScale to zero, pay per request
Background JobsCloud FunctionsEvent-driven, scale to zero
Scheduled TasksCloud Scheduler + Cloud FunctionsCron-like scheduling
DatabaseCloud SQL (small) or FirestoreFirestore has free tier
StorageCloud StoragePay per use
AuthFirebase AuthFree tier generous

Cloud Run Example

resource "google_cloud_run_service" "api" {
  name     = "api"
  location = var.region

  template {
    spec {
      containers {
        image = "gcr.io/​${var.project_id}/​api:latest"

        resources {
          limits = {
            memory = "512Mi"
            cpu    = "1"
          }
        }
      }
    }

    metadata {
      annotations = {
        "autoscaling.knative.dev/​minScale" = "0"  # Scale to zero
        "autoscaling.knative.dev/​maxScale" = "10"
      }
    }
  }
}

Docker Compose (Local Dev)

Standard Structure

# docker-compose.yml
version: "3.8"

services:
  api:
    build: ./​api
    ports:
      - "8000:8000"
    volumes:
      - ./​api:/​app
    environment:
      - DATABASE_URL=postgresql://postgres:postgres@db:5432/​app
    depends_on:
      - db

  web:
    build: ./​web
    ports:
      - "3000:3000"
    volumes:
      - ./​web:/​app
      - /​app/​node_modules
    environment:
      - VITE_API_URL=http://localhost:8000

  db:
    image: postgres:15
    ports:
      - "5432:5432"
    environment:
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=app
    volumes:
      - postgres_data:/​var/​lib/​postgresql/​data

volumes:
  postgres_data:

Best Practices

  • Use named volumes for persistent data
  • Mount source code for hot reload in development
  • Use .env files for environment variables (gitignored)
  • Include health checks for dependent services
  • Use depends_on with health conditions when needed

Environment Management

Secret Handling

  • Never commit secrets to git
  • Use .env files locally (gitignored)
  • Use GCP Secret Manager for production
  • Reference secrets in Terraform:
data "google_secret_manager_secret_version" "api_key" {
  secret = "api-key"
}

resource "google_cloud_run_service" "api" {
  # ...
  template {
    spec {
      containers {
        env {
          name = "API_KEY"
          value_from {
            secret_key_ref {
              name = google_secret_manager_secret.api_key.secret_id
              key  = "latest"
            }
          }
        }
      }
    }
  }
}

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
I
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View