terraform-skill

Guide Terraform and OpenTofu module development, testing, and CI/CD integration.

1|1|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/dtsong/claude-code-windows-setup --skill terraform-skill-dtsong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-skill
Source: https://github.com/dtsong/claude-code-windows-setup/tree/main/skills/terraform-skill
Command: npx skills add https://github.com/dtsong/claude-code-windows-setup --skill terraform-skill-dtsong

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance and best practices for writing, testing, and deploying Terraform and OpenTofu code, ensuring robust, secure, and maintainable infrastructure.

Core Features & Use Cases

  • Module Development: Learn to structure reusable modules with clear inputs, outputs, and documentation.
  • Testing Strategies: Implement static analysis, native tests (1.6+), and Terratest for reliable IaC validation.
  • CI/CD Integration: Automate your infrastructure deployments with secure and cost-optimized pipelines.
  • Security & Compliance: Harden your infrastructure with scanning tools and best practices.
  • Use Case: When starting a new Terraform module, use this Skill to get guidance on structure, variable design, testing approaches, and CI/CD setup, ensuring it follows industry best practices from the start.

Quick Start

Use the terraform skill to create a new Terraform module for an AWS S3 bucket with versioning and encryption.

Frequently Asked Questions about terraform-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a reusable Terraform module with clear inputs and outputs?

Structuring reusable Terraform modules involves defining clear variable inputs, output values, and documentation. Following infrastructure-as-code best practices ensures your modules remain maintainable and robust for deployment.

What's the best way to test Terraform and OpenTofu infrastructure as code?

Testing Terraform and OpenTofu effectively requires implementing static analysis, native testing frameworks (1.6+), and Terratest. This multi-layered strategy provides reliable validation for your infrastructure as code.

Does OpenTofu work with the same CI/CD integration and security compliance tools as Terraform?

OpenTofu works with the same CI/CD integration and security compliance tools as Terraform. You can automate infrastructure deployments and harden security using scanning tools like trivy and checkov across both platforms.

How do I automate Terraform deployments with secure and cost-optimized CI/CD pipelines?

Automating Terraform deployments requires integrating your infrastructure as code into CI/CD pipelines. This process ensures secure state management and cost-optimized infrastructure delivery through automated validation.

When do I need static analysis tools like trivy and checkov for Terraform state management?

You need static analysis tools like trivy and checkov for Terraform state management when hardening infrastructure security and ensuring compliance. These tools scan your infrastructure as code to prevent vulnerabilities before deployment.