» Data Source: oci_identity_tag

This data source provides details about a specific Tag resource in Oracle Cloud Infrastructure Identity service.

Gets the specified tag's information.

» Example Usage

data "oci_identity_tag" "test_tag" {
    tag_name = "${oci_identity_tag.test_tag.name}"
    tag_namespace_id = "${oci_identity_tag_namespace.test_tag_namespace.id}"

» Argument Reference

The following arguments are supported:

» Attributes Reference

The following attributes are exported:

  • defined_tags - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
  • description - The description you assign to the tag.
  • freeform_tags - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
  • id - The OCID of the tag definition.
  • is_cost_tracking - Indicates whether the tag is enabled for cost tracking.
  • is_retired - Indicates whether the tag is retired. See Retiring Key Definitions and Namespace Definitions.
  • name - The name assigned to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
  • state - The tag's current state. After creating a tag, make sure its lifecycleState is ACTIVE before using it. After retiring a tag, make sure its lifecycleState is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag's lifecycleState changes from DELETING to DELETED.
  • tag_namespace_id - The OCID of the namespace that contains the tag definition.
  • time_created - Date and time the tag was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
  • validator - The tag must have a value type, which is specified with a validator. Tags can use either a static value or a list of possible values. Static values are entered by a user applying the tag to a resource. Lists are created by you and the user must apply a value from the list. Lists are validiated.

    If you use the default validiator (or don't define a validator), the user applying the tag enters a value. No additional validation is performed.

    To clear the validator, call UpdateTag with DefaultTagDefinitionValidator.

    • validator_type - Specifies the type of validation: a static value (no validation) or a list.
    • values - The list of allowed values for a definedTag value.