Sharing a Terraform module in the public registry using GitHub
In the Creating a Terraform module and using it locally recipe of this chapter, we studied how to create a module, and in the previous recipe, Using a module from the public registry, of this chapter, how to use a module from the public registry.
In this recipe, we’ll see how to publish a module in the public registry by storing its code on GitHub.
Getting ready
To apply this recipe, we need to have a GitHub account (which is currently the only Git provider available for publishing public modules), which you can create here: https://github.com/join. Also, you’ll need to know the basics on the Git commands and workflow (https://www.hostinger.com/tutorials/basic-git-commands).
Concerning the code of the module we are going to publish, we will use the Terraform configuration of the module we created in the first recipe of this chapter, the source for which is available at https://github.com/PacktPublishing...