К основному содержанию
скилл CX Codex

terraform-tasks — скилл для Claude Code: что делает и как установить

Скилл terraform-tasks для автономной работы с Terraform: генерирует код инфраструктуры, собирает CI/CD-пайплайны, мигрирует ресурсы в state и чинит проблемы версий.

MIT 155 установок ★ 66 обновлён 2026-06-18

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add JosiahSiegel/claude-plugin-marketplace --skill terraform-tasks -a claude-code
Открыть на GitHub

Что делает terraform-tasks

Скилл умеет писать готовые конфигурации для любого провайдера — с переменными, валидацией и выводами; обновлять версии провайдеров и Terraform с учётом breaking changes; импортировать существующие ресурсы через terraform import; собирать пайплайны для GitHub Actions, Azure DevOps и GitLab CI с многоступенчатым деплоем и проверкой дрифта; запускать tfsec и Checkov, исправлять найденные уязвимости. Для Windows требует обратные слэши в путях к файлам.

Включается автоматически при работе с terraform init, plan, apply, destroy, workspace, при настройке remote state (S3, Azure Storage, Terraform Cloud), блокировках через DynamoDB, управлении версиями в required_version и required_providers, использовании -target и -replace, соглашениях по .tfvars для окружений.

Агент сам определяет версию Terraform и провайдеров, платформу и CI-окружение, ищет актуальную документацию через веб-поиск, генерирует полный код с комментариями, запускает terraform fmt и проверяет синтаксис.

Какие задачи решает

  • Написать Terraform-модуль для AWS VPC с трёхуровневой архитектурой и NAT-шлюзами
  • Обновить провайдер AzureRM с версии 2.x до 3.x без простоев
  • Импортировать существующие ресурсы Azure в state и сгенерировать соответствующий код
  • Собрать GitHub Actions workflow для Terraform с пошаговым деплоем и отслеживанием дрифта
  • Запустить tfsec и устранить все критичные находки в конфигурации

Примеры запросов агенту

  • Создай Azure Storage Account с приватными эндпоинтами и ключами, управляемыми клиентом
  • Обнови все провайдеры до последних совместимых версий и покажи changelog
  • Импортируй ресурсы из группы rg-prod в Terraform state и создай под них .tf-файлы

Как установить terraform-tasks

1Через Skills CLI (Vercel)

npx skills add JosiahSiegel/claude-plugin-marketplace --skill terraform-tasks -a claude-code

2Вручную: положить файлы

~/.claude/skills/terraform-tasks/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/terraform-tasks/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о terraform-tasks

Как установить terraform-tasks в Claude Code?

Выполни npx skills add JosiahSiegel/claude-plugin-marketplace --skill terraform-tasks -a claude-code, затем проверь файл ~/.claude/skills/terraform-tasks/SKILL.md.

Что делает terraform-tasks?

Генерирует инфраструктурный код для любого провайдера, собирает CI/CD-пайплайны, мигрирует ресурсы через import, обновляет версии с учётом breaking changes, запускает сканеры безопасности и исправляет найденные проблемы.

Какие провайдеры поддерживает terraform-tasks?

Работает с любым провайдером Terraform: AWS, Azure, GCP и остальными. Агент сам ищет актуальную документацию и учитывает breaking changes при обновлении версий.

Исходный текст

SKILL.md · MIT
---
name: terraform-tasks
description: |
  Terraform task patterns — common workflows and pipeline steps.
  PROACTIVELY activate for: (1) terraform init/plan/apply/destroy workflows, (2) terraform fmt and validate in CI, (3) workspace management (terraform workspace), (4) remote state backends (Azure Storage, S3, Terraform Cloud), (5) state locking and DynamoDB locks, (6) terraform import for existing resources, (7) terraform refresh and drift detection, (8) -target and -replace use cases, (9) version pinning (required_version, required_providers), (10) tfvars file conventions for environments.
  Provides: workflow templates, backend configuration examples, state-locking setup, import recipes, and CI pipeline patterns.
---

