TODO: Project description.
TODO: What resources this module creates and what data sources it uses.
TODO: Code examples for minimal use-case as well as fully parameterised.
# Init project, run fmt and validate
terraform init -reconfigure
terraform fmt -check -recursive
terraform validate
# Lint with TFLint, calling script from https://github.com/dsb-norge/terraform-tflint-wrappers
alias lint='curl -s https://raw.githubusercontent.com/dsb-norge/terraform-tflint-wrappers/main/tflint_linux.sh | bash -s --'
lint
# go1.17+
go install github.com/terraform-docs/[email protected]
export PATH=$PATH:$(go env GOPATH)/bin
terraform-docs markdown table --output-file README.md .
After merge of PR to main use tags to release.
Use semantic versioning, see semver.org. Always push tags and add tag annotations.
Example of patch release v0.0.4
:
git checkout origin/main
git pull origin main
git tag -a 'v0.0.4' # add patch tag, add change description
git tag -f -a 'v0.0' # move the minor tag, amend the change description
git tag -f -a 'v0' # move the major tag, amend the change description
git push -f --tags # force push the new tags
Example of major release v1.0.0
:
git checkout origin/main
git pull origin main
git tag -a 'v1.0.0' # add patch tag, add your change description
git tag -a 'v1.0' # add minor tag, add your change description
git tag -a 'v0' # add major tag, add your change description
git push --tags # push the new tags
Note: If you are having problems pulling main after a release, try to force fetch the tags: git fetch --tags -f
.
this content between the BEGIN_TF_DOCS
and END_TF_DOCS
comments will be replaced by the auto-generated tf docs created by the terraform-docs command