| name | terraform-infrastructure |
| description | Terraform is an Infrastructure as Code (IaC) tool that allows you to Use when this capability is needed. |
| metadata | {"author":"AmnadTaowsoam"} |
Terraform Infrastructure
Skill Profile
(Select at least one profile to enable specific modules)
Overview
Terraform is an Infrastructure as Code (IaC) tool that allows you to define and provision cloud infrastructure. This skill covers Terraform basics, providers, resources, modules, state management, remote state, workspaces, and best practices for building reproducible, scalable infrastructure.
Why This Matters
Terraform is critical for modern infrastructure because it:
- Enables Infrastructure as Code for reproducible deployments
- Provides version control for infrastructure changes
- Supports multiple providers (AWS, Azure, GCP, etc.)
- Implements state management for tracking resources
- Enables collaboration through shared state
- Provides planning before applying changes
- Supports modules for reusable infrastructure components
Core Concepts
| Concept | Description |
|---|
| Provider | Plugin for managing resources (AWS, Azure, GCP) |
| Resource | Infrastructure component to manage |
| Variable | Input parameters for configuration |
| Output | Values returned after apply |
| Module | Reusable collection of resources |
| State | Mapping of resources to configuration |
| Workspace | Separate state for different environments |
Inputs / Outputs / Contracts
Skill Composition
Quick Start / Implementation Example
- Review requirements and constraints
- Set up development environment
- Implement core functionality following patterns
- Write tests for critical paths
- Run tests and fix issues
- Document any deviations or decisions
def example_function():
pass
Assumptions
- Cloud provider account is configured with appropriate permissions
- Terraform CLI is installed
- Network connectivity to cloud provider APIs
- Team has basic understanding of cloud infrastructure
- Version control system (Git) is available
Compatibility & Prerequisites
- Supported Versions:
- Python 3.8+
- Node.js 16+
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Required AI Tools:
- Code editor (VS Code recommended)
- Testing framework appropriate for language
- Version control (Git)
- Dependencies:
- Language-specific package manager
- Build tools
- Testing libraries
- Environment Setup:
.env.example keys: API_KEY, DATABASE_URL (no values)
Test Scenario Matrix (QA Strategy)
| Type | Focus Area | Required Scenarios / Mocks |
|---|
| Unit | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |
| Integration | DB / API | All external API calls or database connections must be mocked during unit tests |
| E2E | User Journey | Critical user flows to test |
| Performance | Latency / Load | Benchmark requirements |
| Security | Vuln / Auth | SAST/DAST or dependency audit |
| Frontend | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |
Technical Guardrails & Security Threat Model
1. Security & Privacy (Threat Model)
- Top Threats: Injection attacks, authentication bypass, data exposure
2. Performance & Resources
3. Architecture & Scalability
4. Observability & Reliability
Agent Directives
When using Terraform:
- Always run
terraform init before other commands
- Validate configuration with
terraform validate
- Review plan with
terraform plan before applying
- Use remote state for team collaboration
- Encrypt sensitive data in state
- Use modules for reusable infrastructure
- Document all changes in commit messages
Definition of Done (DoD) Checklist
Anti-patterns
- Hardcoding Values: Not using variables for configuration
- No Remote State: Using local state for team collaboration
- No State Locking: Multiple users modifying state simultaneously
- Ignoring State Drift: Not refreshing state regularly
- Large Monolithic Files: Not using modules for organization
- Manual Changes: Modifying resources outside Terraform
Reference Links & Examples
- Internal documentation and examples
- Official documentation and best practices
- Community resources and discussions
Versioning & Changelog
- Version: 1.0.0
- Changelog:
- 2026-02-22: Initial version with complete template structure
Source: AmnadTaowsoam/CerebraSkills — distributed by TomeVault.