Terraform Best Practices Guide

•
78
•

Implements industry-standard Terraform conventions for infrastructure as code, covering file organization, security, and module management.

This skill provides Claude with a comprehensive framework for writing, reviewing, and optimizing Terraform code according to professional standards. It includes specific guidance on directory structure, naming conventions (like resource prefixes and snake_case variables), secure state management using S3 and DynamoDB, and robust security patterns for cloud resources. By integrating these best practices, the skill helps developers prevent common anti-patterns such as hardcoded values, unpinned module versions, and overly permissive IAM policies, ensuring the creation of maintainable, production-grade infrastructure.

Key Features

01Standardized directory structure for orchestration and reusable modules
02Remote state management patterns with backend locking and encryption
03Security checklist for S3, RDS, and IAM resource configuration
0478 GitHub stars
05Strict naming conventions for resources, variables, and outputs
06Identification and avoidance of common Terraform anti-patterns

Use Cases

01Setting up new Terraform projects with production-ready backend and provider configurations
02Refactoring monolithic Terraform files into a scalable, organized directory structure
03Reviewing existing HCL code for security vulnerabilities and naming inconsistencies