Skip to content

googleDataCatalogPolicyTag

Denotes one policy tag in a taxonomy.

To get more information about PolicyTag, see:

Example Usage - Data Catalog Taxonomies Policy Tag Basic

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleDataCatalogTaxonomyMyTaxonomy =
  new google.dataCatalogTaxonomy.DataCatalogTaxonomy(this, "my_taxonomy", {
    activated_policy_types: ["FINE_GRAINED_ACCESS_CONTROL"],
    description: "A collection of policy tags",
    display_name: "taxonomy_display_name",
  });
new google.dataCatalogPolicyTag.DataCatalogPolicyTag(this, "basic_policy_tag", {
  description: "A policy tag normally associated with low security items",
  display_name: "Low security",
  taxonomy: googleDataCatalogTaxonomyMyTaxonomy.id,
});

Example Usage - Data Catalog Taxonomies Policy Tag Child Policies

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleDataCatalogTaxonomyMyTaxonomy =
  new google.dataCatalogTaxonomy.DataCatalogTaxonomy(this, "my_taxonomy", {
    activated_policy_types: ["FINE_GRAINED_ACCESS_CONTROL"],
    description: "A collection of policy tags",
    display_name: "taxonomy_display_name",
  });
const googleDataCatalogPolicyTagParentPolicy =
  new google.dataCatalogPolicyTag.DataCatalogPolicyTag(this, "parent_policy", {
    description: "A policy tag category used for high security access",
    display_name: "High",
    taxonomy: googleDataCatalogTaxonomyMyTaxonomy.id,
  });
const googleDataCatalogPolicyTagChildPolicy =
  new google.dataCatalogPolicyTag.DataCatalogPolicyTag(this, "child_policy", {
    description: "A hash of the users ssn",
    display_name: "ssn",
    parent_policy_tag: googleDataCatalogPolicyTagParentPolicy.id,
    taxonomy: googleDataCatalogTaxonomyMyTaxonomy.id,
  });
new google.dataCatalogPolicyTag.DataCatalogPolicyTag(this, "child_policy2", {
  depends_on: [`\${${googleDataCatalogPolicyTagChildPolicy.fqn}}`],
  description: "The users date of birth",
  display_name: "dob",
  parent_policy_tag: googleDataCatalogPolicyTagParentPolicy.id,
  taxonomy: googleDataCatalogTaxonomyMyTaxonomy.id,
});

Argument Reference

The following arguments are supported:

  • displayName - (Required) User defined name of this policy tag. It must: be unique within the parent taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.

  • taxonomy - (Required) Taxonomy the policy tag is associated with


  • description - (Optional) Description of this policy tag. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description. If not set, defaults to an empty description.

  • parentPolicyTag - (Optional) Resource name of this policy tag's parent policy tag. If empty, it means this policy tag is a top level policy tag. If not set, defaults to an empty string.

Attributes Reference

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

  • id - an identifier for the resource with format {{name}}

  • name - Resource name of this policy tag, whose format is: "projects/{project}/locations/{region}/taxonomies/{taxonomy}/policyTags/{policytag}"

  • childPolicyTags - Resource names of child policy tags of this policy tag.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

PolicyTag can be imported using any of these accepted formats:

$ terraform import google_data_catalog_policy_tag.default {{name}}