Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
spencerpauly avatar

Setting Up Terraform

  • 200 installs
  • 655 repo stars
  • Updated August 2, 2026
  • spencerpauly/awesome-cursor-skills

Helps with ai & agent building tasks.

About

setting-up-terraform is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • setting-up-terraform
  • AI & Agent Building
  • AI-coding skill

Setting Up Terraform by the numbers

  • 200 all-time installs (skills.sh)
  • +20 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #2,891 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill setting-up-terraform

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs200
repo stars655
Last updatedAugust 2, 2026
Repositoryspencerpauly/awesome-cursor-skills

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

Setup Terraform

Use this skill when the user asks to set up Terraform, infrastructure as code, cloud provisioning, or IaC.

Steps

1. Initialize the project structure

   infra/
   ├── main.tf
   ├── variables.tf
   ├── outputs.tf
   ├── terraform.tfvars      # (gitignored)
   ├── providers.tf
   └── modules/

2. Configure the provider — in providers.tf:

   terraform {
     required_version = ">= 1.5"
     required_providers {
       aws = {
         source  = "hashicorp/aws"
         version = "~> 5.0"
       }
     }
     backend "s3" {
       bucket = "my-terraform-state"
       key    = "prod/terraform.tfstate"
       region = "us-east-1"
     }
   }

   provider "aws" {
     region = var.aws_region
   }

Adapt the provider for the user's cloud (AWS, GCP, Azure).

3. 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)"
   }

4. Create resources — in main.tf, define the infrastructure the user needs (VPC, RDS, ECS, S3, Lambda, etc.). Extract reusable patterns into modules under modules/.

5. Configure remote state — use an S3 bucket (AWS), GCS bucket (GCP), or Azure Storage for state. Enable state locking with DynamoDB (AWS).

6. Add to `.gitignore`

   *.tfstate
   *.tfstate.*
   .terraform/
   terraform.tfvars
   *.tfvars

7. 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.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.