terraform-style-guide

Guide Terraform HCL code to follow HashiCorp style conventions.

Updated Apr 9, 2019
One-click install
npx skills add https://github.com/Yusei-SHIRAISHI/my_dotfiles --skill terraform-style-guide-yusei-shiraishi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-style-guide
Source: https://github.com/Yusei-SHIRAISHI/my_dotfiles/tree/main/.codex/skills/terraform-style-guide
Command: npx skills add https://github.com/Yusei-SHIRAISHI/my_dotfiles --skill terraform-style-guide-yusei-shiraishi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you write clean, consistent, and maintainable Terraform HCL code by adhering to HashiCorp's official style conventions and best practices.

Core Features & Use Cases

  • Code Generation Guidance: Provides rules for structuring files, formatting code, and naming conventions.
  • Best Practice Enforcement: Details how to use variables, outputs, dynamic resource creation, and security best practices.
  • Use Case: When starting a new Terraform project or reviewing existing code, use this Skill to ensure your configurations are idiomatic and follow established standards.

Quick Start

Use the terraform-style-guide skill to generate a Terraform configuration for an AWS S3 bucket following best practices.

Frequently Asked Questions about terraform-style-guide

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

FAQPage Schema
What are the best practices for writing Terraform HCL code?

Terraform HCL best practices include following HashiCorp's official style conventions for file organization, code formatting, and naming conventions to ensure your configurations are maintainable, readable, and secure.

How do I structure my Terraform files according to the official style guide?

Structure Terraform files by adhering to HashiCorp's official style conventions, which provide specific guidance on file organization, code formatting, and naming conventions for variables and outputs.

Does this Terraform style guide cover security hardening and version pinning?

Yes, the Terraform style guide covers security hardening and version pinning, along with provider configuration and dynamic resource creation to ensure your infrastructure code is secure and maintainable.

Can I use this guide to generate an AWS S3 bucket Terraform configuration?

Yes, you can use the Terraform style guide to generate a Terraform configuration for an AWS S3 bucket that follows established standards and best practices for code generation.

Why does my Terraform code need dynamic resource creation and provider configuration standards?

Terraform code needs dynamic resource creation and provider configuration standards to enforce best practices, ensuring that your infrastructure definitions remain maintainable, readable, and secure across versions.

What is the best way to review existing Terraform code for idiomatic standards?

The best way to review existing Terraform code for idiomatic standards is to check it against HashiCorp's official style conventions, covering everything from variable definitions to security hardening.