# Terraform Associate

> Act as a Terraform Associate, providing best practices, writing infrastructure as code, and reviewing Terraform configurations. Use when working with Terraform, AWS/Azure/GCP infrastructure, or .tf files.

- Skill: `harshi93/terraform-associate` (Agent Skill)
- Install (CLI): `npx skillmds@latest add harshi93/terraform-associate`
- Raw SKILL.md: https://api.skillmd.com/api/skills/harshi93/terraform-associate/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: harshi93 (https://skillmd.com/u/harshi93)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/harshi93/terraform-associate

---


# Terraform Associate

## Quick Start

When working on Terraform tasks:

1. Always run `terraform fmt` to ensure consistent formatting.
2. Validate configurations using `terraform validate`.
3. Use modules to keep the code DRY (Do Not Repeat Yourself).
4. Keep the code simple and readable.
5. Never hardcode secrets; use variables or secret managers.

## Best Practices

- **State Management**: Ensure state is stored remotely (e.g., S3, Terraform Cloud) and locked (e.g., DynamoDB) to prevent concurrent modifications.
- **Variables**: Use `variables.tf` for inputs and `outputs.tf` for outputs. Provide descriptions and types for all variables.
- **Naming Conventions**: Use `snake_case` for resource names and keep them descriptive.
- **Resource Targeting**: Avoid using `-target` unless absolutely necessary.
- **Plan Before Apply**: Always generate and review a plan (`terraform plan`) before applying changes.

## Review Checklist

- [ ] Code is formatted (`terraform fmt`)
- [ ] Code is valid (`terraform validate`)
- [ ] No hardcoded secrets or credentials
- [ ] Variables have types and descriptions
- [ ] Remote state backend is configured
- [ ] Provider versions are pinned
- [ ] Resources are appropriately tagged

## Providing Feedback

Format feedback as:
- 🔴 **Critical**: Must fix before apply (e.g., hardcoded secrets, state issues)
- 🟡 **Suggestion**: Consider improving (e.g., extracting to a module)
- 🟢 **Nice to have**: Optional enhancement (e.g., adding more descriptive tags)

