Skip to content

Commit a534009

Browse files
update DATA_GOVERNANCE field (#15045)
1 parent 53b287e commit a534009

File tree

2 files changed

+45
-14
lines changed

2 files changed

+45
-14
lines changed

mmv1/products/tags/TagKey.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ properties:
117117
immutable: true
118118
enum_values:
119119
- 'GCE_FIREWALL'
120+
- 'DATA_GOVERNANCE'
120121
- name: 'purposeData'
121122
type: KeyValuePairs
122123
description: |

mmv1/third_party/terraform/services/tags/resource_tags_test.go

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,21 @@ import (
1919

2020
func TestAccTags(t *testing.T) {
2121
testCases := map[string]func(t *testing.T){
22-
"tagKeyBasic": testAccTagsTagKey_tagKeyBasic,
23-
"tagKeyBasicWithPurposeGceFirewall": testAccTagsTagKey_tagKeyBasicWithPurposeGceFirewall,
24-
"tagKeyUpdate": testAccTagsTagKey_tagKeyUpdate,
25-
"tagKeyIamBinding": testAccTagsTagKeyIamBinding,
26-
"tagKeyIamMember": testAccTagsTagKeyIamMember,
27-
"tagKeyIamPolicy": testAccTagsTagKeyIamPolicy,
28-
"tagValueBasic": testAccTagsTagValue_tagValueBasic,
29-
"tagValueUpdate": testAccTagsTagValue_tagValueUpdate,
30-
"tagBindingBasic": testAccTagsTagBinding_tagBindingBasic,
31-
"tagValueIamBinding": testAccTagsTagValueIamBinding,
32-
"tagValueIamMember": testAccTagsTagValueIamMember,
33-
"tagValueIamPolicy": testAccTagsTagValueIamPolicy,
34-
"tagsLocationTagBindingBasic": testAccTagsLocationTagBinding_locationTagBindingbasic,
35-
"tagsLocationTagBindingZonal": TestAccTagsLocationTagBinding_locationTagBindingzonal,
22+
"tagKeyBasic": testAccTagsTagKey_tagKeyBasic,
23+
"tagKeyBasicWithPurposeGceFirewall": testAccTagsTagKey_tagKeyBasicWithPurposeGceFirewall,
24+
"tagKeyBasicWithPurposeDataGovernance": testAccTagsTagKey_tagKeyBasicWithPurposeDataGovernance,
25+
"tagKeyUpdate": testAccTagsTagKey_tagKeyUpdate,
26+
"tagKeyIamBinding": testAccTagsTagKeyIamBinding,
27+
"tagKeyIamMember": testAccTagsTagKeyIamMember,
28+
"tagKeyIamPolicy": testAccTagsTagKeyIamPolicy,
29+
"tagValueBasic": testAccTagsTagValue_tagValueBasic,
30+
"tagValueUpdate": testAccTagsTagValue_tagValueUpdate,
31+
"tagBindingBasic": testAccTagsTagBinding_tagBindingBasic,
32+
"tagValueIamBinding": testAccTagsTagValueIamBinding,
33+
"tagValueIamMember": testAccTagsTagValueIamMember,
34+
"tagValueIamPolicy": testAccTagsTagValueIamPolicy,
35+
"tagsLocationTagBindingBasic": testAccTagsLocationTagBinding_locationTagBindingbasic,
36+
"tagsLocationTagBindingZonal": TestAccTagsLocationTagBinding_locationTagBindingzonal,
3637
}
3738

3839
for name, tc := range testCases {
@@ -114,6 +115,35 @@ resource "google_tags_tag_key" "key" {
114115
`, context)
115116
}
116117

118+
func testAccTagsTagKey_tagKeyBasicWithPurposeDataGovernance(t *testing.T) {
119+
context := map[string]interface{}{
120+
"org_id": envvar.GetTestOrgFromEnv(t),
121+
"random_suffix": acctest.RandString(t, 10),
122+
}
123+
124+
acctest.VcrTest(t, resource.TestCase{
125+
PreCheck: func() { acctest.AccTestPreCheck(t) },
126+
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
127+
CheckDestroy: testAccCheckTagsTagKeyDestroyProducer(t),
128+
Steps: []resource.TestStep{
129+
{
130+
Config: testAccTagsTagKey_tagKeyBasicWithPurposeDataGovernanceExample(context),
131+
},
132+
},
133+
})
134+
}
135+
136+
func testAccTagsTagKey_tagKeyBasicWithPurposeDataGovernanceExample(context map[string]interface{}) string {
137+
return acctest.Nprintf(`
138+
resource "google_tags_tag_key" "key" {
139+
parent = "organizations/%{org_id}"
140+
short_name = "data-gov-%{random_suffix}"
141+
description = "For data governance purposes."
142+
purpose = "DATA_GOVERNANCE"
143+
}
144+
`, context)
145+
}
146+
117147
func testAccTagsTagKey_tagKeyUpdate(t *testing.T) {
118148
context := map[string]interface{}{
119149
"org_id": envvar.GetTestOrgFromEnv(t),

0 commit comments

Comments
 (0)