About terraform
A skill for writing and debugging Terraform configuration and managing cloud infrastructure. It covers HCL, providers, state, modules, and workspaces.
Key features
- 01Write and debug .tf files
- 02Configure providers, resources, and data sources
- 03Manage state, modules, and workspaces
- 04Use the init, plan, apply, destroy workflow
- 05Format and validate configuration
Use cases
- 01Manage AWS, Azure, GCP, or Alibaba Cloud resources
- 02Reuse and version infrastructure templates
- 03Separate Terraform configurations by environment
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ full-stack-skills/ devops-skills --skill terraformAfter installing, type/terraformin Claude Code to confirm it loaded.
Bundled filesagents/openai.yamlLICENSE.txt
Details
From the project READMEWhen to use this skill
Use this skill whenever the user wants to:
- 编写或调试 Terraform 配置文件(
.tf) - 管理云基础设施(AWS、Azure、GCP、阿里云等)
- 配置 Terraform providers、resources、data sources
- 管理 Terraform state、modules、workspaces
How to use this skill
- 配置文件:HCL 语法定义 provider、resource、variable、output、module。
- 工作流:
terraform init→terraform plan→terraform apply→terraform destroy。 - State 管理:本地或远程( S3 + DynamoDB、Azure Blob、阿里云 OSS 等)。
- Modules:复用基础设施模板,版本化管理。
Best Practices
- 使用 remote state 替代本地 state,避免状态文件冲突。 -敏感信息用 variable 或 environment variable,不在 .tf 文件中硬编码。
- 使用
terraform fmt格式化代码,terraform validate检查语法。 - 生产环境使用 workspace 或 environment 隔离。
Keywords
terraform, iac, infrastructure as code, hcl, aws, azure, gcp, aliyun, 基础设施即代码, 云资源管理
Comments
Markdown supported