How do you publish a module to the public registry?
IntermediateConceptModules
Answer
Host it in a public GitHub repository named terraform-<PROVIDER>-<NAME> (for example terraform-aws-vpc), with a root main.tf, README.md, and push semver tags like v1.0.0. Sign in to the registry with GitHub and publish the repo. Private registries in HCP Terraform use the same naming and tag conventions.
More on Modules
What is a Terraform module and why use one?BeginnerHow do you call a module?BeginnerHow do inputs and outputs work with modules?BeginnerWhich module source types exist and where does `version` apply?IntermediateHow should you version and pin modules?IntermediateCan you use `count` and `for_each` on modules?Intermediate