This repository is a template to be used for future terragrunt projects. It contains a basic structure for terragrunt projects and some basic modules to be used as examples.
- Introduction
- Prerequisites
- Getting Started
- Cheat Sheet
- Usage
- Build the infrastructure folder structure
- Example
- Inheritance
- Documentation
- Contributing
- License
Can be install using:
brew install terraform terragrunt awscli just graphviz terraform-docs
To get started, you can use this repository as a template and clone it to your local machine. After that, you can start creating your own modules and terragrunt configurations.
Make sure to check the Cheat Sheet for some useful commands and tips.
Use the Justfile provided in this repository to run various commands. You can see the available commands by running just --list
.
To build the infrastructure folder structure, run the following command: Make sure to set the desired account-ids, regions, environments in build-folder-structure script
just build-folder-structure
infrastructure-live
├── 01234567890
│ ├── account.hcl
│ ├── dev
│ │ ├── dev-1
│ │ │ └── il-central-1
│ │ │ ├── compute
│ │ │ │ └── compute.hcl
│ │ │ ├── database
│ │ │ │ └── database.hcl
│ │ │ ├── network
│ │ │ │ └── network.hcl
│ │ │ ├── region.hcl
│ │ │ ├── secret
│ │ │ │ └── secret.hcl
│ │ │ └── storage
│ │ │ └── storage.hcl
│ │ └── env.hcl
│ ├── prod
│ │ ├── env.hcl
│ │ └── prod-1
│ │ └── il-central-1
│ │ ├── compute
│ │ │ ├── compute.hcl
│ │ │ └── demo-ec2
│ │ │ └── terragrunt.hcl
│ │ ├── database
│ │ │ └── database.hcl
│ │ ├── network
│ │ │ └── network.hcl
│ │ ├── region.hcl
│ │ ├── secret
│ │ │ └── secret.hcl
│ │ └── storage
│ │ └── storage.hcl
│ ├── provider.hcl
│ └── stage
│ ├── env.hcl
│ └── stage-1
│ └── il-central-1
│ ├── compute
│ │ └── compute.hcl
│ ├── database
│ │ └── database.hcl
│ ├── network
│ │ └── network.hcl
│ ├── region.hcl
│ ├── secret
| │ └── secret.hcl
│ └── storage
│ └── storage.hcl
└── infrastructure.hcl
27 directories, 25 files
The folder structure is designed to allow for inheritance of configurations. The account.hcl
file is used to define the account specific configurations, while the env.hcl
file is used to define the environment specific configurations. The region.hcl
file is used to define the region specific configurations. And so forth.
A single include block will be used to include all the configurations from the parent folders.
Additional documentation can be found in the docs folder.
If you want to contribute to this repository, please create a pull request with your changes.
This repository is licensed under the MIT License. See the LICENSE file for more information.