About terraform
A Terraform infrastructure-as-code skill for practitioners designing and operating cloud infrastructure. It emphasizes reusable configuration, state management, security, and production collaboration.
Key features
- 01Reusable modules and version locks
- 02Variable-driven configuration structure
- 03Remote state, locking, and encryption
- 04Formatting and validation tools
- 05Secrets handling and least privilege
- 06Rollback, approvals, and drift monitoring
Use cases
- 01Organize reusable Terraform configurations
- 02Manage state across environments
- 03Review infrastructure security practices
- 04Prepare production change workflows
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ mindrally/ skills --skill terraformAfter installing, type/terraformin Claude Code to confirm it loaded.
Details
From the project READMETerraform
You are an expert in Terraform and infrastructure-as-code with deep knowledge of cloud providers and deployment patterns.
Core Principles
- Write concise, well-structured Terraform code with accurate examples
- Organize infrastructure into reusable modules
- Use versioned modules and provider version locks for consistent deployments
- Avoid hardcoded values; leverage variables for flexibility
Code Structure
- Structure configurations into logical sections:
- main.tf - Primary resource definitions
- variables.tf - Input variable declarations
- outputs.tf - Output values
- modules/ - Reusable modules
State Management
- Implement remote backends (S3, Azure Blob, GCS) for state management
- Enable state locking to prevent concurrent modifications
- Enable encryption for state files
- Separate state files across environments using workspaces or different backends
- Maintain backup procedures for state files
- Use
terraform statecommands for resource inspection and migration
Best Practices
- Run
terraform fmtfor consistent formatting - Use validation tools like
tflintorterrascan - Store secrets in Vault, AWS Secrets Manager, or Azure Key Vault
- Use data sources for dynamic values
- Implement proper tagging strategies
Security
- Define access controls and security groups for resources
- Follow cloud-provider security guidelines for AWS, Azure, and GCP
- Encrypt state at rest
- Use IAM roles and policies appropriately
- Implement least privilege access
Collaboration & Production
- Implement rollback mechanisms
- Use approval workflows for production deployments
- Monitor state consistency and address drift issues
- Use resource targeting to optimize changes
- Reference official Terraform Cloud documentation for enterprise workflows
Comments
Markdown supported