Tag Types

Private Cloud Appliance supports two kinds of tags:

  • Free-form tags are created and applied to resources by users. They contain unmanaged metadata.

  • Defined tags offer a structured approach to tagging. Administrators create and manage the metadata, while users only have the ability to apply a tag to a resource, and in some cases add a value.

Most of the tagging features require defined tags. They ensure that the applied metadata is reliable for managing resources, collecting accurate information and automating certain operations. With defined tags, the following scenarios become possible:

  • Creating default tags that are applied to all resources in compartments.

  • Specifying that users must apply tags to resources to successfully create resources in compartments.

  • If you make a typo using defined tags, correct it by editing or even deleting the tag. When you delete a defined tag, the key and any value for that tag are removed from all resources.

  • Associating a list of predefined values with a defined tag.

  • Using system variables to generate values for defined tags or tag defaults automatically.

Both free-form tags and defined tags can be used simultaneously within a tenancy. The table below shows a feature comparison of the two types.

Feature Free-form Tags Defined Tags

Hierarchy

Free-form tags consist of a key and a value, but do not belong to a namespace.

Defined tags consist of a tag namespace, a key, and a value.

Creation and application

Free-form tags can be applied during resource creation or to an existing resource.

The tag namespace and tag key definition must be set up in advance by an administrator.

Defined tags can be applied during resource creation or to an existing resource.

Predefined keys and values

Not supported.

When applying a defined tag, users select from the list of tag keys.

Administrators can also create a list of predefined values to associate with a tag key. When applying a tag to a resource, users must select a value from that list.

Variables

Not supported.

Variables are used to set the value of a defined tag. When a user applies the tag, the variable is resolved and replaced with the data it represents.

Case sensitivity

Free-form tag keys and values are both case sensitive.

In defined tags, the key is not case sensitive; only the tag values are case sensitive.

Free-form tags allow users to quickly and conveniently include relevant information in the metadata of a resource. However, you should be aware of their limitations:

  • When applying a free-form tag, you cannot see a list of existing free-form tags, so you do not know what tags and values have already been used. It is not possible to list the free-form tags used in your tenancy. The OCI CLI does allow you to list a set of resources and view the free-form tags applied to them.

  • You cannot control access to resources based on free-form tags. They cannot be used in IAM policy statements.

  • You cannot use predefined tag values or tag variables in free-form tags.