Skip to content

Commit f029f7c

Browse files
Terraform Team Automationsagarp337
authored andcommitted
Bug Fix : Remove system tags from SZ requests
1 parent 8d63d39 commit f029f7c

18 files changed

+0
-82
lines changed

examples/cloudguard/security_zone/security_zone.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,4 @@ resource "oci_cloud_guard_security_zone" "test_security_zone" {
7777
#Optional
7878
description = "${var.security_zone_description}"
7979

80-
//Added only because we are testing this in a splat-disabled env
81-
lifecycle {
82-
ignore_changes = [system_tags]
83-
}
8480
}

examples/cloudguard/security_zone_recipe/security_zone_recipe.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,4 @@ resource "oci_cloud_guard_security_recipe" "test_security_recipe" {
6666
#Optional
6767
description = "${var.security_recipe_description}"
6868

69-
//Added only because we are testing this in a splat-disabled env
70-
lifecycle {
71-
ignore_changes = [system_tags]
72-
}
7369
}

internal/integrationtest/cloud_guard_security_recipe_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ var (
5353
"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${tomap({"${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}" = "value"})}`, Update: `${tomap({"${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}" = "updatedValue"})}`},
5454
"description": acctest.Representation{RepType: acctest.Optional, Create: `description`, Update: `description2`},
5555
"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}},
56-
"lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreSecurityRecipeSystemTagsChangesRep},
57-
}
58-
59-
ignoreSecurityRecipeSystemTagsChangesRep = map[string]interface{}{
60-
"ignore_changes": acctest.Representation{RepType: acctest.Required, Create: []string{`system_tags`}},
6156
}
6257

6358
CloudGuardSecurityRecipeResourceDependencies = DefinedTagsDependencies + SecurityPolicyResourceDependencies

internal/integrationtest/cloud_guard_security_zone_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ var (
5555
"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${tomap({"${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}" = "value"})}`, Update: `${tomap({"${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}" = "updatedValue"})}`},
5656
"description": acctest.Representation{RepType: acctest.Optional, Create: `description`, Update: `description2`},
5757
"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}},
58-
"lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreSecurityZoneSystemTagsChangesRep},
59-
}
60-
61-
ignoreSecurityZoneSystemTagsChangesRep = map[string]interface{}{
62-
"ignore_changes": acctest.Representation{RepType: acctest.Required, Create: []string{`system_tags`}},
6358
}
6459

6560
CloudGuardSecurityZoneResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_cloud_guard_security_recipe", "test_security_recipe", acctest.Required, acctest.Create, CloudGuardSecurityRecipeRepresentation) +

