In the Sharing a Terraform module using GitHub recipe of this chapter, we studied how to publish a Terraform module in the Terraform public registry by putting its code on GitHub. Then, we learned in the Testing a Terraform module with Terratest recipe how to write and run module tests using Terratest.
We will go further in this recipe by studying the implementation of an automated module publishing workflow using GitHub Actions.
Getting ready
To start this recipe, you must have assimilated the two recipes, Sharing a Terraform module using GitHub and Testing a Terraform module with Terratest, which include all of the bases and artifacts necessary for this recipe.
In this recipe, we will use the module code we wrote in the Testing Terraform module code with Terratest recipe, the source code for which is available here: https://github.com/PacktPublishing/Terraform-Cookbook/tree/master/CHAP05/testing-terratest/module.
Also, we...