Resource Tags

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 Tagging Overview.

Tip

Watch a video to introduce you to the concepts and features of tagging: Introduction to Tagging.

Working with Resource Tags

Caution

Avoid entering confidential information when assigning descriptions, tags, or friendly names to your cloud resources through the Oracle Cloud Infrastructure Console, API, or CLI.
To add a defined tag to an existing resource

To apply a defined tag, you must have permission to use the namespace.

  1. 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. Under Core Infrastructure, go to Compute and click 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.

  2. Click Apply Tags. Depending on the resource, this option might appear in the More Actions menu.
  3. In the Apply Tags to the Resource dialog:

    1. Select the Tag Namespace.
    2. Select the Tag Key.
    3. In Value, either enter a value or select one from the list.
    4. To apply another tag, click + Additional Tag.
    5. When finished adding tags, click Apply Tag(s).
To add a free-form tag to an existing resource
  1. 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. Under Core Infrastructure, go to Compute and click 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.

  2. Click Apply Tags. Depending on the resource, this option might appear in the More Actions menu.
  3. In the Apply Tags to the Resource dialog:

    1. Select None (apply a free-form tag).
    2. Enter the Tag Key.
    3. Enter a Value.
    4. To apply another tag, click + Additional Tag.
    5. When finished adding tags, click Apply Tag(s).
To add a tag during resource creation

You can apply tags during resource creation. The location of the Apply Tag(s) option in the dialog varies by resource. The general steps are:

  1. In the resource Create dialog, click Apply Tags.

    On some resources, you have to click Show Advanced Options to apply a tag.

  2. In the Apply Tags to the Resource dialog:

    1. Select the Tag Namespace, or select None to apply a free-form tag.
    2. Select or enter the Tag Key.
    3. In Value, either enter a value or select one from the list.
    4. To apply another tag, click + Additional Tag.
    5. Click Apply Tag(s).
To filter a list of resources by a tag

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.

To update a tag applied to a resource
  1. 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. Under Core Infrastructure, go to Compute and click 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.

  2. Click Tags.

    The list of tags applied to the resource is displayed.

  3. Find the tag you want to update and click the pencil icon next to it.
  4. Enter or select a new value.
  5. Click Save.
To remove a tag from a resource
  1. 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. Under Core Infrastructure, go to Compute and click 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.

  2. Click Tags.

    The list of tags applied to the resource is displayed.

  3. Find the tag you want to remove and click the pencil icon next to it.
  4. Click Remove Tag.