From 1bf15330d14b07676e5de3eda8d5d8c205cc866f Mon Sep 17 00:00:00 2001 From: Axel Ismirlian Date: Thu, 28 Mar 2024 16:23:42 -0500 Subject: [PATCH] Change network type from list to set --- ibm/service/power/resource_ibm_pi_instance.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ibm/service/power/resource_ibm_pi_instance.go b/ibm/service/power/resource_ibm_pi_instance.go index 368cc554e37..e1b56701e45 100644 --- a/ibm/service/power/resource_ibm_pi_instance.go +++ b/ibm/service/power/resource_ibm_pi_instance.go @@ -147,7 +147,7 @@ func ResourceIBMPIInstance() *schema.Resource { Description: "Indicates if all volumes attached to the server must reside in the same storage pool", }, PIInstanceNetwork: { - Type: schema.TypeList, + Type: schema.TypeSet, ForceNew: true, Required: true, Description: "List of one or more networks to attach to the instance", @@ -1202,7 +1202,7 @@ func createSAPInstance(d *schema.ResourceData, sapClient *st.IBMPISAPInstanceCli profileID := d.Get(PISAPInstanceProfileID).(string) imageid := d.Get(helpers.PIInstanceImageId).(string) - pvmNetworks := expandPVMNetworks(d.Get(PIInstanceNetwork).([]interface{})) + pvmNetworks := expandPVMNetworks(d.Get(PIInstanceNetwork).(*schema.Set).List()) var replicants int64 if r, ok := d.GetOk(helpers.PIInstanceReplicants); ok { @@ -1336,7 +1336,7 @@ func createPVMInstance(d *schema.ResourceData, client *st.IBMPIInstanceClient, i return nil, fmt.Errorf("%s is required for creating pvm instances", helpers.PIInstanceProcType) } - pvmNetworks := expandPVMNetworks(d.Get(PIInstanceNetwork).([]interface{})) + pvmNetworks := expandPVMNetworks(d.Get(PIInstanceNetwork).(*schema.Set).List()) var volids []string if v, ok := d.GetOk(helpers.PIInstanceVolumeIds); ok {