home / skills / partme-ai / full-stack-skills / terraform
This skill helps you define and manage infrastructure with Terraform, including resources, modules, state, and provider integration across clouds.
npx playbooks add skill partme-ai/full-stack-skills --skill terraformReview the files below or copy the command above to add this skill to your agents.
---
name: terraform
description: Provides comprehensive guidance for Terraform infrastructure as code including resource definition, state management, modules, and cloud provider integration. Use when the user asks about Terraform, needs to define infrastructure as code, manage cloud resources, or work with Terraform modules.
license: Complete terms in LICENSE.txt
---
## When to use this skill
Use this skill whenever the user wants to:
- [待完善:根据具体工具添加使用场景]
## How to use this skill
[待完善:根据具体工具添加使用指南]
## Best Practices
[待完善:根据具体工具添加最佳实践]
## Keywords
[待完善:根据具体工具添加关键词]
This skill provides comprehensive, practical guidance for using Terraform to define, deploy, and manage infrastructure as code. It covers resource definitions, state management, module design, and integration with major cloud providers. The guidance is pragmatic and focused on real-world patterns for maintainable, secure, and reproducible infrastructure.
The skill inspects your infrastructure goals and suggests Terraform configurations, module layouts, and state handling strategies tailored to your cloud provider. It explains provider blocks, resource syntax, variables, outputs, workspaces, and remote state backends, and recommends commands and workflows for plan/apply cycles. It also helps diagnose common Terraform errors and suggests fixes for drift, dependency issues, and state corruption.
Can this skill help with Terraform state corruption?
Yes. It outlines safe recovery steps: backup state, inspect remote state, use state rm/mv/import cautiously, and restore from snapshots when necessary.
How do I structure modules for multiple environments?
Use small, single-purpose modules and compose them in environment-specific root configurations. Pass environment differences via variables and keep state isolated per environment/backend.