Skip to content
/ tfmod-template Public template

Template repository for my terraform modules

License

Notifications You must be signed in to change notification settings

brucellino/tfmod-template

Repository files navigation

pre-commit pre-commit.ci status semantic-release: conventional

tfmod-template

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:

  1. basic terraform setup for backend, providers, etc.
  2. the default required version for terraform is >1.2.0
  3. common pre-commit hooks configuration
  4. semantic release configuration
  5. examples directory for testing and demonstration
  6. default github actions workflows for testing and releasing

How to use

If you want to make a new terraform module from scratch:

  1. create a new repository using this one as template
  2. delete the sections commented with <!-- Delete this section when using the template repository -->
  3. update terraform.tf to declare the module's required providers
  4. add the examples you need in examples/<your example>
  5. update the test workflow in .github/workflows/test.yml to reflect your examples

Pre-commit hooks

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.

Examples

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.

Requirements

Name Version
terraform >1.2.0

Providers

No providers.

Modules

No modules.

Resources

No resources.

Inputs

Name Description Type Default Required
dummy dummy variable string n/a yes

Outputs

No outputs.