From 11d228f7d2e0e00d0158026e0c5777fdce785da5 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 6 Apr 2021 10:15:24 -0700 Subject: [PATCH] Add support for description to tag template fields (#8810) (#4650) (#8851) Co-authored-by: Geir Sagberg Signed-off-by: Modular Magician Co-authored-by: Geir Sagberg --- .changelog/4650.txt | 3 +++ google/resource_data_catalog_tag_template.go | 12 ++++++------ google/resource_data_catalog_tag_test.go | 1 - .../docs/r/data_catalog_tag_template.html.markdown | 4 ++++ 4 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 .changelog/4650.txt diff --git a/.changelog/4650.txt b/.changelog/4650.txt new file mode 100644 index 00000000000..aff22ed13ec --- /dev/null +++ b/.changelog/4650.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +datacatalog: added `description` field to `google_data_catalog_tag_template ` resource +``` diff --git a/google/resource_data_catalog_tag_template.go b/google/resource_data_catalog_tag_template.go index 74221acb6e2..d32c4b7a5e5 100644 --- a/google/resource_data_catalog_tag_template.go +++ b/google/resource_data_catalog_tag_template.go @@ -96,6 +96,11 @@ Can have up to 500 allowed values.`, }, }, }, + "description": { + Type: schema.TypeString, + Optional: true, + Description: `A description for this field.`, + }, "display_name": { Type: schema.TypeString, Optional: true, @@ -118,11 +123,6 @@ Multiple fields can have the same order, and field orders within a tag do not ha Computed: true, Description: `The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}`, }, - "description": { - Type: schema.TypeString, - Optional: true, - Description: `A description for this field.`, - }, }, }, }, @@ -434,10 +434,10 @@ func flattenDataCatalogTagTemplateFields(v interface{}, d *schema.ResourceData, "field_id": k, "name": flattenDataCatalogTagTemplateFieldsName(original["name"], d, config), "display_name": flattenDataCatalogTagTemplateFieldsDisplayName(original["displayName"], d, config), + "description": flattenDataCatalogTagTemplateFieldsDescription(original["description"], d, config), "type": flattenDataCatalogTagTemplateFieldsType(original["type"], d, config), "is_required": flattenDataCatalogTagTemplateFieldsIsRequired(original["isRequired"], d, config), "order": flattenDataCatalogTagTemplateFieldsOrder(original["order"], d, config), - "description": flattenDataCatalogTagTemplateFieldsDescription(original["description"], d, config), }) } return transformed diff --git a/google/resource_data_catalog_tag_test.go b/google/resource_data_catalog_tag_test.go index 0f10c7b206e..5e65be2168e 100644 --- a/google/resource_data_catalog_tag_test.go +++ b/google/resource_data_catalog_tag_test.go @@ -73,7 +73,6 @@ resource "google_data_catalog_tag_template" "tag_template" { primitive_type = "STRING" } is_required = true - description = "The source of the data asset" } fields { diff --git a/website/docs/r/data_catalog_tag_template.html.markdown b/website/docs/r/data_catalog_tag_template.html.markdown index dfa5376d085..24ac64f080d 100644 --- a/website/docs/r/data_catalog_tag_template.html.markdown +++ b/website/docs/r/data_catalog_tag_template.html.markdown @@ -111,6 +111,10 @@ The `fields` block supports: (Optional) The display name for this field. +* `description` - + (Optional) + A description for this field. + * `type` - (Required) The type of value this tag field can contain.