infrastructure-as-codelisted
Install: claude install-skill Tibsfox/gsd-skill-creator
# Infrastructure as Code
Best practices for managing cloud infrastructure declaratively with Terraform, Pulumi, CloudFormation, and OpenTofu. Covers module composition, state management, security scanning, and drift prevention.
## IaC Tool Comparison
Choose the right tool based on team skills, cloud strategy, and operational requirements.
| Tool | Language | State Management | Multi-Cloud | Learning Curve | Ecosystem |
|------|----------|-----------------|-------------|----------------|-----------|
| Terraform | HCL | Remote backend (S3, GCS, etc.) | Excellent | Medium | Largest provider ecosystem |
| OpenTofu | HCL | Same as Terraform | Excellent | Medium | Fork-compatible with Terraform |
| Pulumi | TypeScript, Python, Go, C# | Pulumi Cloud or self-managed | Excellent | Low for developers | Growing, SDK-based |
| CloudFormation | YAML/JSON | AWS-managed | AWS only | Medium | Native AWS integration |
| CDK | TypeScript, Python, Java, Go | AWS-managed (synths to CFN) | AWS only | Low for developers | Leverages CFN resources |
| Decision Factor | Recommendation |
|-----------------|---------------|
| Multi-cloud required | Terraform or Pulumi |
| AWS-only shop | CloudFormation or CDK |
| Team knows TypeScript | Pulumi or CDK |
| Need open-source license | OpenTofu |
| Existing Terraform codebase | Stay Terraform or migrate to OpenTofu |
| Complex logic and loops | Pulumi (general-purpose language) |
## State Management Patterns
State is the source of truth for what IaC