> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/use-harness-platform/tags/overview.md).

# Overview

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.

{% hint style="info" %}
**NOTE**

Tags are unavailable for feature flags.
{% endhint %}

***

### What you will learn in this topic <a href="#what-you-will-learn-in-this-topic" id="what-you-will-learn-in-this-topic"></a>

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 <a href="#before-you-begin" id="before-you-begin"></a>

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](/harness-platform/use-harness-platform/platform-access-control.md) to configure roles.
* **Understanding of pipelines**: Familiarity with creating and managing pipelines in Harness. Go to [Create your pipeline](/continuous-delivery/new-to-continuous-delivery/overview.md#create-a-pipeline) to learn the basics.

***

### Create tags for pipelines <a href="#create-tags-for-pipelines" id="create-tags-for-pipelines"></a>

In your Harness account, go to **Pipelines** and [create a pipeline](/continuous-delivery/new-to-continuous-delivery/getting-started.md#step-1-create-your-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 <a href="#search-and-filter-using-tags" id="search-and-filter-using-tags"></a>

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:

<figure><img src="/files/6xY0i9PBrYmbIaVWyVtB" alt=""><figcaption><p>Click to view full size image</p></figcaption></figure>

***

### Remove tags from pipelines <a href="#remove-tags-from-pipelines" id="remove-tags-from-pipelines"></a>

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 <a href="#tag-sources-and-syncing" id="tag-sources-and-syncing"></a>

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 <a href="#handle-tag-updates-in-pipeline-yaml" id="handle-tag-updates-in-pipeline-yaml"></a>

#### Inline pipelines <a href="#inline-pipelines" id="inline-pipelines"></a>

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 <a href="#remote-pipelines" id="remote-pipelines"></a>

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 <a href="#display-tags" id="display-tags"></a>

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 <a href="#delegate-tags-and-general-tags" id="delegate-tags-and-general-tags"></a>

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 <a href="#handling-multiple-branches-in-git" id="handling-multiple-branches-in-git"></a>

When different versions of the pipeline exist in different branches in Git, the Harness metadata is synced to the branch that was last saved in Harness. This can cause the tags to vary if multiple users work on different branches of the pipeline in Harness. The tags will update based on the latest saved branch.

***

### Limitations <a href="#limitations" id="limitations"></a>

* **Runtime inputs**: [Runtime inputs](/harness-platform/use-harness-platform/variables-and-expressions/runtime-inputs.md) (`<+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](/harness-platform/use-harness-platform/variables-and-expressions/harness-variables.md) to learn more.

***

### Next steps <a href="#next-steps" id="next-steps"></a>

You have learned how to add, remove, and manage tags for pipelines. Tags help you organize and filter resources at scale.

* [RBAC in Harness](/harness-platform/3.0/harness-platform-resources/platform-access-control/rbac-in-harness.md): Understand the permissions and role-based access control in Harness.
* [Manage pipeline access with tag-based RBAC](/harness-platform/use-harness-platform/platform-access-control/tag-based-rbac-for-pipelines.md): Control permissions using tags instead of selecting individual pipelines.
* [Apply filters using tags](/harness-platform/use-harness-platform/tags/apply-filters-using-tags.md): Filter and search Harness entities based on tags.
* [Assign metadata using tags](/harness-platform/use-harness-platform/tags/assign-metadata-using-tags.md): Organize and categorize resources with tag metadata.
