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

https://github.com/thinkinglabs/terraform-aws-bootstrap

Template to bootstrap a Terraform AWS stack
https://github.com/thinkinglabs/terraform-aws-bootstrap

Last synced: 4 months ago
JSON representation

Template to bootstrap a Terraform AWS stack

Awesome Lists containing this project

README

          

# terraform-aws-bootstrap

A bootstrap project to kickstart a Terraform AWS component.

This setup follows the Micro Stack pattern from [Infrastructure as Code, 2nd Edition, p62](https://www.oreilly.com/library/view/infrastructure-as-code/9781098114664/). Every single infrastructure component of an application/service maps to a single stack.

## Setup

Install [Terraform](https://developer.hashicorp.com/terraform/install?product_intent=terraform).

Install [tflint](https://github.com/terraform-linters/tflint).

Install [Trivy](https://trivy.dev/latest/getting-started/)

## Public Cloud

AWS.

## Environments

Assumes three environments:

- `development`
- `test`
- `production`

Each environment has its own set of configurations `./environments/.tfvar`.

Environments map to Terraform workspaces.

## Backend

The Terraform state is stored in an S3 bucket.

Either a single S3 bucket for all workspaces (environments).

Or one S3 bucket per environment.

## Apply

To apply a configuration:

```bash
make plan env=
make apply
```

where `` is one of `development`, `test` or `production`.