Building a workflow for publishing Terraform modules using GitHub Actions
In the Sharing a Terraform module using GitHub recipe of Chapter 7, Sharing Terraform Configuration with Modules, we studied how to publish a Terraform module in the Terraform public registry by putting its code on GitHub. Then, in the Testing a Terraform module with Terratest recipe of Chapter 11, Running Test and Compliance Security on Terraform Configuration, we learned 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 worked through the two recipes, Sharing a Terraform module using GitHub and Testing a Terraform module with Terratest, of Chapter 11, Running Test and Compliance Security on Terraform Configuration, which include all the bases and artifacts necessary for this recipe.
In this recipe, we will use the...