# Devops Terraform Iac

> Design infrastructure as code — Terraform / Pulumi / CloudFormation — for reproducible, version-controlled, auditable cloud infrastructure.

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

---


## Contract

- **Input:** infrastructure requirements (compute, storage, network, identity, policies).
- **Output:** IAC module definitions + state rules + policy checklist.
- **Side effects:** may create resources when executed (plan/apply).
- **Dependencies:** cloud provider access (AWS / GCP / Azure / local).
- **Stop condition:** definitions and rules saved.
- **Risk:** medium — IAC errors cause outages or data loss; requires testing (terraform plan / dry-run).
- **Boundary:** defines infrastructure; execution requires explicit approval and testing.

# Infrastructure as Code Design

Design **reproducible infrastructure** — compute, network, storage, identity — with version control, state management, and policy enforcement.

## Process

### 1. Define requirements
- Compute: instances / containers / serverless / managed Kubernetes.
- Storage: object, block, database, cache, archive.
- Network: VPC, subnets, load balancers, DNS, CDN, VPN, private links.
- Identity: IAM roles, service accounts, SSO integration.

**Completion criterion:** requirements list saved.

### 2. Design modules
- **Module** per concern: compute module, network module, storage module, identity module.
- Each module defines resources, variables, outputs.
- Composition: root module calls sub-modules with variables.

**Completion criterion:** module tree saved.

### 3. State management
- Remote backend (S3 / GCS / Azure Storage with locking).
- State encryption (at rest / in transit).
- State isolation per environment (workspaces / separate state files).
- State versioning / backup.

**Completion criterion:** state rules saved.

### 4. Policy enforcement
- IAM: least-privilege roles; no root/admin by default; service-specific roles.
- Network: default-deny; allow only required ports / sources; private subnets for databases.
- Encryption: at rest (AES-256) and in transit (TLS 1.3); key management.
- Compliance: GDPR / SOC2 / HIPAA / ISO 27001 rules mapped to controls.

**Completion criterion:** policy checklist filled.

### 5. Deliver
Module definitions (HCL / TypeScript / YAML) + state rules + policy checklist + plan example (terraform plan output or equivalent).

