docs-terraform-guidelines

IaC Guidelines

Guidelines to work with Terraform and Terragrunt

🎯 Our purpose

This documentation is provided by the Theodo Cloud IaC Guild. Its purpose is to present guidelines and best practices about terraform/terragrunt development.

You do not have to see these guidelines as an absolute truth, but more as a proposition to answer frequently asked questions and avoid issues you will often face in your projects.

πŸ€– GitHub Copilot Integration

To leverage these guidelines in your own IaC projects, we provide comprehensive GitHub Copilot instructions that help generate standards-compliant Terraform and Terragrunt code.

Copy the GitHub Copilot instructions to your project’s .github/copilot-instructions.md to enable Copilot to:

These instructions encapsulate all the best practices from this documentation into actionable guidance for GitHub Copilot, making it easier to maintain consistency across your infrastructure codebase.

πŸ” IaC Audit Prompt

For existing codebases, use our IaC audit prompt to evaluate compliance with these standards:

/iac-audit

This prompt provides comprehensive analysis including:

Why IaC ?

Infrastructure as Code (IaC) is a key practice in modern software development that allows teams to manage and provision infrastructure through code, rather than manual processes. This approach brings several benefits:

🌟 Standards 🌟

The 3 gold standards for your infrastructure codebase

The standards for layers

The standards for modules

The standard naming convention

We recommend everyone to follow the WYSIWYG pattern for vanilla terraform and the Context pattern for Terragrunt.

πŸš€ Guidelines

You’ll find below details of the standards to follow when working with Terraform and Terragrunt.

πŸ›— Patterns

Reusable solution to a commonly occurring problem within a given context

πŸ”„ Lifecycle operations

πŸŽ“ Standards

Standards help to avoid waste and ensure that we deliver value

Terraform

Terragrunt

🚩 Red flags

Red flag is something that you must pay attention about. This is an advice or recommendation, not a requirement.

πŸ› οΈ Tooling

License

License