Terraform Iac
State management, modules, workspaces, remote backends, and multi-environment strategies
Install
npx skills add cosmicstack-labs/mercury-agent-skills --skill terraform-iacgit clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git /tmp/mercury-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/mercury-agent-skills/categories/devops/terraform-iac ~/.claude/skills/terraform-iacPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Terraform / Infrastructure as Code
Manage infrastructure with Terraform.
## Core Concepts
### State Management
- Store state remotely (S3, Terraform Cloud)
- Enable state locking (DynamoDB)
- Never edit state manually (use `terraform state` commands)
- Isolate environments with workspaces or directories
### Structure
```
terraform/
├── modules/
│ ├── networking/
│ ├── compute/
│ └── database/
├── environments/
│ ├── dev/
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ └── terraform.tfvars
│ ├── staging/
│ └── production/
└── backend.tf
```
## Module Design
### Module Interface
```hcl
# modules/compute/main.tf
variable "instance_type" { type = string }
variable "subnet_id" { type = string }
output "instance_id" { value = aws_instance.app.id }
```
### Module Best Practices
- Input validation (type constraints, validation blocks)
- Outputs for all useful values
- Versioned modules (Git tags, registry)
- Documentation (README per module)
- Test with Terratest
## Remote Backend
```hcl
terraform {
backend "s3" {
bucket = "my-terraform-state"
key = "production/terraform.tfstate"
region = "us-east-1"
dynamodb_table = "terraform-locks"
encrypt = true
}
}
```
## Multi-Environment Strategy
1. **Workspaces**: Simple, state separation only
2. **Directory structure**: Full isolation, can diff configs
3. **Terragrunt**: DRY config, repeatable structure
4. **Always**: Plan in CI, approve, then applyDetails
- Skill name
terraform-iac- Repository
- cosmicstack-labs/mercury-agent-skills
- Path
categories/devops/terraform-iac/SKILL.md- License
- MIT
- Repo updated
- 25 August 2026
FAQ
What does the Terraform Iac skill do?
State management, modules, workspaces, remote backends, and multi-environment strategies
How do I install the Terraform Iac skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add cosmicstack-labs/mercury-agent-skills --skill terraform-iac. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Terraform Iac popular?
It lives in cosmicstack-labs/mercury-agent-skills, which has 492 GitHub stars and 68 forks.
Related skills
Accessibility
492cosmicstack-labs/mercury-agent-skills
Achieve and maintain WCAG compliance through inclusive design practices, proper ARIA usage, and comprehensive testing methodologies.
Accessibility Testing
492cosmicstack-labs/mercury-agent-skills
WCAG 2.1/2.2 audit, axe, Lighthouse, manual testing, screen reader testing, and remediation
Agent Audit Logging
492cosmicstack-labs/mercury-agent-skills
Implement comprehensive audit logging and reporting for multi-agent systems. Covers event capture, structured logging, traceability, compliance reporting, forensic analysis, and real-time monitoring dashboards for agent actions and decisions.
Cicd Setup
393shawnpang/startup-founder-skills
When the user needs to set up or improve CI/CD pipelines — GitHub Actions, GitLab CI, deployment automation, or says "set up CI", "automate deployment", "add tests to pipeline", "fix my build".
Sre Practices
492cosmicstack-labs/mercury-agent-skills
SLIs/SLOs/SLAs, error budgets, incident response, postmortems, and reliability patterns
Sentiment Monitoring
393shawnpang/startup-founder-skills
When the user wants to monitor reviews, mentions, and community sentiment about their own product. Also use when the user mentions "track our reviews", "what are people saying about us", "brand monitoring", "reputation management", or "review alerts".
Browse the most popular Claude skills, all devops & cloud skills, or write your own with the skills generator.