Overview
Add, manage, and remove tags from pipelines to organize and filter resources in Harness.
Tags are metadata that you can attach to Harness entities, such as pipelines, services, environments, and repositories. They allow you to organize, search, and filter resources. You can add multiple tags to an entity in the form of key-value pairs or key-only flags.
What you will learn in this topic
By the end of this topic, you will know how to:
Add tags to new and existing pipelines.
Search and filter pipelines using tags.
Remove tags from pipelines.
Understand how tags sync between pipeline YAML and Harness metadata.
Handle tags for Git-stored pipelines across multiple branches.
Before you begin
Before you work with pipeline tags, ensure you have the following:
Access to a Harness project: You need permissions to view and edit pipelines. Go to RBAC in Harness to configure roles.
Understanding of pipelines: Familiarity with creating and managing pipelines in Harness. Go to Create your pipeline to learn the basics.
Create tags for pipelines
In your Harness account, go to Pipelines and create a pipeline or select an existing pipeline. You can specify tags when you are creating a new pipeline.
If you want to add tags to an existing pipeline, use the pencil icon next to the name of the pipeline, and specify tags under the Tags (optional) field.
Search and filter using tags
You can use tags to search for all matching entities. For example, if you add the tag docs to two projects, a search for doc returns projects with names and tags that match:

Remove tags from pipelines
Go to the pipeline whose tag you want to remove and select Edit. Remove the tag and click Save to apply the changes.
Tag sources and syncing
There are two locations where tags are stored:
In the pipeline YAML: The source of truth for pipeline configuration.
In the Harness metadata: Properties that Harness stores for fast reference, indexing, and filtering.
Handle tag updates in pipeline YAML
Inline pipelines
The Harness metadata for a pipeline is synced with the latest values of the tags whenever the pipeline is saved in Harness (when YAML is stored as inline). This includes updates made via the Update API.
Remote pipelines
If you update the tags in the pipeline YAML directly (by updating the YAML stored in Git when your pipeline is stored remotely), this does not update the Harness metadata. This can lead to discrepancies in displayed tags.
Display tags
Tags are displayed on two main pages: the page that lists the pipelines (Pipeline List page) and the page that gives details about a specific pipeline (Pipeline Detail page page).
Pipeline List page: Reads tags from the Harness metadata. Changes made directly in the YAML that are not synced by saving the pipeline will not reflect here.
Pipeline Detail page: Reads the latest pipeline YAML from the source (repository or inline), displaying the newest values of the tags.
To ensure tags are displayed correctly in both the list and filters, save the pipeline in Harness after making any changes.
Delegate tags and general tags
Delegate tags are different from general tags in the following ways:
Delegate tags: Tags added to delegates.
Not used in searches: Delegate tags are not used in searches.
Separate tagging: Delegates are only tagged with delegate tags. General tags are not applied to delegates.
Handling multiple branches in Git
When different versions of the pipeline exist in different branches in Git, Harness stores only one set of tags in its metadata for the pipeline entity, not one set per branch. The Harness metadata reflects whichever branch was most recently saved in Harness through Pipeline Studio or the API, and that same set of tags is used for the Pipeline List page and for filtering, regardless of which branch you view.
TAGS ARE GLOBAL TO THE PIPELINE, NOT PER BRANCH
If you save branch A in Harness with tags X, and later save branch B in Harness with tags Y, tags Y replace tags X in the Harness metadata. Tags Y are then used for the pipeline as an entity, no matter which branch is referred to, for operations such as RBAC and searches, until a branch is saved again in Harness.
Updating tags directly in the pipeline YAML in Git, without saving the pipeline in Harness, does not update the Harness metadata. Pipeline Studio shows the new tags because it reads the YAML from Git, but the Pipeline List page and execution list continue to show the previous metadata tags.
To make a tag change take effect in the Harness metadata, save the pipeline from Pipeline Studio, or call the pipeline Update API, on the branch where you want the tags applied.
Limitations
Runtime inputs: Runtime inputs (
<+input>) are not supported in tags.Variable expressions: Harness variable expressions can be used in pipeline tags. Go to Built-in Harness Variables and Expressions Reference to learn more.
Next steps
You have learned how to add, remove, and manage tags for pipelines. Tags help you organize and filter resources at scale.
RBAC in Harness: Understand the permissions and role-based access control in Harness.
Manage pipeline access with tag-based RBAC: Control permissions using tags instead of selecting individual pipelines.
Apply filters using tags: Filter and search Harness entities based on tags.
Assign metadata using tags: Organize and categorize resources with tag metadata.
Last updated
Was this helpful?