Google Data Catalog Template Tags

Hello all,

I am trying to create template tags on GCP and assign those tags to BigQuery datasets through terraform.

I already created the tags with terraform through this resource “google_data_catalog_tag_template” and I need to attach those tags to the exisiting BigQuery Datasets but there are no attributes in the resource for that.

Can someone mention what the needed steps to achieve that?

This may help, once check the below code

resource “google_data_catalog_entry” “example_entry” {
entry_group = google_data_catalog_entry_group.example_group.name
display_name = “Example Dataset”
description = “This is an example dataset.”

schema {
columns {
column {
name = “column_name”
type = “STRING”
mode = “NULLABLE”
description = “Column description”
}
# Add more columns if needed
}
# Add more schema blocks if needed
}
}

resource “google_data_catalog_tag” “example_tag” {
template = google_data_catalog_tag_template.example_template.name
column = google_data_catalog_entry.example_entry.name
fields {
string_value = “tag_value”
}
}

resource “google_data_catalog_tag_template” “example_template” {
display_name = “Example Template”
fields {
display_name = “Example Field”
type = “STRING”
}
}

resource “google_data_catalog_entry_group” “example_group” {
display_name = “Example Entry Group”
description = “This is an example entry group.”
location = “us”
}

There is no direct way to assign template tags to existing BigQuery datasets through Terraform using the google_data_catalog_tag_template resource.

Is there any way to attach Data Catalog tags to GCP BigQuery tables via terraform?