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:
Guide
Contents
AWS Infrastructure Module
AWS Infrastructure Module
Variables and Outputs
Variables and Outputs
Terraform Deployment Script
Terraform 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
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: aj-geddes-useful-ai-prompts-terraform-infrastructure3description: Terraform Infrastructure4---56# Terraform Infrastructure78## Table of Contents910- [Overview](#overview)11- [When to Use](#when-to-use)12- [Quick Start](#quick-start)13- [Reference Guides](#reference-guides)14- [Best Practices](#best-practices)1516## Overview1718Build scalable infrastructure as code with Terraform, managing AWS, Azure, GCP, and on-premise resources through declarative configuration, remote state, and automated provisioning.1920## When to Use2122- Cloud infrastructure provisioning23- Multi-environment management (dev, staging, prod)24- Infrastructure versioning and code review25- Cost tracking and resource optimization26- Disaster recovery and environment replication27- Automated infrastructure testing28- Cross-region deployments2930## Quick Start3132Minimal working example:3334```hcl35# terraform/main.tf36terraform {37 required_version = ">= 1.0"3839 required_providers {40 aws = {41 source = "hashicorp/aws"42 version = "~> 5.0"43 }44 }4546 # Remote state configuration47 backend "s3" {48 bucket = "terraform-state-prod"49 key = "prod/terraform.tfstate"50 region = "us-east-1"51 encrypt = true52 dynamodb_table = "terraform-locks"53 }54}5556provider "aws" {57 region = var.aws_region5859 default_tags {60// ... (see reference guides for full implementation)61```6263## Reference Guides6465Detailed implementations in the `references/` directory:6667| Guide | Contents |68|---|---|69| [AWS Infrastructure Module](references/aws-infrastructure-module.md) | AWS Infrastructure Module |70| [Variables and Outputs](references/variables-and-outputs.md) | Variables and Outputs |71| [Terraform Deployment Script](references/terraform-deployment-script.md) | Terraform Deployment Script |7273## Best Practices7475### ✅ DO7677- Use remote state (S3, Terraform Cloud)78- Implement state locking (DynamoDB)79- Organize code into modules80- Use workspaces for environments81- Apply tags consistently82- Use variables for flexibility83- Implement code review before apply84- Keep sensitive data in separate variable files8586### ❌ DON'T8788- Store state files locally in git89- Use hardcoded values90- Mix environments in single state91- Skip terraform plan review92- Use root module for everything93- Store secrets in code94- Disable state locking9596---97> Converted and distributed by [TomeVault](https://tomevault.io/claim/aj-geddes) — claim your Tome and manage your conversions.98<!-- tomevault:4.0:skill_md:2026-04-11 -->
Run npx skillmds@latest add tomevault-io/aj-geddes-useful-ai-prompts-terraform-infrastructure in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Terraform Infrastructure It is listed under DevOps & Infra on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.