- Create your new module repository by using terraform only (see SOP) and make sure to use this template.
- Add your Terraform code in any branch other than
main/master
- Change the
<REPO_NAME>
value for any badges in theREADME.md
files in the rootexamples
andmodules
folders. - Add nested modules in the
modules
folder, orDELETE
the nested folder if not used.- Note: you will also maintain the nested modules full
README.md
files, remember nested modules can be used on their own.
- Note: you will also maintain the nested modules full
- Add examples in the
examples
folder.- Note: you can have as many examples as you want, but two are required.
- minimum - this is the example with the minimum code to use the module.
- complete - this is the example with all features for a single module used (the most common use).
- Note: you can have as many examples as you want, but two are required.
- Run
pre-commit run --all-files
to update theREADME
and fix any issues.- Note: make sure your IDE tool uses spaces and not tabs specially on
yaml
files.
- Note: make sure your IDE tool uses spaces and not tabs specially on
- Run
checkov
orterrascan
tool and make sure to add the log to the PR (something to automate).- Note: make sure to scan your module nested modules and examples (great candidate for a makefile action/script and automation).
- Open a pull request into the default branch (usually
main
) and have it reviewed. don't forget to add the security scan logs.- Note: make sure to add the nested modules README's to the pre-commit config so they are also updated and validated.
- If you have been assigned a reviewer DM the reviewer, or the channel if it has been more than one day.
- Post to the channel news of the releases to the teams.
lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem.
Examples available [here
]github.com/boldlink/<REPO_NAME>//tree/main/examples)
NOTE: These examples use the latest version of this module
module "miniumum" {
source = "boldlink/<module_name>/<provider>"
version = "x.x.x"
<insert the minimum required variables here if any are required>
...
}
<ex. Amazon VPC/Github/Cloudflare> Documentation
Terraform module documentation
Name | Version |
---|---|
terraform | >= 0.14.11 |
aws | >= 4.20.0 |
No providers.
No modules.
No resources.
No inputs.
No outputs.
This repository uses third party software:
- pre-commit - Used to help ensure code and documentation consistency
- Install with
brew install pre-commit
- Manually use with
pre-commit run
- Install with
- terraform 0.14.11 For backwards compatibility we are using version 0.14.11 for testing making this the min version tested and without issues with terraform-docs.
- terraform-docs - Used to generate the Inputs and Outputs sections
- Install with
brew install terraform-docs
- Manually use via pre-commit
- Install with
- tflint - Used to lint the Terraform code
- Install with
brew install tflint
- Manually use via pre-commit
- Install with
The example stacks are used by BOLDLink developers to validate the modules by building an actual stack on AWS.
Some of the modules have dependencies on other modules (ex. Ec2 instance depends on the VPC module) so we create them first and use data sources on the examples to use the stacks.
Any supporting resources will be available on the tests/supportingResources
and the lifecycle is managed by the Makefile
targets.
Resources on the tests/supportingResources
folder are not intended for demo or actual implementation purposes, and can be used for reference.
The makefile contain in this repo is optimized for linux paths and the main purpose is to execute testing for now.
- Create all tests stacks including any supporting resources:
make tests
- Clean all tests except existing supporting resources:
make clean
- Clean supporting resources - this is done separately so you can test your module build/modify/destroy independently.
make cleansupporting
- !!!DANGER!!! Clean the state files from examples and test/supportingResources - use with CAUTION!!!
make cleanstatefiles