mcpField
T
terraform-infrastructure

terraform-infrastructure

github.com/aj-geddesCloud & DevOps3731.2k installsUpdated 34w ago
Repository

About terraform-infrastructure

terraform-infrastructure is a Terraform infrastructure-as-code skill for provisioning and operating cloud resources. It covers declarative configuration, remote state, and automated provisioning, with reference material on modules, variables, and deployment scripts.

Key features

  1. 01Configure infrastructure declaratively with Terraform
  2. 02Manage cloud and on-premise resources
  3. 03Track configuration through remote state
  4. 04Consult module, variable, and deployment guides

Use cases

  1. 01Provision cloud infrastructure
  2. 02Manage dev, staging, and production environments
  3. 03Review infrastructure code changes
  4. 04Replicate environments for disaster recovery

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill terraform-infrastructure

After installing, type/terraform-infrastructurein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
aws-infrastructure-module.md
terraform-deployment-script.md
variables-and-outputs.md
scripts/
validate-config.sh
templates/
config-starter.yaml

Details

From the project README

Terraform Infrastructure

Table of Contents

Overview

Build scalable infrastructure as code with Terraform, managing AWS, Azure, GCP, and on-premise resources through declarative configuration, remote state, and automated provisioning.

When to Use

  • Cloud infrastructure provisioning
  • Multi-environment management (dev, staging, prod)
  • Infrastructure versioning and code review
  • Cost tracking and resource optimization
  • Disaster recovery and environment replication
  • Automated infrastructure testing
  • Cross-region deployments

Quick Start

Minimal working example:

# terraform/main.tf
terraform {
  required_version = ">= 1.0"

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

  # Remote state configuration
  backend "s3" {
    bucket         = "terraform-state-prod"
    key            = "prod/terraform.tfstate"
    region         = "us-east-1"
    encrypt        = true
    dynamodb_table = "terraform-locks"
  }
}

provider "aws" {
  region = var.aws_region

  default_tags {
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
AWS Infrastructure ModuleAWS Infrastructure Module
Variables and OutputsVariables and Outputs
Terraform Deployment ScriptTerraform Deployment Script

Best Practices

✅ DO
  • Use remote state (S3, Terraform Cloud)
  • Implement state locking (DynamoDB)
  • Organize code into modules
  • Use workspaces for environments
  • Apply tags consistently
  • Use variables for flexibility
  • Implement code review before apply
  • Keep sensitive data in separate variable files
❌ DON'T
  • Store state files locally in git
  • Use hardcoded values
  • Mix environments in single state
  • Skip terraform plan review
  • Use root module for everything
  • Store secrets in code
  • Disable state locking

Comments

Markdown supported