github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/website/docs/language/modules/develop/publish.html.md (about)

     1  ---
     2  layout: "language"
     3  page_title: "Publishing Modules"
     4  sidebar_current: "docs-modules-publish"
     5  description: |-
     6    A module is a container for multiple resources that are used together.
     7  ---
     8  
     9  # Publishing Modules
    10  
    11  If you've built a module that you intend to be reused, we recommend
    12  [publishing the module](/docs/registry/modules/publish.html) on the
    13  [Terraform Registry](https://registry.terraform.io). This will version
    14  your module, generate documentation, and more.
    15  
    16  Published modules can be easily consumed by Terraform, and users can
    17  [constrain module versions](/docs/language/modules/syntax.html#version)
    18  for safe and predictable updates. The following example shows how a caller
    19  might use a module from the Terraform Registry:
    20  
    21  ```hcl
    22  module "consul" {
    23    source = "hashicorp/consul/aws"
    24  }
    25  ```
    26  
    27  If you do not wish to publish your modules in the public registry, you can
    28  instead use a [private registry](/docs/registry/private.html) to get
    29  the same benefits.
    30  
    31  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.
    32  
    33  
    34  ## Distribution via other sources
    35  
    36  Although the registry is the native mechanism for distributing re-usable
    37  modules, Terraform can also install modules from
    38  [various other sources](/docs/language/modules/sources.html). The alternative sources
    39  do not support the first-class versioning mechanism, but some sources have
    40  their own mechanisms for selecting particular VCS commits, etc.
    41  
    42  We recommend that modules distributed via other protocols still use the
    43  [standard module structure](/docs/language/modules/develop/structure.html) so that they can
    44  be used in a similar way as a registry module or be published on the registry
    45  at a later time.