Skip to content

Commit f32bd98

Browse files
Change Zone policy_ids schema to set instead of array (#443)
1 parent d3b3af5 commit f32bd98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sysdig/resource_sysdig_secure_posture_zone.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func resourceSysdigSecurePostureZone() *schema.Resource {
4040
},
4141
SchemaPolicyIDsKey: {
4242
Optional: true,
43-
Type: schema.TypeList,
43+
Type: schema.TypeSet,
4444
Elem: &schema.Schema{
4545
Type: schema.TypeInt,
4646
},
@@ -106,7 +106,7 @@ func getPostureZoneClient(c SysdigClients) (v2.PostureZoneInterface, error) {
106106
}
107107

108108
func resourceCreateOrUpdatePostureZone(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
109-
policiesData := d.Get(SchemaPolicyIDsKey).([]interface{})
109+
policiesData := d.Get(SchemaPolicyIDsKey).(*schema.Set).List()
110110
policies := make([]string, len(policiesData))
111111
for i, p := range policiesData {
112112
policies[i] = strconv.Itoa(p.(int))

0 commit comments

Comments
 (0)