Google Data catalog Policy Tag

This page shows how to write Terraform for Data catalog Policy Tag and write them securely.

google_data_catalog_policy_tag (Terraform)

The Policy Tag in Data catalog can be configured in Terraform with the resource name google_data_catalog_policy_tag. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L16
resource "google_data_catalog_policy_tag" "pii_policy_tag" {
  provider     = google-beta
  taxonomy     = google_data_catalog_taxonomy.basic_taxonomy.id
  display_name = "PII"
  description  = "A policy tag normally associated with PII data"
}

Review your Terraform file for Google best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

The following arguments are supported:

  • display_name - (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.

  • parent_policy_tag - (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.

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]"

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

Explanation in Terraform Registry

Denotes one policy tag in a taxonomy.

Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources. To get more information about PolicyTag, see:

Frequently asked questions

What is Google Data catalog Policy Tag?

Google Data catalog Policy Tag is a resource for Data catalog of Google Cloud Platform. Settings can be wrote in Terraform.

Where can I find the example code for the Google Data catalog Policy Tag?

For Terraform, the itsavvy-ankur/data-catalog-policy-tags source code example is useful. See the Terraform Example section for further details.

security-icon

Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.