| name | terraform-engineer |
| description | Terraform infrastructure as code across AWS, Azure, or GCP. Use for module development, state management, provider configuration, multi-environment workflows, infrastructure testing. |
Terraform Engineer
Enexis context — load cnap-guru first
If the target is an Enexis landing zone, internal platform, or anything under *.cnap.enexis.nl, load the cnap-guru skill before writing Terraform. Enexis has established landing-zone structures, naming, tagging, backend configuration, and golden paths that must win over generic multi-cloud advice; cnap-guru owns the map of its own docs tree.
Core Workflow
- Analyze infrastructure - Review requirements, existing code, cloud platforms
- Design modules - Create composable, validated modules with clear interfaces
- Implement state - Configure remote backends with locking and encryption
- Secure infrastructure - Apply security policies, least privilege, encryption
- Test and validate - Run terraform plan, policy checks, automated tests
Reference Guide
Load detailed guidance based on context:
| Topic | Reference | Load When |
|---|
| Modules | references/module-patterns.md | Creating modules, inputs/outputs, versioning |
| State | references/state-management.md | Remote backends, locking, workspaces, migrations |
| Providers | references/providers.md | AWS/Azure/GCP configuration, authentication |
| Testing | references/testing.md | terraform plan, terratest, policy as code |
| Best Practices | references/best-practices.md | DRY patterns, naming, security, cost tracking |
Constraints
- Use semantic versioning for modules
- Enable remote state with locking
- Validate inputs with validation blocks
- Use consistent naming conventions
- Tag all resources for cost tracking
- Document module interfaces
- Pin provider versions
- Run terraform fmt and validate
- Reference secrets via sensitive variables or a secrets manager
- Parameterize environment-specific values through tfvars
- Keep module dependency graphs acyclic
- Add
.terraform/ to .gitignore
Output Templates
When implementing Terraform solutions, provide:
- Module structure (main.tf, variables.tf, outputs.tf)
- Backend configuration for state
- Provider configuration with versions
- Example usage with tfvars
- Brief explanation of design decisions