Skip to content

Commit a9ccc4c

Browse files
datacatalog - bump Taxonomy and PolicyTag to ga (#6989) (#5254)
* update Taxonomy and PolicyTag to ga * update Taxonomy and PolicyTag to ga * refactor * refactor Signed-off-by: Modular Magician <[email protected]>
1 parent 6696214 commit a9ccc4c

9 files changed

+21
-93
lines changed

.changelog/6989.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
datacatalog - bump Taxonomy and PolicyTag to ga
3+
```

google-beta/iam_data_catalog_policy_tag_generated_test.go

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestAccDataCatalogPolicyTagIamBindingGenerated(t *testing.T) {
3030

3131
vcrTest(t, resource.TestCase{
3232
PreCheck: func() { testAccPreCheck(t) },
33-
Providers: testAccProvidersOiCS,
33+
Providers: testAccProviders,
3434
Steps: []resource.TestStep{
3535
{
3636
Config: testAccDataCatalogPolicyTagIamBinding_basicGenerated(context),
@@ -53,7 +53,7 @@ func TestAccDataCatalogPolicyTagIamMemberGenerated(t *testing.T) {
5353

5454
vcrTest(t, resource.TestCase{
5555
PreCheck: func() { testAccPreCheck(t) },
56-
Providers: testAccProvidersOiCS,
56+
Providers: testAccProviders,
5757
Steps: []resource.TestStep{
5858
{
5959
// Test Iam Member creation (no update for member, no need to test)
@@ -73,7 +73,7 @@ func TestAccDataCatalogPolicyTagIamPolicyGenerated(t *testing.T) {
7373

7474
vcrTest(t, resource.TestCase{
7575
PreCheck: func() { testAccPreCheck(t) },
76-
Providers: testAccProvidersOiCS,
76+
Providers: testAccProviders,
7777
Steps: []resource.TestStep{
7878
{
7979
Config: testAccDataCatalogPolicyTagIamPolicy_basicGenerated(context),
@@ -88,22 +88,18 @@ func TestAccDataCatalogPolicyTagIamPolicyGenerated(t *testing.T) {
8888
func testAccDataCatalogPolicyTagIamMember_basicGenerated(context map[string]interface{}) string {
8989
return Nprintf(`
9090
resource "google_data_catalog_policy_tag" "basic_policy_tag" {
91-
provider = google-beta
9291
taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
9392
display_name = "Low security"
9493
description = "A policy tag normally associated with low security items"
9594
}
9695
9796
resource "google_data_catalog_taxonomy" "my_taxonomy" {
98-
provider = google-beta
99-
region = "us"
10097
display_name = "tf_test_taxonomy_display_name%{random_suffix}"
10198
description = "A collection of policy tags"
10299
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
103100
}
104101
105102
resource "google_data_catalog_policy_tag_iam_member" "foo" {
106-
provider = google-beta
107103
policy_tag = google_data_catalog_policy_tag.basic_policy_tag.name
108104
role = "%{role}"
109105
member = "user:[email protected]"
@@ -114,30 +110,25 @@ resource "google_data_catalog_policy_tag_iam_member" "foo" {
114110
func testAccDataCatalogPolicyTagIamPolicy_basicGenerated(context map[string]interface{}) string {
115111
return Nprintf(`
116112
resource "google_data_catalog_policy_tag" "basic_policy_tag" {
117-
provider = google-beta
118113
taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
119114
display_name = "Low security"
120115
description = "A policy tag normally associated with low security items"
121116
}
122117
123118
resource "google_data_catalog_taxonomy" "my_taxonomy" {
124-
provider = google-beta
125-
region = "us"
126119
display_name = "tf_test_taxonomy_display_name%{random_suffix}"
127120
description = "A collection of policy tags"
128121
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
129122
}
130123
131124
data "google_iam_policy" "foo" {
132-
provider = google-beta
133125
binding {
134126
role = "%{role}"
135127
members = ["user:[email protected]"]
136128
}
137129
}
138130
139131
resource "google_data_catalog_policy_tag_iam_policy" "foo" {
140-
provider = google-beta
141132
policy_tag = google_data_catalog_policy_tag.basic_policy_tag.name
142133
policy_data = data.google_iam_policy.foo.policy_data
143134
}
@@ -147,26 +138,21 @@ resource "google_data_catalog_policy_tag_iam_policy" "foo" {
147138
func testAccDataCatalogPolicyTagIamPolicy_emptyBinding(context map[string]interface{}) string {
148139
return Nprintf(`
149140
resource "google_data_catalog_policy_tag" "basic_policy_tag" {
150-
provider = google-beta
151141
taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
152142
display_name = "Low security"
153143
description = "A policy tag normally associated with low security items"
154144
}
155145
156146
resource "google_data_catalog_taxonomy" "my_taxonomy" {
157-
provider = google-beta
158-
region = "us"
159147
display_name = "tf_test_taxonomy_display_name%{random_suffix}"
160148
description = "A collection of policy tags"
161149
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
162150
}
163151
164152
data "google_iam_policy" "foo" {
165-
provider = google-beta
166153
}
167154
168155
resource "google_data_catalog_policy_tag_iam_policy" "foo" {
169-
provider = google-beta
170156
policy_tag = google_data_catalog_policy_tag.basic_policy_tag.name
171157
policy_data = data.google_iam_policy.foo.policy_data
172158
}
@@ -176,22 +162,18 @@ resource "google_data_catalog_policy_tag_iam_policy" "foo" {
176162
func testAccDataCatalogPolicyTagIamBinding_basicGenerated(context map[string]interface{}) string {
177163
return Nprintf(`
178164
resource "google_data_catalog_policy_tag" "basic_policy_tag" {
179-
provider = google-beta
180165
taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
181166
display_name = "Low security"
182167
description = "A policy tag normally associated with low security items"
183168
}
184169
185170
resource "google_data_catalog_taxonomy" "my_taxonomy" {
186-
provider = google-beta
187-
region = "us"
188171
display_name = "tf_test_taxonomy_display_name%{random_suffix}"
189172
description = "A collection of policy tags"
190173
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
191174
}
192175
193176
resource "google_data_catalog_policy_tag_iam_binding" "foo" {
194-
provider = google-beta
195177
policy_tag = google_data_catalog_policy_tag.basic_policy_tag.name
196178
role = "%{role}"
197179
members = ["user:[email protected]"]
@@ -202,22 +184,18 @@ resource "google_data_catalog_policy_tag_iam_binding" "foo" {
202184
func testAccDataCatalogPolicyTagIamBinding_updateGenerated(context map[string]interface{}) string {
203185
return Nprintf(`
204186
resource "google_data_catalog_policy_tag" "basic_policy_tag" {
205-
provider = google-beta
206187
taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
207188
display_name = "Low security"
208189
description = "A policy tag normally associated with low security items"
209190
}
210191
211192
resource "google_data_catalog_taxonomy" "my_taxonomy" {
212-
provider = google-beta
213-
region = "us"
214193
display_name = "tf_test_taxonomy_display_name%{random_suffix}"
215194
description = "A collection of policy tags"
216195
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
217196
}
218197
219198
resource "google_data_catalog_policy_tag_iam_binding" "foo" {
220-
provider = google-beta
221199
policy_tag = google_data_catalog_policy_tag.basic_policy_tag.name
222200
role = "%{role}"
223201
members = ["user:[email protected]", "user:[email protected]"]

google-beta/iam_data_catalog_taxonomy_generated_test.go

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestAccDataCatalogTaxonomyIamBindingGenerated(t *testing.T) {
3030

3131
vcrTest(t, resource.TestCase{
3232
PreCheck: func() { testAccPreCheck(t) },
33-
Providers: testAccProvidersOiCS,
33+
Providers: testAccProviders,
3434
Steps: []resource.TestStep{
3535
{
3636
Config: testAccDataCatalogTaxonomyIamBinding_basicGenerated(context),
@@ -53,7 +53,7 @@ func TestAccDataCatalogTaxonomyIamMemberGenerated(t *testing.T) {
5353

5454
vcrTest(t, resource.TestCase{
5555
PreCheck: func() { testAccPreCheck(t) },
56-
Providers: testAccProvidersOiCS,
56+
Providers: testAccProviders,
5757
Steps: []resource.TestStep{
5858
{
5959
// Test Iam Member creation (no update for member, no need to test)
@@ -73,7 +73,7 @@ func TestAccDataCatalogTaxonomyIamPolicyGenerated(t *testing.T) {
7373

7474
vcrTest(t, resource.TestCase{
7575
PreCheck: func() { testAccPreCheck(t) },
76-
Providers: testAccProvidersOiCS,
76+
Providers: testAccProviders,
7777
Steps: []resource.TestStep{
7878
{
7979
Config: testAccDataCatalogTaxonomyIamPolicy_basicGenerated(context),
@@ -88,15 +88,12 @@ func TestAccDataCatalogTaxonomyIamPolicyGenerated(t *testing.T) {
8888
func testAccDataCatalogTaxonomyIamMember_basicGenerated(context map[string]interface{}) string {
8989
return Nprintf(`
9090
resource "google_data_catalog_taxonomy" "basic_taxonomy" {
91-
provider = google-beta
92-
region = "us"
93-
display_name = "tf_test_my_display_name%{random_suffix}"
91+
display_name = "tf_test_my_taxonomy%{random_suffix}"
9492
description = "A collection of policy tags"
9593
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
9694
}
9795
9896
resource "google_data_catalog_taxonomy_iam_member" "foo" {
99-
provider = google-beta
10097
taxonomy = google_data_catalog_taxonomy.basic_taxonomy.name
10198
role = "%{role}"
10299
member = "user:[email protected]"
@@ -107,23 +104,19 @@ resource "google_data_catalog_taxonomy_iam_member" "foo" {
107104
func testAccDataCatalogTaxonomyIamPolicy_basicGenerated(context map[string]interface{}) string {
108105
return Nprintf(`
109106
resource "google_data_catalog_taxonomy" "basic_taxonomy" {
110-
provider = google-beta
111-
region = "us"
112-
display_name = "tf_test_my_display_name%{random_suffix}"
107+
display_name = "tf_test_my_taxonomy%{random_suffix}"
113108
description = "A collection of policy tags"
114109
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
115110
}
116111
117112
data "google_iam_policy" "foo" {
118-
provider = google-beta
119113
binding {
120114
role = "%{role}"
121115
members = ["user:[email protected]"]
122116
}
123117
}
124118
125119
resource "google_data_catalog_taxonomy_iam_policy" "foo" {
126-
provider = google-beta
127120
taxonomy = google_data_catalog_taxonomy.basic_taxonomy.name
128121
policy_data = data.google_iam_policy.foo.policy_data
129122
}
@@ -133,19 +126,15 @@ resource "google_data_catalog_taxonomy_iam_policy" "foo" {
133126
func testAccDataCatalogTaxonomyIamPolicy_emptyBinding(context map[string]interface{}) string {
134127
return Nprintf(`
135128
resource "google_data_catalog_taxonomy" "basic_taxonomy" {
136-
provider = google-beta
137-
region = "us"
138-
display_name = "tf_test_my_display_name%{random_suffix}"
129+
display_name = "tf_test_my_taxonomy%{random_suffix}"
139130
description = "A collection of policy tags"
140131
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
141132
}
142133
143134
data "google_iam_policy" "foo" {
144-
provider = google-beta
145135
}
146136
147137
resource "google_data_catalog_taxonomy_iam_policy" "foo" {
148-
provider = google-beta
149138
taxonomy = google_data_catalog_taxonomy.basic_taxonomy.name
150139
policy_data = data.google_iam_policy.foo.policy_data
151140
}
@@ -155,15 +144,12 @@ resource "google_data_catalog_taxonomy_iam_policy" "foo" {
155144
func testAccDataCatalogTaxonomyIamBinding_basicGenerated(context map[string]interface{}) string {
156145
return Nprintf(`
157146
resource "google_data_catalog_taxonomy" "basic_taxonomy" {
158-
provider = google-beta
159-
region = "us"
160-
display_name = "tf_test_my_display_name%{random_suffix}"
147+
display_name = "tf_test_my_taxonomy%{random_suffix}"
161148
description = "A collection of policy tags"
162149
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
163150
}
164151
165152
resource "google_data_catalog_taxonomy_iam_binding" "foo" {
166-
provider = google-beta
167153
taxonomy = google_data_catalog_taxonomy.basic_taxonomy.name
168154
role = "%{role}"
169155
members = ["user:[email protected]"]
@@ -174,15 +160,12 @@ resource "google_data_catalog_taxonomy_iam_binding" "foo" {
174160
func testAccDataCatalogTaxonomyIamBinding_updateGenerated(context map[string]interface{}) string {
175161
return Nprintf(`
176162
resource "google_data_catalog_taxonomy" "basic_taxonomy" {
177-
provider = google-beta
178-
region = "us"
179-
display_name = "tf_test_my_display_name%{random_suffix}"
163+
display_name = "tf_test_my_taxonomy%{random_suffix}"
180164
description = "A collection of policy tags"
181165
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
182166
}
183167
184168
resource "google_data_catalog_taxonomy_iam_binding" "foo" {
185-
provider = google-beta
186169
taxonomy = google_data_catalog_taxonomy.basic_taxonomy.name
187170
role = "%{role}"
188171
members = ["user:[email protected]", "user:[email protected]"]

google-beta/resource_data_catalog_policy_tag_generated_test.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestAccDataCatalogPolicyTag_dataCatalogTaxonomiesPolicyTagBasicExample(t *t
3232

3333
vcrTest(t, resource.TestCase{
3434
PreCheck: func() { testAccPreCheck(t) },
35-
Providers: testAccProvidersOiCS,
35+
Providers: testAccProviders,
3636
CheckDestroy: testAccCheckDataCatalogPolicyTagDestroyProducer(t),
3737
Steps: []resource.TestStep{
3838
{
@@ -51,15 +51,12 @@ func TestAccDataCatalogPolicyTag_dataCatalogTaxonomiesPolicyTagBasicExample(t *t
5151
func testAccDataCatalogPolicyTag_dataCatalogTaxonomiesPolicyTagBasicExample(context map[string]interface{}) string {
5252
return Nprintf(`
5353
resource "google_data_catalog_policy_tag" "basic_policy_tag" {
54-
provider = google-beta
5554
taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
5655
display_name = "Low security"
5756
description = "A policy tag normally associated with low security items"
5857
}
5958
6059
resource "google_data_catalog_taxonomy" "my_taxonomy" {
61-
provider = google-beta
62-
region = "us"
6360
display_name = "tf_test_taxonomy_display_name%{random_suffix}"
6461
description = "A collection of policy tags"
6562
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
@@ -76,7 +73,7 @@ func TestAccDataCatalogPolicyTag_dataCatalogTaxonomiesPolicyTagChildPoliciesExam
7673

7774
vcrTest(t, resource.TestCase{
7875
PreCheck: func() { testAccPreCheck(t) },
79-
Providers: testAccProvidersOiCS,
76+
Providers: testAccProviders,
8077
CheckDestroy: testAccCheckDataCatalogPolicyTagDestroyProducer(t),
8178
Steps: []resource.TestStep{
8279
{
@@ -95,22 +92,19 @@ func TestAccDataCatalogPolicyTag_dataCatalogTaxonomiesPolicyTagChildPoliciesExam
9592
func testAccDataCatalogPolicyTag_dataCatalogTaxonomiesPolicyTagChildPoliciesExample(context map[string]interface{}) string {
9693
return Nprintf(`
9794
resource "google_data_catalog_policy_tag" "parent_policy" {
98-
provider = google-beta
9995
taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
10096
display_name = "High"
10197
description = "A policy tag category used for high security access"
10298
}
10399
104100
resource "google_data_catalog_policy_tag" "child_policy" {
105-
provider = google-beta
106101
taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
107102
display_name = "ssn"
108103
description = "A hash of the users ssn"
109104
parent_policy_tag = google_data_catalog_policy_tag.parent_policy.id
110105
}
111106
112107
resource "google_data_catalog_policy_tag" "child_policy2" {
113-
provider = google-beta
114108
taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
115109
display_name = "dob"
116110
description = "The users date of birth"
@@ -120,8 +114,6 @@ resource "google_data_catalog_policy_tag" "child_policy2" {
120114
}
121115
122116
resource "google_data_catalog_taxonomy" "my_taxonomy" {
123-
provider = google-beta
124-
region = "us"
125117
display_name = "tf_test_taxonomy_display_name%{random_suffix}"
126118
description = "A collection of policy tags"
127119
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]

google-beta/resource_data_catalog_taxonomy_generated_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestAccDataCatalogTaxonomy_dataCatalogTaxonomyBasicExample(t *testing.T) {
3232

3333
vcrTest(t, resource.TestCase{
3434
PreCheck: func() { testAccPreCheck(t) },
35-
Providers: testAccProvidersOiCS,
35+
Providers: testAccProviders,
3636
CheckDestroy: testAccCheckDataCatalogTaxonomyDestroyProducer(t),
3737
Steps: []resource.TestStep{
3838
{
@@ -51,9 +51,7 @@ func TestAccDataCatalogTaxonomy_dataCatalogTaxonomyBasicExample(t *testing.T) {
5151
func testAccDataCatalogTaxonomy_dataCatalogTaxonomyBasicExample(context map[string]interface{}) string {
5252
return Nprintf(`
5353
resource "google_data_catalog_taxonomy" "basic_taxonomy" {
54-
provider = google-beta
55-
region = "us"
56-
display_name = "tf_test_my_display_name%{random_suffix}"
54+
display_name = "tf_test_my_taxonomy%{random_suffix}"
5755
description = "A collection of policy tags"
5856
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
5957
}

0 commit comments

Comments
 (0)