github.com/hugorut/terraform@v1.1.3/website/docs/language/modules/develop/publish.mdx (about) 1 --- 2 page_title: Publishing Modules 3 description: A module is a container for multiple resources that are used together. 4 --- 5 6 # Publishing Modules 7 8 If you've built a module that you intend to be reused, we recommend 9 [publishing the module](/registry/modules/publish) on the 10 [Terraform Registry](https://registry.terraform.io). This will version 11 your module, generate documentation, and more. 12 13 Published modules can be easily consumed by Terraform, and users can 14 [constrain module versions](/language/modules/syntax#version) 15 for safe and predictable updates. The following example shows how a caller 16 might use a module from the Terraform Registry: 17 18 ```hcl 19 module "consul" { 20 source = "hashicorp/consul/aws" 21 } 22 ``` 23 24 If you do not wish to publish your modules in the public registry, you can 25 instead use a [private registry](/registry/private) to get 26 the same benefits. 27 28 We welcome contributions of Terraform modules from our community members, partners, and customers. Our ecosystem is made richer by each new module created or an existing one updated, as they reflect the wide range of experience and technical requirements of the community that uses them. Our cloud provider partners often seek to develop specific modules for popular or challenging use cases on their platform and utilize them as valuable learning experiences to empathize with their users. Similarly, our community module developers incorporate a variety of opinions and use cases from the broader Terraform community. Both types of modules have their place in the Terraform registry, accessible to practitioners who can decide which modules best fit their requirements. 29 30 ## Distribution via other sources 31 32 Although the registry is the native mechanism for distributing re-usable 33 modules, Terraform can also install modules from 34 [various other sources](/language/modules/sources). The alternative sources 35 do not support the first-class versioning mechanism, but some sources have 36 their own mechanisms for selecting particular VCS commits, etc. 37 38 We recommend that modules distributed via other protocols still use the 39 [standard module structure](/language/modules/develop/structure) so that they can 40 be used in a similar way as a registry module or be published on the registry 41 at a later time.