terraform-style-guide

Generate Terraform configurations following HashiCorp's official style guide.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/PaulRBerg/prb-iac --skill terraform-style-guide-paulrberg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-style-guide
Source: https://github.com/PaulRBerg/prb-iac/tree/main/.agents/skills/terraform-style-guide
Command: npx skills add https://github.com/PaulRBerg/prb-iac --skill terraform-style-guide-paulrberg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Terraform style drift leads to inconsistent configurations and longer review cycles; this guide consolidates HashiCorp's official conventions to keep code uniform and maintainable.

Core Features & Use Cases

  • Establishes a consistent file structure and naming conventions for Terraform configurations.
  • Provides formatting rules, variable declarations, and descriptive outputs to improve readability and maintainability.
  • Supports best practices for provider configuration, data sources, and module usage to reduce errors and promote reuse.

Quick Start

Follow the guide to structure and format your Terraform code according to the style standards.

Frequently Asked Questions about terraform-style-guide

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

FAQPage Schema
How do I enforce HashiCorp Terraform style conventions in my configurations?

You can enforce HashiCorp Terraform style by applying guidelines that standardize provider blocks, data sources, resources, variables, and outputs with consistent formatting and naming across your configurations.

What is the best way to structure Terraform modules and environments to prevent style drift?

The best way to prevent Terraform style drift is to establish a consistent file structure and naming conventions for modules and environments, ensuring uniform code formatting and maintainability.

Does this style guide cover Terraform variable declarations and output formatting?

Yes, the style guide covers Terraform variable declarations and output formatting, providing specific rules to improve readability, maintainability, and security best practices.

How do I format Terraform provider blocks and data sources for better code reviews?

Format Terraform provider blocks and data sources by following official conventions that enforce descriptive outputs and best practices, reducing errors and shortening review cycles.

Can I use these coding standards for infrastructure-as-code across multiple VPCs?

Yes, you can apply these infrastructure-as-code coding standards across multiple VPCs, as the guide is designed to be used when writing, reviewing, or generating Terraform configurations for various environments.

Why does my Terraform code have inconsistent formatting and longer review cycles?

Terraform code has inconsistent formatting and longer review cycles due to style drift, which can be resolved by consolidating HashiCorp's official conventions to keep code uniform and maintainable.