internal/service/cloud_guard/cloud_guard_security_policies_data_source.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ func CloudGuardSecurityPoliciesDataSource() *schema.Resource {
102102
Type: schema.TypeString,
103103
Computed: true,
104104
},
105-
"system_tags": {
106-
Type: schema.TypeMap,
107-
Computed: true,
108-
Elem: schema.TypeString,
109-
},
110105
"time_created": {
111106
Type: schema.TypeString,
112107
Computed: true,
@@ -259,10 +254,6 @@ func SecurityPolicySummaryToMap(obj oci_cloud_guard.SecurityPolicySummary) map[s
259254

260255
result["state"] = string(obj.LifecycleState)
261256

262-
if obj.SystemTags != nil {
263-
result["system_tags"] = tfresource.SystemTagsToMap(obj.SystemTags)
264-
}
265-
266257
if obj.TimeCreated != nil {
267258
result["time_created"] = obj.TimeCreated.String()
268259
}

internal/service/cloud_guard/cloud_guard_security_policy_data_source.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ func CloudGuardSecurityPolicyDataSource() *schema.Resource {
7171
Type: schema.TypeString,
7272
Computed: true,
7373
},
74-
"system_tags": {
75-
Type: schema.TypeMap,
76-
Computed: true,
77-
Elem: schema.TypeString,
78-
},
7974
"time_created": {
8075
Type: schema.TypeString,
8176
Computed: true,
@@ -168,10 +163,6 @@ func (s *CloudGuardSecurityPolicyDataSourceCrud) SetData() error {
168163

169164
s.D.Set("state", s.Res.LifecycleState)
170165

171-
if s.Res.SystemTags != nil {
172-
s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags))
173-
}
174-
175166
if s.Res.TimeCreated != nil {
176167
s.D.Set("time_created", s.Res.TimeCreated.String())
177168
}
@@ -226,10 +217,6 @@ func CloudGuardSecurityPolicySummaryToMap(obj oci_cloud_guard.SecurityPolicySumm
226217

227218
result["state"] = string(obj.LifecycleState)
228219

229-
if obj.SystemTags != nil {
230-
result["system_tags"] = tfresource.SystemTagsToMap(obj.SystemTags)
231-
}
232-
233220
if obj.TimeCreated != nil {
234221
result["time_created"] = obj.TimeCreated.String()
235222
}

internal/service/cloud_guard/cloud_guard_security_recipe_data_source.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ func (s *CloudGuardSecurityRecipeDataSourceCrud) SetData() error {
9494

9595
s.D.Set("state", s.Res.LifecycleState)
9696

97-
if s.Res.SystemTags != nil {
98-
s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags))
99-
}
100-
10197
if s.Res.TimeCreated != nil {
10298
s.D.Set("time_created", s.Res.TimeCreated.String())
10399
}

internal/service/cloud_guard/cloud_guard_security_recipe_resource.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ func CloudGuardSecurityRecipeResource() *schema.Resource {
7575
Type: schema.TypeString,
7676
Computed: true,
7777
},
78-
"system_tags": {
79-
Type: schema.TypeMap,
80-
Computed: true,
81-
Elem: schema.TypeString,
82-
},
8378
"time_created": {
8479
Type: schema.TypeString,
8580
Computed: true,
@@ -333,10 +328,6 @@ func (s *CloudGuardSecurityRecipeResourceCrud) SetData() error {
333328

334329
s.D.Set("state", s.Res.LifecycleState)
335330

336-
if s.Res.SystemTags != nil {
337-
s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags))
338-
}
339-
340331
if s.Res.TimeCreated != nil {
341332
s.D.Set("time_created", s.Res.TimeCreated.String())
342333
}
@@ -383,10 +374,6 @@ func SecurityRecipeSummaryToMap(obj oci_cloud_guard.SecurityRecipeSummary) map[s
383374

384375
result["state"] = string(obj.LifecycleState)
385376

386-
if obj.SystemTags != nil {
387-
result["system_tags"] = tfresource.SystemTagsToMap(obj.SystemTags)
388-
}
389-
390377
if obj.TimeCreated != nil {
391378
result["time_created"] = obj.TimeCreated.String()
392379
}

internal/service/cloud_guard/cloud_guard_security_zone_data_source.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ func (s *CloudGuardSecurityZoneDataSourceCrud) SetData() error {
100100

101101
s.D.Set("state", s.Res.LifecycleState)
102102

103-
if s.Res.SystemTags != nil {
104-
s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags))
105-
}
106-
107103
if s.Res.TimeCreated != nil {
108104
s.D.Set("time_created", s.Res.TimeCreated.String())
109105
}

internal/service/cloud_guard/cloud_guard_security_zone_resource.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ func CloudGuardSecurityZoneResource() *schema.Resource {
7979
Type: schema.TypeString,
8080
Computed: true,
8181
},
82-
"system_tags": {
83-
Type: schema.TypeMap,
84-
Computed: true,
85-
Elem: schema.TypeString,
86-
},
8782
"time_created": {
8883
Type: schema.TypeString,
8984
Computed: true,
@@ -327,10 +322,6 @@ func (s *CloudGuardSecurityZoneResourceCrud) SetData() error {
327322

328323
s.D.Set("state", s.Res.LifecycleState)
329324

330-
if s.Res.SystemTags != nil {
331-
s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags))
332-
}
333-
334325
if s.Res.TimeCreated != nil {
335326
s.D.Set("time_created", s.Res.TimeCreated.String())
336327
}
@@ -377,10 +368,6 @@ func SecurityZoneSummaryToMap(obj oci_cloud_guard.SecurityZoneSummary) map[strin
377368

378369
result["state"] = string(obj.LifecycleState)
379370

380-
if obj.SystemTags != nil {
381-
result["system_tags"] = tfresource.SystemTagsToMap(obj.SystemTags)
382-
}
383-
384371
if obj.TimeCreated != nil {
385372
result["time_created"] = obj.TimeCreated.String()
386373
}

0 commit comments

Comments
 (0)