Skip to content

Commit

Permalink
Add support for description to tag template fields (#8810) (#4650) (#…
Browse files Browse the repository at this point in the history
…8851)

Co-authored-by: Geir Sagberg <geir.sagberg@gmail.com>
Signed-off-by: Modular Magician <magic-modules@google.com>

Co-authored-by: Geir Sagberg <geir.sagberg@gmail.com>
  • Loading branch information
modular-magician and geirsagberg authored Apr 6, 2021
1 parent 0e036bd commit 11d228f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .changelog/4650.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
datacatalog: added `description` field to `google_data_catalog_tag_template ` resource
```
12 changes: 6 additions & 6 deletions google/resource_data_catalog_tag_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.`,
},
},
},
},
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion google/resource_data_catalog_tag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions website/docs/r/data_catalog_tag_template.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 11d228f

Please sign in to comment.