Guidelines to work with Terraform and Terragrunt
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.
Install the iac-guidelines plugin from this repositoryβs theodo-iac
marketplace to use these guidelines with Claude Code, GitHub Copilot CLI and
Codex CLI. It provides five skills (guidelines, read-only audit, C4 and
architecture diagrams, version upgrade) and two agents (iac-developer,
read-only iac-auditor; Codex has skills only).
claude plugin marketplace add padok-team/docs-terraform-guidelines
claude plugin install iac-guidelines@theodo-iac
For IDEs that do not load plugins (e.g. Codex IDE), copy the skills/ folders
and the guideline folders they reference into your project.
See the installation and compatibility guide for marketplace commands, local installation, invocation examples and maintenance instructions.
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.
For existing codebases, use the iac-audit skill of the plugin to evaluate compliance with these standards:
/iac-audit
This prompt provides comprehensive analysis including:
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:
-target flagWe recommend everyone to follow the WYSIWYG pattern for vanilla terraform and the Context pattern for Terragrunt.
Youβll find below details of the standards to follow when working with Terraform and Terragrunt.
Reusable solution to a commonly occurring problem within a given context
Standards help to avoid waste and ensure that we deliver value
Red flag is something that you must pay attention about. This is an advice or recommendation, not a requirement.