Skip to main content
skill CX Codex

terraform-aws — Claude Code skill: what it does, how to install

Provisions AWS infrastructure with Terraform, manages state, and configures modules. Useful for declarative cloud deployments and IaC workflows.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill terraform-aws -a claude-code
Open on GitHub

What terraform-aws does

This skill guides AI agents in provisioning AWS resources declaratively with Terraform. It supplies templates for provider setup, remote state storage, and common resources like VPC networks or instances. Default tags track environment names cleanly.

It outlines standard workflows. These cover initialization, planning, applying, and destruction. The instructions rely on upstream modules and advise pinning provider versions so updates do not break running setups.

To keep environments isolated, the guide mandates separate states or workspaces. You need configured AWS credentials first. Without an existing bucket, applying these manifests will fail.

What it helps with

  • Configure an AWS provider with remote state and environment tags
  • Provision VPC networking using the official AWS module
  • Deploy an instance referencing data sources for AMIs
  • Isolate state files across different deployment environments

Example prompts for the agent

  • Configure Terraform for AWS with remote state in a cloud bucket
  • Create a VPC manifest using the terraform-aws-modules package
  • Generate a Terraform execution plan and show the apply command

How to install terraform-aws

1Skills CLI (Vercel)

npx skills add BagelHole/DevOps-Security-Agent-Skills --skill terraform-aws -a claude-code

2Manually: put the files in place

~/.claude/skills/terraform-aws/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/terraform-aws/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about terraform-aws

How do I install terraform-aws in Claude Code?

Run npx skills add BagelHole/DevOps-Security-Agent-Skills --skill terraform-aws -a claude-code in your terminal. This downloads the skill manifest directly into your agent directory.

What does the terraform-aws skill do?

It provides reference patterns and best practices for writing Terraform configurations for AWS. It covers provider blocks, state management, module imports, and execution commands.

What is required before using this skill to deploy resources?

You need an active AWS account, proper IAM permissions, and a preconfigured bucket for remote state locking.

Source text

SKILL.md · MIT
---
name: terraform-aws
description: Provision AWS infrastructure with Terraform. Create modules, manage state, and implement IaC best practices. Use when deploying AWS resources declaratively.
license: MIT
metadata:
  author: devops-skills
  version: "1.0"
---

# Terraform AWS

Provision and manage AWS infrastructure with Terraform.

## Provider Configuration

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

provider "aws" {
  region = var.region
  
  default_tags {
    tags = {
      Environment = var.environment
      ManagedBy   = "terraform"
    }
  }
}
```

## Example Resources

```hcl
resource "aws_vpc" "main" {
  cidr_block           = "10.0.0.0/16"
  enable_dns_hostnames = true
  
  tags = { Name = "main-vpc" }
}

resource "aws_instance" "web" {
  ami           = data.aws_ami.amazon_linux.id
  instance_type = "t3.micro"
  subnet_id     = aws_subnet.public.id
  
  tags = { Name = "web-server" }
}
```

## Modules

```hcl
module "vpc" {
  source = "terraform-aws-modules/vpc/aws"
  
  name = "my-vpc"
  cidr = "10.0.0.0/16"
  
  azs             = ["us-east-1a", "us-east-1b"]
  private_subnets = ["10.0.1.0/24", "10.0.2.0/24"]
  public_subnets  = ["10.0.101.0/24", "10.0.102.0/24"]
  
  enable_nat_gateway = true
}
```

## Commands

```bash
terraform init
terraform plan -out=plan.tfplan
terraform apply plan.tfplan
terraform destroy
```

## Best Practices

- Use remote state with locking
- Implement module structure
- Use workspaces or separate states per environment
- Pin provider versions
- Use data sources for AMIs

## Related Skills

- [aws-vpc](../aws-vpc/) - VPC networking
- [aws-iam](../aws-iam/) - IAM policies

© devops-skills · MIT · BagelHole/DevOps-Security-Agent-Skills

Similar skills

Everything for DevOps and infrastructure →

From the same set127

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor