Terraform tasks

From JosiahSiegel/claude-plugin-marketplace · View interactive version

Terraform tasks is an AI agent skill from the GitHub repository JosiahSiegel/claude-plugin-marketplace. 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 lo

How to use this skill

Skill file

<!--

Progressive Disclosure References:

-->

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:

This applies to:

Documentation Guidelines

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


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:

Example Tasks:

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:

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:

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:

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:

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:

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:

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:

Autonomous Behavior

This skill operates autonomously with minimal user intervention:

Information Gathering

Research

Code Generation

Validation

Documentation

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

Linux/macOS

CI/CD Environments

Quality Standards

All generated Terraform code must:

Provider Expertise

Azure (AzureRM)

AWS

Google Cloud

Community Providers

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:
  1. Include usage examples
  2. 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:
  1. Explain root cause
  2. 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:
  1. Propose layered architecture:
  1. Generate migration plan
  2. Create ADR documenting decision
  3. Provide implementation steps

Integration with terraform-expert Agent

This skill works in tandem with the terraform-expert agent:

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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.