Locally source module into another Terraform code base and plan/apply as normal.
Follow Terraform Style Conventions and Terraform Standard Module Structure.
Code is linted using terraform fmt
.
Code is tested using Kitchen Terraform to build example infrastructure in AWS and then run integration tests against it. You can run these tests locally be installing dependencies (Ruby 2.7 (ruby devel needed as well) installed and bundler, then you can run bundle install
in the repos home directory), or alternatively you can use the Docker image used by the pipeline. For convenience, the following have been added to the Makefile:
test
: Build, test, and destroy default scenario with Kitchen Terraformtest-hybrid-external-database
: Build, test, and destroy hybrid-external-database scenario with Kitchen Terraformbuild
: Build default scenario with Kitchen Terraformbuild-hybrid-external-database
: Test hybrid-external-database scenario with Kitchen Terraformdestroy
: Build default scenario with Kitchen Terraformdestroy-hybrid-external-database
: Test hybrid-external-database scenario with Kitchen Terraform
The GitHub Actions pipeline runs the integration tests against an AWS account owned by the repo maintainer. The credentials for doing this are kept in a deactivated state and first need to be enabled by an administrator. As such the flow is typically:
- Raise pull request
- Pipeline fails on
PR / Test AWS Credentials (pull_request)
- A maintainer reviews the code
- A maintainer then activates/enables the pipelines credentials in AWS (if PR changes pass initial review)
- A maintainer then re-runs the pipeline, which deactivates the credentials when complete
If you open a GitHub pull request on this repo, please update CHANGELOG
to reflect your contribution.
Add your entry under Unreleased
as Breaking changes
, New features
, Fixes
.
Internal changes to the project that are not part of the public API do not need changelog entries, for example fixing the CI build server.
These sections follow semantic versioning, where:
Breaking changes
corresponds to amajor
(1.X.X) change.New features
corresponds to aminor
(X.1.X) change.Fixes
corresponds to apatch
(X.X.1) change.
See the CHANGELOG_TEMPLATE.md
for an example for how this looks.
Each merge to main
branch will create a GitHub release using semver 1.2.3 syntax. Each GitHub release will also be presented as a version on Terraform Registry.