mcpField
T
terraform

terraform

github.com/full-stack-skillsCloud & DevOps191 installsUpdated 4w ago
Repository

About terraform

A skill for writing and debugging Terraform configuration and managing cloud infrastructure. It covers HCL, providers, state, modules, and workspaces.

Key features

  1. 01Write and debug .tf files
  2. 02Configure providers, resources, and data sources
  3. 03Manage state, modules, and workspaces
  4. 04Use the init, plan, apply, destroy workflow
  5. 05Format and validate configuration

Use cases

  1. 01Manage AWS, Azure, GCP, or Alibaba Cloud resources
  2. 02Reuse and version infrastructure templates
  3. 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 terraform

After installing, type/terraformin Claude Code to confirm it loaded.

Bundled filesagents/openai.yamlLICENSE.txt

Details

From the project README

When 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

  1. 配置文件:HCL 语法定义 provider、resource、variable、output、module。
  2. 工作流:terraform init → terraform plan → terraform apply → terraform destroy。
  3. State 管理:本地或远程( S3 + DynamoDB、Azure Blob、阿里云 OSS 等)。
  4. 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