Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bingtsingw/boilerplate-terraform

A simple terraform boilerplate with terragrunt
https://github.com/bingtsingw/boilerplate-terraform

boilerplate dotenv template terraform terragrunt

Last synced: about 2 months ago
JSON representation

A simple terraform boilerplate with terragrunt

Awesome Lists containing this project

README

        

# boilerplate-terraform

This is a boilerplate using [terraform](https://www.terraform.io) with [terragrunt](https://github.com/gruntwork-io/terragrunt).

## Features

- [dotenv](https://github.com/motdotla/dotenv)-like variables management.
- remote backend with alicloud oss.
- built-in `Makefile` to simplify daily work.

## Usage

```shell
# set environment variables in .env.yml file
cp .env.yml.example .env.yml

# run make command
make module-clone MODULE_NAME=xxx
make plan
make apply
```

## Explanation for Dotenv

In fact, `terraform` or `terragrunt` does not support `dotenv`, so we cannot use a `.env` file directly.

Instead, we can borrow the idea behind `dotenv`. Just parse a `.env.yml` file with `terragrunt`'s `yamldecode` function to simulate this feature.