An easy to understand, opinionated terraform composable module with batteries included π.
[//]: # (// FIXME: Remove, refactor or change. (Template)
[//]: # (// FIXME: Remove, refactor or change. (Template) (put high level description here)
The documentation is automatically generated by terraform-docs, and it's available in the module's README.md file.
[//]: # (// FIXME: Remove, refactor or change. (Template)
(put description here)
[//]: # (// FIXME: Remove, refactor or change. (Template)
(put description here)
[//]: # (// FIXME: Remove, refactor or change. (Template)
(put description here)
The module's relevant components, structure and "skeleton" is described below:
.
βββ CONTRIBUTING.md
βββ LICENSE
βββ Makefile
βββ README.md
βββ TaskFile.yml
βββ default
β βββ unit
βββ docs
β βββ contribution_guidelines.md
βββ examples
β βββ README.md
β βββ TaskFile.yml
β βββ default
β βββ basic
β βββ README.md
β βββ config
β β βββ fixtures.tfvars
β βββ main.tf
β βββ outputs.tf
β βββ providers.tf
β βββ variables.tf
β βββ versions.tf
βββ modules
β βββ TaskFile.yml
β βββ default
β βββ README.md
β βββ data.tf
β βββ locals.tf
β βββ main.tf
β βββ outputs.tf
β βββ variables.tf
β βββ versions.tf
βββ release-please-config.json
βββ scripts
β βββ containers
β β βββ build-and-run.sh
β βββ golang
β β βββ go_build.sh
β βββ hooks
β βββ pre-commit-init.sh
βββ taskfiles
β βββ Taskfile.common.yml
β βββ Taskfile.devex.yml
β βββ Taskfile.precommit.yml
β βββ Taskfile.terraform.yml
β βββ Taskfile.terragrunt.yml
βββ tests
βββ README.md
βββ TaskFile.yml
βββ default
βββ integration
β βββ default_basic_integration_test.go
β βββ go.mod
β βββ go.sum
β βββ target
β βββ basic
β βββ main.tf
βββ unit
βββ default_basic_unit_test.go
βββ go.mod
βββ go.sum
βββ target
βββ basic
βββ main.tf```
Where:
- β‘οΈModules: refers to the actual module's directory. Where the
.tf
files reside. Eachsubdirectory
is a module. - β‘οΈExamples: refers to the examples directory, where the examples recipes lives. These are also used for testing the infrastructure using Terratest. For its specific documentation, query this link
- β‘οΈTests: refers to the tests directory, where the tests recipes lives. These are also used for testing the infrastructure using Terratest. For its specific documentation, query this link
Some tools that this repo uses:
- π§° Terraform β strongly recommended the latest versions
- π§° Go β justified mostly for Terratest
- π§° TaskFile β for the automation of the tasks.
- π§° Make β for the automation of the tasks.
NOTE: For automation during the development process, I use precommit, which is a framework for managing and maintaining multi-language pre-commit hooks. It's a great tool, and I highly recommend it. All the hooks required are installed by this script. It's recommended though to run it through the TaskFile task
pre-commit-init
.
To initialize your pre-commit configuration, and ensure all the hooks are installed, run the following command:
# Using taskFiles
task pc-init
# Using make
make pc-init
To run these hooks against all the files, you can use the following Task
command:
# Using taskFiles
task pc-run
# Using make
make pc-run
This Module follows the principles of Semantic Versioning (SemVer).
Given a version number MAJOR.MINOR.PATCH
, we increment the:
MAJOR
version when we make incompatible changes,MINOR
version when we add functionality in a backwards compatible manner, andPATCH
version when we make backwards compatible bug fixes.
- Backwards compatibility in versions
0.0.z
is not guaranteed whenz
is increased. (Initial development) - Backwards compatibility in versions
0.y.z
is not guaranteed wheny
is increased. (Pre-release)
NOTE: The releases are automatically generated using release-please-action. For more information, please refer to the release-please-action documentation
Contributions are always encouraged and welcome! β€οΈ. For the process of accepting changes, please refer to the CONTRIBUTING.md file, and for a more detailed explanation, please refer to this guideline here.
- Integrate Open Policy Agent for policy as code.
- Integrate Conftest for policy as code.
- Integrate (Go) TerraDagger for CI using Dagger.io.
- Add built-in CLI for boilerplate generation.
This module is licensed under the Apache License Version 2.0, January 2004. Please see LICENSE for full details.
made/with β€οΈ π€