terraform-patterns

Automate Terraform infrastructure design and governance with module and state standards.

3|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/bipinks/ghost-office --skill terraform-patterns-bipinks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-patterns
Source: https://github.com/bipinks/ghost-office/tree/main/.claude/skills/terraform-patterns
Command: npx skills add https://github.com/bipinks/ghost-office --skill terraform-patterns-bipinks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Writing, reviewing, or planning Terraform infrastructure code can become error-prone and hard to scale across environments and teams.

Core Features & Use Cases

  • Module design: reusable, opinionated module patterns for networking, compute, and databases.
  • State management & workspace strategy: recommended remote backends (S3 + DynamoDB) and per-environment workspaces to prevent drift.
  • Validation & governance: input validation, naming conventions, and drift detection to enforce consistency across deployments.
  • CI/CD integration: GitHub Actions workflows for plan/apply pipelines and automated policy checks.

Quick Start

Run the Terraform patterns guide against your infrastructure project to organize modules, backends, and workflows.

Frequently Asked Questions about terraform-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Terraform modules for multi-environment deployments?

Structure Terraform modules for multi-environment deployments by applying reusable, opinionated patterns for networking, compute, and databases. This enforces consistent module boundaries and standardizes infrastructure design across your environments.

What's the best way to configure remote state in Terraform to prevent drift?

Configure remote state in Terraform using S3 backends with DynamoDB locking to prevent drift. This state management strategy ensures safe concurrent access and maintains consistency across per-environment workspaces.

How do I automate Terraform drift detection and policy checks in CI/CD?

Automate Terraform drift detection and policy checks in CI/CD by integrating GitHub Actions workflows. These pipelines execute automated plan and apply operations while enforcing governance and validation standards.

Does this Terraform pattern guidance support per-environment workspaces?

Yes, this Terraform pattern guidance supports per-environment workspaces. It provides a workspace strategy combined with remote backend configurations to isolate state and enforce consistency across deployments.

Why do I need variable validation and naming conventions in Terraform?

Variable validation and naming conventions are needed in Terraform to enforce governance and consistency across deployments. Input validation prevents misconfigurations and ensures infrastructure code scales reliably across teams.

When should I not use per-environment workspaces for Terraform state management?

Avoid per-environment workspaces for Terraform state management when your project lacks strict separation requirements or relies on simple, single-environment architectures. Complex workspace strategies add overhead that may not suit smaller infrastructure deployments.