This document provides guidelines for contributing to the module.
The following dependencies must be installed on the development system:
The Inputs and Outputs tables in the READMEs of the root module,
submodules, and example modules are automatically generated based on
the variables
and outputs
of the respective modules. These tables
must be refreshed if the module interfaces are changed.
Run terraform-docs markdown >> README.md
to generate new Inputs and Outputs tables.
Please ensure the Changelog is updated with merge to main branch. Changes not git-tagged should be under [unreleased]
.
Please use sane commit messages following Conventional Commits
Integration tests are used to verify the behaviour of the root module, submodules, and example modules. Additions, changes, and fixes should be accompanied with tests.
The integration tests are run using Kitchen, Kitchen-Terraform, and InSpec.
The general strategy for these tests is to verify the behaviour of the example modules, thus ensuring that the root module, submodules, and example modules are all functionally correct.
The easiest way to test the module is in an isolated test TFE workspace. The setup for such a project is defined in test/setup directory.
Run make docker_test_integration
to test all of the example modules
noninteractively, using the prepared test project.
-
Run
make docker_run
to start the testing Docker container in interactive mode. -
Run
kitchen_do create <EXAMPLE_NAME>
to initialize the working directory for an example module. -
Run
kitchen_do converge <EXAMPLE_NAME>
to apply the example module. -
Run
kitchen_do verify <EXAMPLE_NAME>
to test the example module. -
Run
kitchen_do destroy <EXAMPLE_NAME>
to destroy the example module state.
Many of the files in the repository can be linted or formatted to maintain a standard of quality.
Run make docker_test_lint
.