Skip to content

Latest commit

 

History

History
110 lines (75 loc) · 3.22 KB

CONTRIBUTING.md

File metadata and controls

110 lines (75 loc) · 3.22 KB

Contributing

This document provides guidelines for contributing to the module.

Generating Documentation for Inputs and Outputs

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.

Dependencies

The following dependencies must be installed on the development system:

Execution

Run make generate_docs to generate new Inputs and Outputs tables.

Integration Testing

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. These tools are packaged within a Docker image for convenience.

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.

Dependencies

The following dependencies must be installed on the development system:

Inputs

Test instances are defined in the Kitchen configuration file. The inputs of each Kitchen instance may be configured with the driver.variables key in a local Kitchen configuration file located at ./kitchen.local.yml or in a Terraform variables file located at ./test/fixtures/<instance>/variables.tfvars.

Credentials

Download the key of a Service Account with the [required roles][required-roles] to ./credentials.json.

Interactive Execution

  1. Run make docker_run to start the testing Docker container in interactive mode.

  2. Run kitchen create <EXAMPLE_NAME> to initialize the working directory for an example module.

  3. Run kitchen converge <EXAMPLE_NAME> to apply the example module.

  4. Run kitchen verify <EXAMPLE_NAME> to test the example module.

  5. Run kitchen destroy <EXAMPLE_NAME> to destroy the example module state.

Noninteractive Execution

Run make test_integration_docker to test all of the example modules noninteractively.

Linting and Formatting

Many of the files in the repository can be linted or formatted to maintain a standard of quality.

Dependencies

The following dependencies must be installed on the development system:

Execution

Run make check.