terraform-iac
State management, modules, workspaces, remote backends, and multi-environment strategies
npx skills add cosmicstack-labs/mercury-agent-skills --skill terraform-iac --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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. **Wo
- Core Concepts
- State Management
- Structure
- Module Design
- Module Interface
- Module Best Practices
- Remote Backend
- Multi-Environment Strategy
What does the terraform-iac skill do?
State management, modules, workspaces, remote backends, and multi-environment strategies
How do I install it?
Run `npx skills add cosmicstack-labs/mercury-agent-skills --skill terraform-iac --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From cosmicstack-labs/mercury-agent-skills, a repository with 364 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.