- follow the naming convention:
terraform-<saas>-<service>
i.e.terraform-aws-s3
- add
wt-branch-protection-default
as a repository topic - ensure the team is listed as a Service Owner collaborator
- subscribe in the appropriate slack channel
/subscribe wetransfer/terraform-<saas>-<service>
- amend codeowners if this module isn't owned by the Platform team
- update catalog-info.yaml
Provide step by step instructions on how to initialise and use this module on main.tf - The instuctions will automatically be inserted at the top of README.md with the terraform-docs pre-commit hook.
You should also provide an example code-block on main.tf file like below
module "<module-name>" {
source = "[email protected]:WeTransfer/<repository>.git?ref=<version-tag>"
var1 = "value1"
var2 = "value2"
}
No requirements.
No providers.
No resources.
No inputs.
No outputs.
This repository has pre-commit hooks that generates the module documentation. The hook will run automatically everytime you commit a .tf file with a change and update the documentation at README.md
To setup the hook follow these steps
$ brew install pre-commit actionlint shellcheck
$ pre-commit install
$ pre-commit install-hooks
That should be all that's needed.
By default, any merge to main should release a new version. (bump up the patch version). So, if the current latest version is 0.2.3, the next merge to master will create a new tag 0.2.4 and push it.
You can adjust the bump to be minor or major as well by following the convention below in your commit messages. For more details see the action's readme over here: https://github.com/PaulHatch/semantic-version?tab=readme-ov-file#major-and-minor-versions
Commit message | Release type |
|
Patch Release |
|
Minor Release |
|
Major Release |
Each merge creates a release, which you can use while initialising the module.
module "<module-name>" {
source = "[email protected]:WeTransfer/<module-repo>?ref=<release-version>"
vars...
}
However, while you are working for an update on the module, you can also initialise the module with your branch before it gets merged to master.
module "<module-name>" {
source = "[email protected]:WeTransfer/<module-repo>?ref=<branch-name>
vars...
}
Please note, everytime you update your branch, you have to pull the module with the command below
we aws session -r terraform-manager -e dev terraform get -update=true