Part 05 — Release Strategy
Creating Terraform modules can be a complex and time-consuming process. From developing the module code to testing it and documenting it, there are numerous steps that go into building a high-quality module. But what happens after the module is complete?
In the previous articles, we saw how to document and publish our terraform modules. Publishing is the last stage of the Release Strategy. There are a few things that happen before it.
In this article, I want to cover the release strategy I use for my terraform modules.
Release Branches
I use release branches with Gitlab Flow to manage the release process.
The release process begins with the creation of a release branch from the main branch. The release branch strictly adheres to semantic versioning.
(eg: release/0.0.1)
As soon as a release branch is created, the release pipeline kicks in. The release job executes Gitlab’s release CLI to generate a tag and create a release snapshot.
Conclusion
The release job plays an important part in your terraform module’s lifecycle. As you add more functionalities to your terraform module, the readme file is also bound to change. By generating a snapshot of your repository and also tagging your code, every released version will always have its equivalent documentation in your GitLab repository.
Links
Articles in this Series
Introduction — Terraform Modules: From Development to Deployment on Gitlab
Part 01 — Publishing Terraform Modules to GitLab Infra Registry
Part 03 — Publishing Terraform Modules using GitLab Pipelines
Part 04 — Documenting Terraform Modules
Part 06 — Structuring Terraform Modules
[Coming Soon] Part 07 — Bringing it All Together