This repository is meant to be a template repo we can just spin up new module repos from with our general format.
- Clone this repo, renaming appropriately.
- Write your terraform code in the root dir.
- Create an example of the module in use in the
examples
dir. - Ensure you've completed the Developer Setup.
- In the root dir, run
go mod init MODULE_NAME
to get a newgo.mod
file. Then rungo mod tidy
. This creates a newgo.sum
file and imports the dependencies and checksums specific to your repository. - Run your tests to ensure they work as expected using instructions below.
Please put a description of what this module does here
This is how we're managing the different versions. Terraform 0.13. Pin module version to ~> 2.0. Submit pull-requests to master branch.
Terraform 0.12. Pin module version to ~> 1.0.1. Submit pull-requests to terraform012 branch.
Terraform 0.11. Pin module version to ~> 1.0. Submit pull-requests to terraform011 branch.
module "example" {
source = "terraform/registry/path"
<variables>
}
Name | Version |
---|---|
terraform | >= 0.13 |
aws | ~> 3.0 |
No providers.
No modules.
No resources.
No inputs.
No outputs.
Install dependencies (macOS)
brew install pre-commit go terraform terraform-docs
pre-commit install --install-hooks
Terratest is being used for
automated testing with this module. Tests in the test
folder can be run
locally by running the following command:
make test
Or with aws-vault:
AWS_VAULT_KEYCHAIN_NAME=<NAME> aws-vault exec <PROFILE> -- make test