From f32bd98f73164b3e27664249bf3dd46fdc153fd9 Mon Sep 17 00:00:00 2001 From: chen-shmilovich-sysdig <66797177+chen-shmilovich-sysdig@users.noreply.github.com> Date: Tue, 7 Nov 2023 10:44:48 +0200 Subject: [PATCH] Change Zone policy_ids schema to set instead of array (#443) --- sysdig/resource_sysdig_secure_posture_zone.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdig/resource_sysdig_secure_posture_zone.go b/sysdig/resource_sysdig_secure_posture_zone.go index 9c039f20..8c2057e0 100644 --- a/sysdig/resource_sysdig_secure_posture_zone.go +++ b/sysdig/resource_sysdig_secure_posture_zone.go @@ -40,7 +40,7 @@ func resourceSysdigSecurePostureZone() *schema.Resource { }, SchemaPolicyIDsKey: { Optional: true, - Type: schema.TypeList, + Type: schema.TypeSet, Elem: &schema.Schema{ Type: schema.TypeInt, }, @@ -106,7 +106,7 @@ func getPostureZoneClient(c SysdigClients) (v2.PostureZoneInterface, error) { } func resourceCreateOrUpdatePostureZone(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - policiesData := d.Get(SchemaPolicyIDsKey).([]interface{}) + policiesData := d.Get(SchemaPolicyIDsKey).(*schema.Set).List() policies := make([]string, len(policiesData)) for i, p := range policiesData { policies[i] = strconv.Itoa(p.(int))