From c84c965336f984ae0fb61a3a48833597af5b38fe Mon Sep 17 00:00:00 2001 From: Ferdinando Formica Date: Fri, 14 Jun 2024 12:12:59 +0100 Subject: [PATCH] TypeSet translates to a wrapper Set instead of an array like TypeList --- ns1/resource_record.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ns1/resource_record.go b/ns1/resource_record.go index f8ff1ef2..deb805df 100644 --- a/ns1/resource_record.go +++ b/ns1/resource_record.go @@ -449,8 +449,8 @@ func resourceDataToRecord(r *dns.Record, d *schema.ResourceData) error { } r.Filters = filters } - if regions := d.Get("regions").([]interface{}); len(regions) > 0 { - for _, regionRaw := range regions { + if regions := d.Get("regions").(*schema.Set); regions.Len() > 0 { + for _, regionRaw := range regions.List() { region := regionRaw.(map[string]interface{}) ns1R := data.Region{ Meta: data.Meta{},