Skip to content

Repository to use as a template for future terragrunt (IaC tool) projects.

License

Notifications You must be signed in to change notification settings

develeap/iac-terragrunt-template

Repository files navigation

Develeap - we can take you there!

Introduction

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.

Table of Contents

Prerequisites

Can be install using:

brew install terraform terragrunt awscli just graphviz terraform-docs

Getting Started

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.

Cheat Sheet

Make sure to check the Cheat Sheet for some useful commands and tips.

Usage

Use the Justfile provided in this repository to run various commands. You can see the available commands by running just --list. asciicast

Build the infrastructure folder structure

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

Example:

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

Inheritance

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.

Documentation

Additional documentation can be found in the docs folder.

Contributing

If you want to contribute to this repository, please create a pull request with your changes.

License

This repository is licensed under the MIT License. See the LICENSE file for more information.

About

Repository to use as a template for future terragrunt (IaC tool) projects.

Topics

Resources

License

Stars

Watchers

Forks