github.com/jzbruno/terraform@v0.10.3-0.20180104230435-18975d727047/website/docs/registry/modules/publish.html.md (about)

     1  ---
     2  layout: "registry"
     3  page_title: "Terraform Registry - Publishing Modules"
     4  sidebar_current: "docs-registry-publish"
     5  description: |-
     6    Anyone can publish and share modules on the Terraform Registry.
     7  ---
     8  
     9  # Publishing Modules
    10  
    11  Anyone can publish and share modules on the [Terraform Registry](https://registry.terraform.io).
    12  
    13  Published modules support versioning, automatically generate documentation,
    14  allow browsing version histories, show examples and READMEs, and more. We
    15  recommend publishing reusable modules to a registry.
    16  
    17  Public modules are managed via Git and GitHub. Publishing a module takes only
    18  a few minutes. Once a module is published, you can release a new version of
    19  a module by simply pushing a properly formed Git tag.
    20  
    21  The registry extracts the name of the module, the provider, the documentation,
    22  inputs/outputs, and more directly from the source of the module. No manual
    23  annotations are required.
    24  
    25  ## Requirements
    26  
    27  The list below contains all the requirements for publishing a module.
    28  Meeting the requirements for publishing a module is extremely easy. The
    29  list may appear long only to ensure we're detailed, but adhering to the
    30  requirements should happen naturally.
    31  
    32  * **GitHub.** The module must be on GitHub and must be a public repo.
    33  This is only a requirement for the [public registry](https://registry.terraform.io).
    34  If you're using a private registry, you may ignore this requirement.
    35  
    36  * **Repository name.** The repository name must be `terraform-PROVIDER-NAME`
    37  where PROVIDER is the primary provider to associate with the module and
    38  NAME is a unique name for the module. The name may contain hyphens. Example:
    39  `terraform-aws-consul` or `terraform-google-vault`.
    40  
    41  * **Repository description.** The GitHub repository description is used
    42  to populate the short description of the module. This should be a simple
    43  one sentence description of the module.
    44  
    45  * **Standard Module Structure.** The module must adhere to the
    46  [standard module structure](/docs/modules/create.html#standard-module-structure).
    47  This allows the registry to inspect your module and generate documentation,
    48  track resource usage, and more.
    49  
    50  * **Tags for Releases.** Releases are detected by creating and pushing
    51  tags. The tag name must be a semantic version that can optionally be prefixed
    52  with a `v`. Examples are `v1.0.4` and `0.9.2`. To publish a module initially,
    53  at least one release tag must be present.
    54  
    55  ## Publishing a Public Module
    56  
    57  With the requirements met, you can publish a public module by going to
    58  the [Terraform Registry](https://registry.terraform.io) and clicking the
    59  "Upload" link in the top navigation.
    60  
    61  If you're not signed in, this will ask you to connect with GitHub. We only
    62  ask for access to public repositories, since the public registry may only
    63  publish public modules. We require access to hooks so we can register a webhook
    64  with your repository. We require access to your email address so that we can
    65  email you alerts about your module. We will not spam you.
    66  
    67  The upload page will list your available repositories, filtered to those that
    68  match the [naming convention described above](#Requirements). This is shown in
    69  the screenshot below. Select the repository of the module you want to add and
    70  click "Publish Module."
    71  
    72  In a few seconds, your module will be created.
    73  
    74  ![Publish Module flow animation](/assets/images/docs/registry-publish.gif)
    75  
    76  ## Releasing New Versions
    77  
    78  The Terraform Registry uses tags to detect releases.
    79  
    80  Tag names must be a valid [semantic version](http://semver.org), optionally
    81  prefixed with a `v`. Example of valid tags are: `v1.0.1` and `0.9.4`. To publish
    82  a new module, you must already have at least one tag created.
    83  
    84  To release a new version, create and push a new tag with the proper format.
    85  The webhook will notify the registry of the new version and it will appear
    86  on the registry usually in less than a minute.
    87  
    88  If your version doesn't appear properly, you may force a sync with GitHub
    89  by viewing your module on the registry and clicking "Force GitHub Sync"
    90  under the "Manage Module" dropdown. This process may take a few minutes.
    91  Please only do this if you do not see the version appear, since it will
    92  cause the registry to resync _all versions_ of your module.