When you have many resources (for example, instances, VCNs, load balancers, and block volumes) across multiple compartments in your tenancy, it can become difficult to track resources used for specific purposes, or to aggregate them, report on them, or take bulk actions on them. Tagging allows you to define keys and values and associate them with resources. You can then use the tags to help you organize and list resources based on your business needs.
There are two types of tags:
Defined tags are set up in your tenancy by an administrator. Only users granted permission to work with the defined tags can apply them to resources.
Free-form tags can be applied by any user with permissions on the resource.
For more detailed information about tags and their features, see Overview of Tagging.
Tip
Watch a video to introduce you to the concepts and features of tagging: Introduction to Tagging.
Caution
Avoid entering confidential information when assigning descriptions, tags, or friendly names to cloud resources through the Oracle Cloud Infrastructure
Console, API, or CLI.
How to add multiple defined tags to existing resources. To apply defined tags, you must
have permission to use the namespace.
Open the navigation menu and select Governance & Administration. Under Tenancy Management, select Tenancy Explorer.
Select the resources to which you want to add tags. Optionally, use the
Filter by resource type drop-down menu to narrow the
list of resources.
In the Actions menu, click Manage
Tags.
The Manage Tags page opens. The first table displays the tags currently applied
to the selected resources. The second table displays the selected resources.
Under the list of existing tags, click + Add New.
Select the Tag Namespace.
Select the Tag Key.
For Value, enter a value.
To apply another tag, repeat the previous step. To remove a row, click the
Remove (x) button.
When you have added all the desired tags, click Next.
A confirmation page opens that lists the actions to take and the resources that
the actions apply to.
Click Submit.
The Work Request page launches to show you the status of the work request to add tags to
the resources.
To apply a defined tag, you must have permission to use the namespace.
Open the Console, go to the details page of the resource you want to tag.
For example, to tag a compute instance: Open the navigation menu and select Compute. Under Compute, select Instances. A list of the instances in your current compartment is displayed. Find the instance that you want to tag, and click its name to view its details page.
Click Apply Tags. Depending on the resource, this option might appear in the More Actions menu.
In the Apply Tags to the Resource dialog:
Select the Tag Namespace.
Select the Tag Key.
In Value, either enter a value or select one from the list.
Open the Console, go to the details page of the resource you want to tag.
For example, to tag a compute instance: Open the navigation menu and select Compute. Under Compute, select Instances. A list of the instances in your current compartment is displayed. Find the instance that you want to tag, and click its name to view its details page.
Click Apply Tags. Depending on the resource, this option might appear in the More Actions menu.
Open the Console, click the service name and then click the resource you want to view. The left side of the page shows all the filters currently applied to the list.
For example, to view compute instances: Click Compute and then click Instances, to see the list of instances in your current compartment.
In the Add a tag filter dialog, enter the following:
Tag namespace: Select the tag namespace.
Tag key: Select the key.
Tag value: Select from the following:
Match any value - returns all resources tagged with the selected namespace and key, regardless of the tag value.
Specify matching values - returns resources with the tag value you enter in the text box. Enter a single value in the text box. To specify multiple values for the same namespace and key, select + to display another text box. Enter one value per text box.
In the Add a tag filter dialog, enter the following:
Tag namespace: Select None (free-form tag).
Tag key: Enter the key.
Tag value: Select from the following:
Match any value - returns all resources tagged with the selected namespace and key, regardless of the tag value.
Specify matching values - returns resources with the tag value you enter in the text box. Enter a single value in the text box. To specify multiple values for the same namespace and key, select + to display another text box. Enter one value per text box.
How to update defined tags applied to one or more resources.
Open the navigation menu and select Governance & Administration. Under Tenancy Management, select Tenancy Explorer.
Select the resources whose tags you want to update. Optionally, use the
Filter by resource type drop-down menu to narrow the
list of resources.
In the Actions menu, click Manage
Tags.
The Manage Tags page opens. The first table displays the tags currently applied
to the selected resources. The second table displays the selected resources.
In the list of tags, find the tag that you want to update and enter a new value. To
revert the change, click the Undo button.
For Action, select Apply tag to all selected
resources.
If desired, update more tag values. Then, click Next.
A confirmation page opens that lists the actions to take and the resources that
the actions apply to.
Click Submit.
The Work Request page launches to show you the status of the work request to update the
tags on the resources.
Open the Console, click the service name, and then click the resource you want to view.
For example, to view compute instances: Open the navigation menu and select Compute. Under Compute, select Instances. A list of the instances in your current compartment is displayed. Find the instance that you want to update, and click its name to view its details page.
Click Tags.
The list of tags applied to the resource is displayed.
Find the tag you want to update and click the pencil icon next to it.
How to remove multiple defined tags from resources.
Open the navigation menu and select Governance & Administration. Under Tenancy Management, select Tenancy Explorer.
Select the resources from which you want to remove tags. Optionally, use the
Filter by resource type drop-down menu to narrow the
list of resources.
In the Actions menu, click Manage
Tags.
The Manage Tags page opens. The first table displays the tags currently applied
to the selected resources. The second table displays the selected resources.
In the list of tags, find the tag that you want to remove. For
Action, select Remove tag from all selected
resources.
To remove another tag, repeat the previous step.
Click Next.
A confirmation page opens that lists the actions to take and the resources that
the actions apply to.
Click Submit.
The Work Request page launches to show you the status of the work request to remove tags
from the resources.
Open the Console, click the service name and then click the resource you want to view.
For example, to view a compute instance: Open the navigation menu and select Compute. Under Compute, select Instances. A list of the instances in your current compartment is displayed. Find the instance that you want to remove the tag from, and click its name to view its details page.
Click Tags.
The list of tags applied to the resource is displayed.
Find the tag you want to remove and click the pencil icon next to it.