Manage artifact tags
This topic describes how to add and manage tags for items hosted in your private registry, such as modules, providers, and Stacks component configurations.
Overview
You can assign project tags to modules, providers, and Stack components in the registry. This helps you consistently use metadata across entities in your system. Use tags to indicate project association, describe intended environments, and apply other meaningful labels. When you tag an artifact with a project tag, they also appear on the project overview page.
Requirements
You must be on an IBM HCP Terraform standard plan to add environment tags to individual artifact versions. Refer to the pricing page for more information.
You can only assign existing tags to registry artifacts. Refer to Define project tags for instructions on creating project tags that you can assign to items in your registry. For instructions on how to create registry environment tags, refer to Create and manage reserved tag keys.
The following settings must be enabled for your organization to attach tags to artifacts in the registry:
- Assign project tags to modules, providers, and Stack component configurations
- Assign reserved keys to module, provider, and Stack component configuration versions
Attach project tags to a single registry artifact
- Sign in to HCP Terraform and navigate to your organization.
- Click on Registry in the sidebar, then click either Modules, Providers, or Stack component configurations .
- Click on the artifact, then click Tags in the sidebar.
- On the Manage tags page, browse for tags that you want to attach to the artifact. You can click on the link in either the Projects or Workspaces column view the projects and workspaces that have the tag.
- Select the tags you want to attach to the artifact, the click Save changes.
Attach project tags to registry artifacts in bulk
- Log into HCP Terraform and navigate to your organization.
- Click on Registry in the sidebar, then click either Modules, Providers, or Stack component configurations.
- Click the bulk selection button for the artifact type. For example, if you clicked Modules in the previous step, click Bulk select modules.
- Choose the artifacts in the results table that you want to attach the same tag to.
- Click Assign tags from the Actions drop-down.
- When prompted, choose the tags to assign, then click Save.
Attach registry environment tags to artifact versions
When you create reserved tags for the organization, you can enable the Registry environment tag option, which lets you assign the tag to a module, provider, or Stack component configuration version in the registry. Refer to Define a reserved tag key for information about designating an organization key as the registry environment tag.
- Sign in to HCP Terraform and navigate to your organization.
- Click on Registry in the sidebar, then click either Modules, Providers, or Stack component configuration.
- Click on the artifact to open its detail page.
- Mouse over Environment tags link, then click Manage environment tags from the tooltip.
- When prompted, choose the artifact version to assign the tags to from the drop-down.
- Choose one or more environment tags, then click Save.
HCP Terraform attaches the selected environment tags to the artifact version.
The tags are also available in the Filters section in the registry so that you can more easily browse for suitable artifacts to use for your workspaces. Refer to Use artifacts from the HCP Terraform private registry for more information.