google_data_catalog_policy_tag

Denotes one policy tag in a taxonomy.

To get more information about PolicyTag, see:

Open in Cloud Shell

Example Usage - Data Catalog Taxonomies Policy Tag Basic

resource "google_data_catalog_policy_tag" "basic_policy_tag" {
  taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
  display_name = "Low security"
  description = "A policy tag normally associated with low security items"
}

resource "google_data_catalog_taxonomy" "my_taxonomy" {
  display_name =  "taxonomy_display_name"
  description = "A collection of policy tags"
  activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
}
Open in Cloud Shell

Example Usage - Data Catalog Taxonomies Policy Tag Child Policies

resource "google_data_catalog_policy_tag" "parent_policy" {
  taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
  display_name = "High"
  description = "A policy tag category used for high security access"
}

resource "google_data_catalog_policy_tag" "child_policy" {
  taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
  display_name = "ssn"
  description = "A hash of the users ssn"
  parent_policy_tag = google_data_catalog_policy_tag.parent_policy.id
}

resource "google_data_catalog_policy_tag" "child_policy2" {
  taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
  display_name = "dob"
  description = "The users date of birth"
  parent_policy_tag = google_data_catalog_policy_tag.parent_policy.id
  // depends_on to avoid concurrent delete issues
  depends_on = [google_data_catalog_policy_tag.child_policy]
}

resource "google_data_catalog_taxonomy" "my_taxonomy" {
  display_name =  "taxonomy_display_name"
  description = "A collection of policy tags"
  activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
}

Argument Reference

The following arguments are supported:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

PolicyTag can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import PolicyTag using one of the formats above. For example:

import {
  id = "{{name}}"
  to = google_data_catalog_policy_tag.default
}

When using the terraform import command, PolicyTag can be imported using one of the formats above. For example:

$ terraform import google_data_catalog_policy_tag.default {{name}}