This is the template repository for my terraform modules. It attempts to follow the default structure for terraform modules.
It is designed to speed up development of new terraform modules by providing:
- basic terraform setup for backend, providers, etc.
- the default required version for terraform is
>1.2.0
- common pre-commit hooks configuration
- semantic release configuration
- examples directory for testing and demonstration
- default github actions workflows for testing and releasing
If you want to make a new terraform module from scratch:
- create a new repository using this one as template
- delete the sections commented with
<!-- Delete this section when using the template repository -->
- update
terraform.tf
to declare the module's required providers - add the examples you need in
examples/<your example>
- update the test workflow in
.github/workflows/test.yml
to reflect your examples
The pre-commit framework is used to manage pre-commit hooks for this repository. A few well-known hooks are provided to cover correctness, security and safety in terraform.
The examples/
directory contains the example usage of this module.
These examples show how to use the module in your project, and are also use for testing in CI/CD.
Name | Version |
---|---|
terraform | >1.2.0 |
No providers.
No modules.
No resources.
Name | Description | Type | Default | Required |
---|---|---|---|---|
dummy | dummy variable | string |
n/a | yes |
No outputs.