# iac-data-engineering-terraform

A skill with ready Terraform patterns for data engineering: S3 buckets, EC2 instances and IAM roles. Useful when you need to stand up pipeline infrastructure declaratively.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1800 installs · ★ 5
- Author: reason-machines
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/data-skills/tree/HEAD/skills/iac-data-engineering-terraform/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/iac-data-engineering-terraform

## What it does

The skill hands your agent a set of HCL patterns for AWS. It covers an S3 bucket with versioning and a lifecycle rule that moves objects to GLACIER after 90 days and expires them at 365. There is also an EC2 instance for data processing whose `user_data` installs `python3`, `pandas`, `boto3` and `awscli`, plus a security group and an IAM role that reaches S3 through an instance profile.

The layout is split across `main.tf`, `variables.tf` and `outputs.tf`. Variables carry the region, environment, instance type and bucket name prefix. Commands use the `-chdir=terraform` flag, from `init` and `validate` through `plan`, `apply` and `destroy`. Targeted teardown via `-target` is in there too.

You need Terraform itself, the AWS CLI and working credentials: either `aws configure` or the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_DEFAULT_REGION` variables. The sample security group opens SSH port 22 to `0.0.0.0/0`, and the code comment says to restrict that in production. Fix it before your first `apply` — otherwise the instance is reachable from anywhere.

## Requirements
- Works with: Terraform, AWS

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/data-skills --skill iac-data-engineering-terraform -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/iac-data-engineering-terraform/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/iac-data-engineering-terraform/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/data-skills --skill iac-data-engineering-terraform -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/iac-data-engineering-terraform/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/data-skills --skill iac-data-engineering-terraform -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/iac-data-engineering-terraform/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/data-skills iac-data-engineering-terraform
```

2. **Manually: put the files in place**
- File: `.github/skills/iac-data-engineering-terraform/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/data-skills --skill iac-data-engineering-terraform -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/data-skills --path skills/iac-data-engineering-terraform
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/iac-data-engineering-terraform/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/data-skills --skill iac-data-engineering-terraform -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/data-skills/tree/HEAD/skills/iac-data-engineering-terraform/SKILL.md

## When to use it
- stand up an S3 bucket for data storage with versioning
- define an EC2 instance with the packages your processing needs
- grant the instance S3 access through an IAM role instead of hardcoded keys
- set object lifecycle rules for archiving and expiry
- split a Terraform config into variables and outputs

## Example prompts
- create a terraform config for S3 and EC2 for a data pipeline
- add an IAM role with bucket access and attach it to the instance
- show me what will change before applying — run plan

## Similar
- [terraform-aws](https://affpapa.org/en/nevibecode/skills/terraform-aws.md) — skill · 387 installs
- [terraform-engineer](https://affpapa.org/en/nevibecode/agents/terraform-engineer.md) — subagent · 328 installs
- [setting-up-ec2-instance-profiles](https://affpapa.org/en/nevibecode/skills/setting-up-ec2-instance-profiles.md) — skill · 6200 installs
- [terraform-search-import](https://affpapa.org/en/nevibecode/skills/terraform-search-import.md) — skill · 4900 installs
- [terraform-infrastructure](https://affpapa.org/en/nevibecode/skills/terraform-infrastructure.md) — skill · 1200 installs
- [terraform-diagrams](https://affpapa.org/en/nevibecode/skills/terraform-diagrams.md) — skill · 745 installs

From the same set: [reason-machines/data-skills](https://affpapa.org/en/nevibecode/by/reason-machines/data-skills.md) — 22 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
