When to use this skill
Use this skill whenever the user wants to:
- Write or debug Terraform configuration files (
.tf) - Manage cloud infrastructure (AWS, Azure, GCP, Alibaba Cloud, etc.)
- Configure Terraform providers, resources, data sources
- Manage Terraform state, modules, workspaces
How to use this skill
- Configuration files: HCL syntax defines provider, resource, variable, output, module.
- Workflow:
terraform init→terraform plan→terraform apply→terraform destroy。 - State management: Local or remote (S3 + DynamoDB, Azure Blob, Alibaba Cloud OSS, etc.).
- Modules: Reuse infrastructure templates, version-controlled management.
Best Practices
- Use remote state instead of local state to avoid state file conflicts. -Use variables or environment variables for sensitive information, do not hardcode in .tf files.
- Use
terraform fmtto format code,terraform validateto check syntax. - Use workspace or environment isolation in production environments.
Keywords
terraform, iac, infrastructure as code, hcl, aws, azure, gcp, aliyun, infrastructure as code, cloud resource management