terraform-expert

Advise on Terraform and OpenTofu HCL and IaC patterns.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/brunoldqueiroz/marvin --skill terraform-expert-brunoldqueiroz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-expert
Source: https://github.com/brunoldqueiroz/marvin/tree/main/.claude/skills/terraform-expert
Command: npx skills add https://github.com/brunoldqueiroz/marvin --skill terraform-expert-brunoldqueiroz

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides expert guidance on writing, managing, and optimizing Terraform and OpenTofu Infrastructure as Code (IaC), ensuring best practices are followed for robust and maintainable infrastructure.

Core Features & Use Cases

  • HCL & IaC Patterns: Offers in-depth knowledge of HashiCorp Configuration Language (HCL) and Infrastructure as Code (IaC) design patterns.
  • Workflow Optimization: Guides users on module design, state management, plan/apply workflows, and provider configurations.
  • Use Case: A user is unsure about the best way to structure their Terraform modules for multi-environment deployment. This Skill provides a clear, opinionated approach based on industry best practices.

Quick Start

Use the terraform-expert skill to refactor a Terraform configuration that uses count to manage resources into a for_each pattern.

Frequently Asked Questions about terraform-expert

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

FAQPage Schema
What's the best way to structure Terraform modules for multi-environment deployments?

Structuring Terraform modules for multiple environments requires an opinionated approach to module design and state management to ensure maintainable infrastructure. This involves using HCL patterns that isolate environment-specific configurations while keeping core logic shared and reusable across deployments.

How do I refactor Terraform configurations from count to for_each patterns?

Refactoring Terraform configurations from count to for_each involves updating HCL syntax to use map keys for resource iteration. This transition allows safer resource management, preventing entire resource replacements when list items are added or removed and providing more stable plan and apply workflows.

Can I use OpenTofu with existing Terraform HCL files and providers?

OpenTofu works with existing Terraform HCL files and provider configurations, offering compatibility for Infrastructure as Code management. You can maintain your current IaC design patterns and state management strategies while transitioning between these tools to ensure production-ready infrastructure.

What are the best practices for Terraform state management in production?

Terraform state management best practices involve configuring secure remote backends and implementing strategies to isolate state files per environment. Proper state management prevents concurrent write conflicts and ensures reliable plan and apply workflows for production-ready infrastructure.

How do I configure providers in Terraform for multi-region cloud infrastructure?

Configuring providers in Terraform for multi-region cloud infrastructure requires defining provider aliases in your HCL files. This setup allows you to deploy resources across different regions seamlessly within the same configuration, ensuring robust and geographically distributed infrastructure.

Why does migrating Terraform resources between configurations cause state issues?

Migrating Terraform resources between configurations causes state issues when state management boundaries are crossed without proper planning. Addressing this requires using targeted state manipulation commands to move resource tracking safely and maintain clean plan and apply workflows.