Start a fresh conversation. Replace the highlighted placeholders.
Use setting-up-terraform to prepare Terraform infrastructure configuration for [cloud provider] and [resources], including version-pinned providers, separated environment state, and CI that keeps production applies behind approval; do not include state files or secret tfvars.
Required inputs
[cloud provider]
[resources]
User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗
SKILL.md
name: setting-up-terraformdescription: Set up Terraform infrastructure-as-code for cloud resources, including provider configuration, modules, state management, and CI integration.
Setup Terraform
Use this skill when the user asks to set up Terraform, infrastructure as code, cloud provisioning, or IaC.
Adapt the provider for the user's cloud (AWS, GCP, Azure).
Define variables — in variables.tf, define inputs with types, descriptions, and defaults:
variable "aws_region" {
type = string
default = "us-east-1"
description = "AWS region for resources"
}
variable "environment" {
type = string
description = "Deployment environment (dev, staging, prod)"
}
Create resources — in main.tf, define the infrastructure the user needs (VPC, RDS, ECS, S3, Lambda, etc.). Extract reusable patterns into modules under modules/.
Configure remote state — use an S3 bucket (AWS), GCS bucket (GCP), or Azure Storage for state. Enable state locking with DynamoDB (AWS).
Add CI pipeline — create a GitHub Actions workflow that runs terraform fmt -check, terraform validate, and terraform plan on PRs, with terraform apply on merge to main (with approval gate).
Notes
Never commit state files or .tfvars with secrets.
Use workspaces or separate state files for dev/staging/prod.
Pin provider versions to avoid breaking changes.
Run terraform fmt before committing.
setting-up-terraform by spencerpauly · The Skill Leaderboard