Terraform modules for infrastructure
Containers to run this: https://hub.docker.com/u/dfdsdk
- main.tf
- outputs.tf
- vars.tf
We recommend a folder structure for Terraform modules like so:
module-category
└ module-name
└ README.md
└ main.tf
└ outputs.tf
└ vars.tf
Example:
security
└ iam-account-alias
└ README.md
└ main.tf
└ outputs.tf
└ vars.tf
└ org-account
└ README.md
└ main.tf
└ outputs.tf
└ vars.tf
network
└ ...
The general structure of these modules, file layout etc. are largely based on Gruntwork's recommendations. More specifically the blog posts:
- Gruntwork blog: How to manage Terraform state
- Gruntwork blog: How to create reusable infrastructure with Terraform modules
- Gruntwork blog: How to use Terraform as a team
Gruntwork's example repos, of both modules and live/input data, along with their README files have also proven very useful:
- Github: gruntwork-io/terragrunt-infrastructure-live-example
- Github: gruntwork-io/terragrunt-infrastructure-modules-example
To workaround some of Terraform's quirks and shortcomings:
Other inspiration: