Google Data catalog Tag
This page shows how to write Terraform for Data catalog Tag and write them securely.
google_data_catalog_tag (Terraform)
The Tag in Data catalog can be configured in Terraform with the resource name google_data_catalog_tag. The following sections describe 2 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "google_data_catalog_tag" "this" {
column = var.column
parent = var.parent
template = var.template
dynamic "fields" {
resource "google_data_catalog_tag" "tag" {
for_each = local.tags
template = coalesce(var.tag_templates[each.value.tag_template_id]["name"])
parent = coalesce(var.entry_groups[each.value.parent]["name"])
column = each.value.column
Parameters
-
columnoptional - string
Resources like Entry can have schemas associated with them. This scope allows users to attach tags to an individual column based on that schema. For attaching a tag to a nested column, use '.' to separate the column names. Example: 'outer_column.inner_column'
The resource name of the tag in URL format. Example: projects/[project_id]/locations/[location]/entrygroups/[entryGroupId]/entries/[entryId]/tags/[tag_id] or projects/[project_id]/locations/[location]/entrygroups/[entryGroupId]/tags/[tag_id] where tag_id is a system-generated identifier. Note that this Tag may not actually be stored in the location in this name.
-
parentoptional - string
The name of the parent this tag is attached to. This can be the name of an entry or an entry group. If an entry group, the tag will be attached to all entries in that group.
-
templaterequired - string
The resource name of the tag template that this tag uses. Example: projects/[project_id]/locations/[location]/tagTemplates/[tagTemplateId] This field cannot be modified after creation.
-
template_displaynameoptional computed - string
The display name of the tag template.
-
fieldsset block-
bool_valueoptional - bool
Holds the value for a tag field with boolean type.
-
display_nameoptional computed - string
The display name of this field
-
double_valueoptional - number
Holds the value for a tag field with double type.
-
enum_valueoptional - string
The display name of the enum value.
-
field_namerequired - string -
orderoptional computed - number
The order of this field with respect to other fields in this tag. For example, a higher value can indicate a more important field. The value can be negative. Multiple fields can have the same order, and field orders within a tag do not have to be sequential.
-
string_valueoptional - string
Holds the value for a tag field with string type.
-
timestamp_valueoptional - string
Holds the value for a tag field with timestamp type.
-
-
timeoutssingle block
Explanation in Terraform Registry
Tags are used to attach custom metadata to Data Catalog resources. Tags conform to the specifications within their tag template. See Data Catalog IAM for information on the permissions needed to create or view tags. To get more information about Tag, see:
- API documentation
- How-to Guides
Frequently asked questions
What is Google Data catalog Tag?
Google Data catalog 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 Tag?
For Terraform, the niveklabs/google and drandell/terraform-google-datacatalog source code examples are useful. See the Terraform Example section for further details.