<!--
Progressive Disclosure References:
- references/aws-provider-6.md - AWS Provider 6.0 breaking changes and migration
- references/azurerm-4.md - AzureRM 4.x features and migration
- references/ephemeral-values.md - Terraform 1.10+ ephemeral values for secrets
- references/terraform-stacks.md - Terraform Stacks (GA 2025) reference
-->

# Terraform Tasks Skill

## 🚨 CRITICAL GUIDELINES

### Windows File Path Requirements

**MANDATORY: Always Use Backslashes on Windows for File Paths**

When using Edit or Write tools on Windows, you MUST use backslashes (`\`) in file paths, NOT forward slashes (`/`).

**Examples:**
- ❌ WRONG: `D:/repos/project/file.tsx`
- ✅ CORRECT: `D:\repos\project\file.tsx`

This applies to:
- Edit tool file_path parameter
- Write tool file_path parameter
- All file operations on Windows systems

### Documentation Guidelines

**NEVER create new documentation files unless explicitly requested by the user.**

- **Priority**: Update existing README.md files rather than creating new documentation
- **Repository cleanliness**: Keep repository root clean - only README.md unless user requests otherwise
- **Style**: Documentation should be concise, direct, and professional - avoid AI-generated tone
- **User preference**: Only create additional .md files when user specifically asks for documentation



---

This skill enables autonomous execution of complex Terraform tasks with comprehensive provider knowledge and platform awareness.

## Capabilities

### 1. Infrastructure Code Generation

Generate complete, production-ready Terraform code for any cloud provider:

**Process**:
1. Determine provider and version from user context
2. Research latest provider documentation if needed
3. Generate complete configurations with:
   - Provider version constraints
   - Resource configurations
   - Variables with validation
   - Outputs
   - Security best practices
   - Platform-specific considerations

**Example Tasks**:
- "Create Azure Storage Account with private endpoints and customer-managed keys"
- "Generate AWS VPC with 3-tier architecture and NAT gateways"
- "Build GCP GKE cluster with Workload Identity and node pools"

### 2. Version Management

Handle Terraform and provider version upgrades:

**Process**:
1. Check current versions
2. Research changelogs and breaking changes
3. Propose upgrade path
4. Generate migration code
5. Provide testing strategy

**Example Tasks**:
- "Upgrade from AzureRM provider 2.x to 3.x"
- "Migrate Terraform 0.12 code to 1.x"
- "Update all providers to latest compatible versions"

### 3. Debugging and Troubleshooting

Diagnose and fix Terraform issues:

**Process**:
1. Gather diagnostic information
2. Analyze error messages and logs
3. Identify root cause
4. Provide platform-specific solution
5. Suggest preventive measures

**Example Tasks**:
- "Debug state lock timeout on Windows"
- "Fix provider authentication failure in Azure DevOps pipeline"
- "Resolve circular dependency in module structure"

### 4. Security Scanning and Remediation

Scan and fix security issues:

**Process**:
1. Run security scanners (tfsec, Checkov)
2. Analyze findings
3. Prioritize issues
4. Generate fixes
5. Explain security implications

**Example Tasks**:
- "Run tfsec and fix all HIGH severity issues"
- "Ensure all S3 buckets have encryption enabled"
- "Implement Azure storage account with all security best practices"

### 5. Architecture Review

Review and improve Terraform architecture:

**Process**:
1. Analyze current structure
2. Identify anti-patterns
3. Propose improvements
4. Generate refactoring plan
5. Document decisions (ADRs)

**Example Tasks**:
- "Review state management strategy for 500+ resources"
- "Design multi-region architecture for high availability"
- "Refactor monolithic state into layered approach"

### 6. CI/CD Pipeline Generation

Create complete CI/CD pipelines:

**Process**:
1. Determine CI/CD platform
2. Understand environment strategy
3. Generate pipeline configuration
4. Include security scanning
5. Add approval gates
6. Implement drift detection

**Example Tasks**:
- "Create Azure DevOps pipeline with multi-stage deployment"
- "Generate GitHub Actions workflow with OIDC authentication"
- "Build GitLab CI pipeline with Terraform Cloud backend"

### 7. Module Development

Create reusable Terraform modules:

**Process**:
1. Design module interface
2. Implement with best practices
3. Add variable validation
4. Generate documentation
5. Create examples
6. Set up testing

**Example Tasks**:
- "Create Azure networking module with hub-spoke pattern"
- "Build AWS ECS module with auto-scaling and ALB"
- "Develop GCP Cloud Run module with custom domains"

### 8. Migration Tasks

Migrate infrastructure to Terraform:

**Process**:
1. Inventory existing resources
2. Generate import commands
3. Create matching Terraform code
4. Validate configurations
5. Test import process
6. Plan cutover strategy

**Example Tasks**:
- "Import existing Azure resources into Terraform"
- "Migrate from CloudFormation to Terraform"
- "Convert ARM templates to Terraform HCL"

## Autonomous Behavior

This skill operates autonomously with minimal user intervention:

### Information Gathering
- Automatically detect Terraform and provider versions
- Identify platform (Windows/Linux/macOS)
- Detect CI/CD environment
- Check for existing configurations

### Research
- Use WebSearch to find current documentation
- Check provider changelogs for breaking changes
- Research best practices
- Find platform-specific solutions

### Code Generation
- Generate complete, working code
- Include all necessary files (main.tf, variables.tf, outputs.tf, etc.)
- Add comprehensive comments
- Follow naming conventions
- Apply security best practices

### Validation
- Run terraform fmt on generated code
- Validate syntax
- Check for security issues
- Test configurations when possible

### Documentation
- Explain architectural decisions
- Document usage examples
- Note version compatibility
- Include troubleshooting tips

## Error Handling

When encountering issues:

1. **Gather Context**: Collect all relevant information
2. **Research**: Look up error messages and solutions
3. **Platform Awareness**: Consider OS-specific issues
4. **Multiple Solutions**: Provide alternatives when available
5. **Prevention**: Suggest how to avoid similar issues

## Platform-Specific Considerations

### Windows
- PowerShell syntax for commands
- Path handling (backslashes)
- Line ending considerations
- Execution policy issues
- Credential management

### Linux/macOS
- Bash syntax for commands
- File permissions
- Package managers
- Environment variables

### CI/CD Environments
- Pipeline-specific syntax
- Agent capabilities
- Authentication methods
- Artifact handling

## Quality Standards

All generated Terraform code must:
- Be properly formatted (terraform fmt)
- Pass validation (terraform validate)
- Include security best practices
- Have comprehensive variable validation
- Include meaningful descriptions
- Follow naming conventions
- Be version-compatible
- Include usage examples
- Have proper output definitions

## Provider Expertise

### Azure (AzureRM)
- All resource types
- AzAPI for preview features
- Service endpoints and private endpoints
- Managed identities
- RBAC and policies

### AWS
- All services
- IAM roles and policies
- VPC networking
- S3 backend configuration
- Cross-account deployments

### Google Cloud
- All GCP services
- IAM and service accounts
- VPC and networking
- GCS backend configuration
- Organization and folder policies

### Community Providers
- Kubernetes and Helm
- Datadog, PagerDuty
- GitHub, GitLab
- HashiCorp Vault
- And more...

## Examples

### Example 1: Generate Azure Storage Account

**User Request**: "Create an Azure Storage Account with all security best practices"

**Skill Actions**:
1. Detect/ask for AzureRM provider version
2. Research latest security requirements
3. Generate complete configuration:
   - Storage account with secure settings
   - Private endpoint
   - Diagnostic settings
   - Customer-managed encryption keys
   - Network rules
   - Variables with validation
   - Outputs
4. Include usage examples
5. Add security scanner ignore comments where appropriate with explanations

### Example 2: Debug Plan Failure

**User Request**: "My terraform plan is failing with authentication error on Windows"

**Skill Actions**:
1. Ask for error details
2. Identify it's Azure CLI authentication
3. Provide Windows-specific solution:
   - PowerShell commands to check authentication
   - How to refresh credentials
   - Environment variable configuration
   - Alternative authentication methods
4. Explain root cause
5. Suggest prevention

### Example 3: Architecture Review

**User Request**: "Review my Terraform structure, I have 1000+ resources in one state file"

**Skill Actions**:
1. Analyze current structure
2. Identify issues:
   - Large state file
   - Slow operations
   - Large blast radius
3. Propose layered architecture:
   - Split into foundation/platform/apps
   - Separate state files
   - Remote state data sources
4. Generate migration plan
5. Create ADR documenting decision
6. Provide implementation steps

## Integration with terraform-expert Agent

This skill works in tandem with the terraform-expert agent:
- Agent provides strategic guidance
- Skill executes tactical tasks
- Agent validates skill outputs
- Skill reports back to agent

Use this skill when you need to autonomously execute Terraform tasks with comprehensive provider knowledge and platform awareness.

© JosiahSiegel · MIT · JosiahSiegel/claude-plugin-marketplace

Похожие скиллы

Все скиллы по теме «DevOps и инфраструктура» →
terraform-module-library Seth Hobson Скилл terraform-module-library для Claude Code, помогающий писать переиспользуемые модули Terraform под AWS, Azure, GCP и OCI. Структурирует модули, предлагает готовые шаблоны и задаёт правила версионирования, валидации и тестирования. CX Codex +1 15 615установок terraform-engineer VoltAgent Community Субагент terraform-engineer для проектирования и рефакторинга инфраструктуры на Terraform. Помогает собирать переиспользуемые модули, настраивать бэкенд и проверять безопасность multi-cloud окружений. CX Codex 328установок TerraVision patrickchugh MCP-сервер TerraVision рисует диаграммы облачной архитектуры по Terraform-коду или промпту, используя официальные иконки AWS, Azure и GCP. Работает локально без доступа к облаку. CX Codex +1 ★ 1 698звёзд репо terraform-infrastructure aj-geddes Скилл terraform-infrastructure для Claude Code направляет агента при настройке облачной инфраструктуры через Terraform с модулями и удалённым стейтом. Выкатывает окружения dev, staging и prod. CX Codex +1 1 200установок terraform Mindrally Задаёт агенту правила написания кода Terraform: структурирование файлов, блокировку стейта и хранение секретов в облаках AWS или GCP. CX Codex +1 750установок cloud-architect davila7 Скилл cloud-architect для Claude, который помогает проектировать инфраструктуру в AWS, Azure и GCP: Terraform, CDK, стоимость, безопасность. CX Codex +1 157установок

Из того же набора96

Весь набор →
plugin-master Скилл plugin-master помогает проектировать, валидировать и публиковать плагины для Claude Code со всеми манифестами, хуками и агентами. CX Codex +1 158установок deployment-stacks-2025 Скилл deployment-stacks-2025 помогает проектировать и разбирать Azure Deployment Stacks: защиту ресурсов, очистку при удалении из шаблона и команды Azure CLI. CX Codex +1 157установок advanced-patterns Скилл advanced-patterns для Claude Code содержит шаблоны сложных запросов T-SQL для SQL Server и Azure SQL — от рекурсивных CTE до темпоральных таблиц. CX Codex +1 157установок microsoft-guide Скилл microsoft-guide для Claude Code помогает находить рекомендации Microsoft по архитектуре .NET-микросервисов. Он включается при вопросах о DDD, CQRS, интеграционных событиях и развёртывании. CX Codex +1 157установок data-cloud-2025 Скилл data-cloud-2025 для Claude Code содержит архитектурные шаблоны Salesforce Data Cloud для проектирования потоков данных, объединения профилей и активации сегментов в CRM. CX Codex +1 155установок advanced-array-patterns Скилл advanced-array-patterns для Claude Code собирает шаблоны работы с массивами Bash: индексированные и ассоциативные массивы, mapfile, срезы и безопасная обработка при set -u. CX Codex +1 155установок ffmpeg-noise-reduction Скилл ffmpeg-noise-reduction для Claude Code — справочник по фильтрам FFmpeg для шумного видео и звука: помогает выбрать фильтр и параметры под тип помех. CX Codex +1 150установок cloudflare-knowledge Скилл cloudflare-knowledge для Claude Code открывает справочные файлы о Workers, Pages, R2, D1, Workers AI и Zero Trust для настройки Cloudflare. CX Codex +1 139установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой