10BC0 update mono repo publishing docs for ga · hashicorp/web-unified-docs@d80be13 · GitHub
[go: up one dir, main page]

Skip to content

Commit d80be13

Browse files
committed
update mono repo publishing docs for ga
1 parent 9f93acf commit d80be13

File tree

1 file changed

+9
-66
lines changed

1 file changed

+9
-66
lines changed

content/terraform-docs-common/docs/cloud-docs/registry/publish-modules.mdx

Lines changed: 9 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ You must be a member of the [owners team](/terraform/cloud-docs/users-teams-orga
3535

3636
### VCS provider settings
3737

38-
- You must configure a VCS provider connection. Refer to [Connect to VCS Providers](/terraform/cloud-docs/vc) for more information.
38+
- You must configure a VCS provider connection. Refer to [Connect to VCS Providers](/terraform/cloud-docs/vcs) for more information.
3939
- The source directory settings in your VCS must specify the path to the module configuration files.
4040

4141
### Repository configuration
@@ -49,78 +49,21 @@ The registry automatically detects module names and versions in the repository.
4949

5050
### Release tag prefixes
5151

52-
Specify a prefix to filter repository Git tags when using the [tag-based publishing type](#tag-based-publishing-considerations) in a repository that contains code for multiple modules. Without a prefix, HCP Terraform and Terraform Enterprise publish new versions for all modules with valid Git tags that use semantic versioning.
52+
In a repository that contains code for multiple modules, specify a prefix to filter repository Git tags when using the [tag-based publishing type](#tag-based-publishing-considerations). Without a prefix, HCP Terraform and Terraform Enterprise publish new versions for all modules with valid Git tags that use semantic versioning.
5353

54-
For example, specifying `app` as a tag prefix for the registry module instructs HCP Terraform to select only Git tags with the prefix `app` in them. As a result, HCP Terrraform selects the module tagged with `appv1.0.0` and publishes `v1.0.0` to the registry.
54+
For example, you could use the following release tags in your GitHub repository:
5555

56-
Refer to [Enable publishing from a single repository](#enable-publishing-from-a-single-repository)
56+
- `v1.0.0`
57+
- `app-v1.0.0`
5758

58-
### Module
59+
Then, you could specify `app-` in the **Module Tag Prefix** field when configuring the settings for publishing modules in HCP Terraform or Terraform Enterprise. As a result, the platform selects the module tagged with `app-v1.0.0` and publishes `v1.0.0` to the registry. In this example, HCP Terraform or Terraform Enterprise would also publish version `v1.0.1` of the module when a new release in the repository is tagged with `app-v1.0.1`.
5960

60-
By default, HCP Terraform and Terraform Enterprise require a separate repository for each module. As a result, each module must use the following three-part naming convention:
61-
62-
`terraform-<PROVIDER>-<NAME>`
63-
64-
The `<NAME>` segment reflects the type of infrastructure the module manages and `<PROVIDER>` is the main provider where it creates the infrastructure.
65-
66-
The `<PROVIDER>` segment must be all lowercase. The `<NAME>` segment can contain additional hyphens.
67-
68-
Examples:
69-
70-
- `terraform-google-vault`
71-
- `terraform-aws-ec2-instance`
72-
73-
When the **Publish modules to your private registry from a single repository** option is enabled,you can store multiple modules in a single repository. As a result, modules do not need to follow the naming convention. Refer to the following topics for more information:
74-
75-
- [Enable publishing from a single repository](#enable-publishing-from-a-single-repository)
76-
- [Multiple modules in a single repository](#multiple-modules-in-a-single-repository)
77-
78-
## Enable publishing from a single repository
79-
80-
@include 'beta.mdx'
81-
82-
By default, HCP Terraform and Terraform Enterprise retrieve new versions of modules published to the private registry according to the repository release tag. As a result, you must store the code for each module in separate repositories. Otherwise, the registry retrieves and publishes new versions of all modules in a repository each time you create a new release tag.
83-
84-
If you want to use a single repository to store modules source code, you can enable the **Publish modules to your private registry from a single repository** option in your workspace's general settings. When this option is enabled, you can add a prefix to the version tag that the registry uses to select module sources to publish when new you create new release tags. Refer to [Release tag prefixes](#release-tag-prefixes) for additional information.
85-
86-
After enabling this option, complete the instructions for [publishing a new module](#publish-a-new-module).
61+
To change the default behavior, you can disable the **Publish modules to your private registry from a single repository** option in your workspace's general settings. When disabled, you should store the source code for each module in separate repositories, otherwise HCP Terraform and Terraform Enterprise may publish new versions of all modules in the repository each time you create a new release tag.
8762

8863
## Publish a new module
8964

9065
You can publish modules using either the UI or API. Refer to [Publish a Private Module from a VCS](/terraform/cloud-docs/api-docs/private-registry/modules#publish-a-private-module-from-a-vcs) for instructions on using API. Note that you can also call the API to publish modules without a VCS repository as the source, which is not possible in the UI.
9166

92-
The interface for publishing modules and the registry behavior depends on how the **Publish modules to your private registry from a single repository** option. Refer to [Enable publishing from a single repository](#enable-publishing-from-a-single-repository) for more information about this setting.
93-
94-
### One module per repository
95-
96-
The **Publish modules to your private registry from a single repository** option is disabled by default, which requires requires each module to be stored in its own repository. Complete the following steps when this option is disabled:
97-
98-
1. Sign in to [HCP Terraform](https://app.terraform.io/) or Terraform Enterprise and navigate to the organization where you want to publish a module.
99-
1. Select **Registry** from the sidebar.
100-
1. Choose **Module** from the **Publish** and drop-down menu. The **Add Module** page appears with a list of available repositories.
101-
1. Click on a VCS connection. The screen advances to the **Choose a repository** step.
102-
1. Select the repository containing the module you want to publish.
103-
104-
You can search the list by typing part or all of a repository name into the filter field. Remember that VCS providers use `<NAMESPACE>/<REPO NAME>` strings to locate repositories. The namespace is an organization name for most providers, but Bitbucket Data Center, not Bitbucket Cloud, uses project keys, like `INFRA`.
105-
106-
1. When prompted, choose either the **Tag** or **Branch** module publishing type.
107-
108-
1. (Optional) If this module is a [no-code ready module](/terraform/cloud-docs/workspaces/no-code-provisioning/module-design), select the **Add Module to no-code provision allowlist** checkbox.
109-
110-
<!-- BEGIN: TFC:only name:pnp-callout -->
111-
@include 'tfc-package-callouts/nocode.mdx'
112-
<!-- END: TFC:only name:pnp-callout -->
113-
114-
1. Click **Publish module**.
115-
116-
HCP Terraform displays a loading page while it imports the module versions and then takes you to the new module's details page. On the details page, you can view available versions, read documentation, and copy a usage example.
117-
118-
### Multiple modules in a single repository
119-
120-
@include 'beta.mdx'
121-
122-
Complete the following steps when the **Publish modules to your private registry from a single repository** option is enabled:
123-
12467
1. Sign in to [HCP Terraform](https://app.terraform.io/) or Terraform Enterprise and navigate to the organization where you want to publish a module.
12568
1. Select **Registry** from the sidebar.
12669
1. Choose **Module** from the **Publish** and drop-down menu. The **Add Module** page appears with a list of available repositories.
@@ -131,7 +74,7 @@ Complete the following steps when the **Publish modules to your private registry
13174

13275
When **Tag** is enabled:
13376

134-
- In the **Module Tag Prefix** field, specify a Git tag prefix. The registry uses the prefix and a release version as a unique identifier when sourcing code for multiple modules in a single repository. Refer to [Requirements](#requirements) for more information about setting up tags.
77+
- In the **Module Tag Prefix** field, specify a Git tag prefix. The registry uses the prefix and a release version as a unique identifier when sourcing code for multiple modules in a single repository. Refer to [Release tag prefixes](#release-tag-prefixes) for more information about setting up tags.
13578
- In the **Source Directory** field, specify the path to the module source code.
13679

13780
When **Branch** is enabled:
@@ -165,7 +108,7 @@ To enable the **Branch** module publishing type, you must provide the name of an
165108

166109
You can only enable testing on modules published using branch-based publishing. Refer to the [test-integrated modules](/terraform/cloud-docs/registry/test) documentation for more information.
167110

168-
Module testing is disabled when the **Publish modules to your private registry from a single repository** option is enabled in your workspace's general settings. Refer to [Enable publishing from a single repository](#enable-publishing-from-a-single-repository) for more information.
111+
Module testing is disab 4A96 led when the **Publish modules to your private registry from a single repository** option is enabled in your workspace's general settings.
169112

170113

171114
## Release new module versions

0 commit comments

Comments
 (0)
0