Files
opentf/website/docs/modules/publish.html.markdown
Nick Fagerlund 0e5651560b Website: 0.13 docs edits, mostly around provider requirements (#25686)
* Make sidebar nav in language docs more intuitive
* Minor display fixes for registry docs
* Explain providers in the registry in the providers index
* Revise a bunch of language docs around provider reqs

This is mostly an effort to smooth out some of the explanations, make sure
things are presented in a helpful order, make sure terminology lines up, draw
connections between related concepts, make default behavior more apparent, and
the like. It shouldn't include very much new information, but there might be one
or two things that came out of a conversation somewhere.

Co-authored-by: Judith Malnick <judith@hashicorp.com>
2020-07-30 21:07:36 -07:00

1.5 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
docs Publishing Modules docs-modules-publish A module is a container for multiple resources that are used together.

Publishing Modules

If you've built a module that you intend to be reused, we recommend publishing the module on the Terraform Registry. This will version your module, generate documentation, and more.

Published modules can be easily consumed by Terraform, and users can constrain module versions for safe and predictable updates. The following example shows how a caller might use a module from the Terraform Registry:

module "consul" {
  source = "hashicorp/consul/aws"
}

If you do not wish to publish your modules in the public registry, you can instead use a private registry to get the same benefits.

Distribution via other sources

Although the registry is the native mechanism for distributing re-usable modules, Terraform can also install modules from various other sources. The alternative sources do not support the first-class versioning mechanism, but some sources have their own mechanisms for selecting particular VCS commits, etc.

We recommend that modules distributed via other protocols still use the standard module structure so that it can be used in a similar way to a registry module, or even become a registry module at a later time.