I'm trying to create a tag template in Google Data Catalog using Terraform.
Once created - the tag template's visibility is set to "Private".
Looking for a way to set the visibility to Public.
My code:
resource "google_data_catalog_tag_template" "data_category" {
project = var.project_id
region = var.location
tag_template_id = "data_category"
display_name = "Data Category"
is_publicly_readable = true
fields {
field_id = "data_category1"
display_name = "Data Category 1"
description = ""
is_required = true
order = 3
type {
enum_type {
allowed_values {display_name = "Category A"}
allowed_values {display_name = "Category B"}
}
}
}
}
When creating a tag template through the API there's an attribute "isPubliclyReadable" that I could set, but when trying to use it in TF I get an error:
An argument named "is_publicly_readable" is not expected here.
Which is expected since I've seen no mention of such argument in TF's documentation.

Seeing as the only way to set the visibility of a tag template (Not through the UI) was by using a PATCH API (As documented here).
And seeing as TF's http resource only supports GET\HEAD\POST methods.
I've managed to set the visibility using null_resource that executed a python script which called the API.
TF resource:
And the python code: