This repo is my own implementation of the architecture found on Terraform: Up & Running. I made changes based on my own ideas and personal experience working with Terraform.
This repo leverages Terragrunt to avoid code repetition, and to create a multi-environment configuration that is maintainable, and not too cumbersome or difficult to understand.
The code is divided in live
and modules
directories. The ideal structure would be to keep them in separate repositories
so that the code found in modules
can be versioned and pulled by the live
repository. However, for simplicity I will keep
them together in this repo.
This is a simple example that serves an API server on an Auto-Scaling group, and uses RDS for a postgresql database with a Redis cluster for caching frequently accessed data. The implementation details are left out since this is an architecture exercise.
For deploying the infrastructure found in this repo:
- Install Terragrunt
- Install the AWS CLI and setup your account
- Clone this repository
- Run
cd live && terragrunt run-all apply --terragrunt-source ~/repo-location/modules