Skip to content

Commit

Permalink
fixes from #150
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Kita committed Sep 23, 2024
1 parent a109059 commit a8815df
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ibm/service/power/resource_ibm_pi_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ func ResourceIBMPIInstance() *schema.Resource {
Description: "List of replication sites for instance.",
Elem: &schema.Schema{Type: schema.TypeString},
ForceNew: true,
MinItems: 1,
Optional: true,
Type: schema.TypeList,
},
Expand Down Expand Up @@ -1402,8 +1401,10 @@ func createSAPInstance(d *schema.ResourceData, sapClient *instance.IBMPISAPInsta
if !bootVolumeReplicationEnabled {
return nil, fmt.Errorf("must set %s to true in order to specify replication sites", Arg_BootVolumeReplicationEnabled)
} else {
replicationSites = flex.ExpandStringList(sites.([]interface{}))
body.ReplicationSites = replicationSites
if len(sites.([]interface{})) > 0 {
replicationSites = flex.ExpandStringList(sites.([]interface{}))
body.ReplicationSites = replicationSites
}
}
}
if sp, ok := d.GetOk(Arg_StoragePool); ok {
Expand Down

0 comments on commit a8815df

Please sign in to comment.