terraform-style-guide

Generate Terraform HCL code following HashiCorp style conventions and validate with terraform fmt and validate.

16|3|Updated Oct 3, 2023
One-click install
npx skills add https://github.com/filippolmt/terraform-oci-free-tier --skill terraform-style-guide-filippolmt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-style-guide
Source: https://github.com/filippolmt/terraform-oci-free-tier/tree/main/.agents/skills/terraform-style-guide
Command: npx skills add https://github.com/filippolmt/terraform-oci-free-tier --skill terraform-style-guide-filippolmt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures your Terraform HCL code adheres to HashiCorp's official style conventions and best practices, leading to more maintainable and readable infrastructure as code.

Core Features & Use Cases

  • Code Generation Guidance: Provides rules and examples for structuring Terraform files, formatting code, and naming resources.
  • Best Practice Enforcement: Details recommendations for variable usage, output definitions, dynamic resource creation, and security.
  • Use Case: When writing new Terraform modules or reviewing existing configurations, use this Skill to ensure consistency and adherence to industry standards.

Quick Start

Generate Terraform HCL code following HashiCorp's official style conventions and 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 Terraform HCL best practices for structuring files and naming resources?

Terraform HCL best practices for file organization and naming conventions ensure infrastructure as code is maintainable and readable. This involves following HashiCorp's official style conventions for structuring modules, formatting code, and consistently naming resources.

How do I enforce Terraform code formatting and validation standards?

You enforce Terraform code formatting and validation by applying HashiCorp's official style conventions and running `terraform fmt` and `terraform validate`. This ensures configurations adhere to industry standards for readability and maintainability.

How do I write Terraform variables and outputs following HashiCorp style conventions?

Writing Terraform variables and outputs following HashiCorp style conventions requires adhering to specific rules for variable usage and output definitions. This ensures dynamic resource creation and module interfaces are consistent, secure, and maintainable.

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

Yes, this Terraform style guide covers security hardening and provider version pinning. It provides specific recommendations for securely configuring providers and pinning versions to ensure infrastructure stability and adherence to best practices.

What's the best way to review existing Terraform configurations for style consistency?

The best way to review existing Terraform configurations for style consistency is checking them against HashiCorp's official style conventions. Validate file organization, naming conventions, and code formatting using `terraform fmt` and `terraform validate`.