datacatalog: add RICHTEXT to TagTemplate primitive_type enum (#13597)#17489
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @trodge, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
|
@googlebot I signed it! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 2d9801e: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode 🟢 All tests passed in Replaying mode! No Recording was needed. View the build log |
|
@trodge This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
|
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 1 week. Please take a look! Use the label |
…oogleCloudPlatform#13597) Adds RICHTEXT to the allowed enum values for google_data_catalog_tag_template.fields.type.primitive_type. The Data Catalog v1 API has long supported RICHTEXT (per the Discovery descriptor) but the mmv1 schema was missing the value, blocking users who manage tag templates with rich-text fields via Terraform.
2d9801e to
6429e2a
Compare
|
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 2 weeks. Please take a look! Use the label |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 6429e2a: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode 🟢 All tests passed in Replaying mode! No Recording was needed. View the replaying VCR build log |
|
@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 3 weeks. Please take a look! Use the label |
Summary
Adds
RICHTEXTto the allowed enum values ofgoogle_data_catalog_tag_template.fields.type.primitive_type. The DataCatalog v1 API has supported
RICHTEXTfor years (it's listed alongsideDOUBLE,STRING,BOOL,TIMESTAMPin the Discovery descriptor forGoogleCloudDatacatalogV1FieldType.PrimitiveType), but the mmv1 schemaomitted it. Users who needed to declare rich-text tag-template fields had
to fall back to hand-rolled
gcloudcalls or imports.Fixes hashicorp/terraform-provider-google#13597 — see hashicorp/terraform-provider-google#13597
Why
Data Catalog tag templates can declare fields whose
primitive_typeisRICHTEXT(an HTML-aware longer-form description). This is documented inthe API enum and is observable in the published Discovery doc:
But
mmv1/products/datacatalog/TagTemplate.yamlonly listed four values,so the generated provider validates
primitive_typeagainst{DOUBLE, STRING, BOOL, TIMESTAMP}and rejectsRICHTEXTat plan-time.GCP API reference:
What changed
This change is to a mmv1-generated resource. Files touched in
magic-modules:
The downstream regeneration adds
RICHTEXTto:ValidateEnum([]string{"DOUBLE", "STRING", "BOOL", "TIMESTAMP", "RICHTEXT", ""})in
resource_data_catalog_tag_template.go(TPG and TPGB), andPossible valueslist in the field description.No expand/flatten logic changes are needed:
primitive_typeis alreadyround-tripped as an opaque string.
Edge cases tested
primitive_type = "RICHTEXT"expected primitive_type to be one of [DOUBLE STRING BOOL TIMESTAMP]go build,go vetall clean; theValidateEnumslice now contains"RICHTEXT"DOUBLE,STRING,BOOL,TIMESTAMP)ValidateEnumslice retains all fourValidateEnumslice still contains""for the unset caseTest protocol
cd mmv1&& go run . --output ../tpg-out --version ga --no-docsgo build ./google/services/datacatalog/...(TPG)go vet ./google/services/datacatalog/...(TPG)This is a purely additive enum extension — there is no API call
behavior change, no expand/flatten path change, and no need for live
GCP smoke. The Discovery doc is the authoritative source that the API
already accepts
RICHTEXT, and the regenerated provider's only diffversus current main is the addition of the enum value to the validation
slice and to the description string.
Resources
GoogleCloudDatacatalogV1FieldType.PrimitiveType(Discovery doc — vendored Go client at
google.golang.org/api/datacatalog/v1)https://github.com/jbbqqf/magic-modules/blob/feat/13597-datacatalog-richtext/mmv1/products/datacatalog/TagTemplate.yaml
Release notes
Disclosure
This PR was implemented with assistance from Claude Code as part of a
focused contribution batch on small mmv1 enum gaps. The diff was
reviewed manually against the GCP Data Catalog v1 API Discovery
descriptor (the canonical source for the enum's accepted values). The
regenerated TPG/TPGB provider compiled and vetted cleanly with the new
enum value. Because this is a purely additive validation extension — no
expand/flatten or API-call change — no live smoke was run.
The author (a human) reviewed the diff and the regenerated provider
output before opening this PR.