Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change network type from list to set #107

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ibm/service/power/resource_ibm_pi_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
Loading