mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
provider/openstack: gophercloud migration: Make PortID a *string
This commit is contained in:
parent
0253dbe51b
commit
1c6b69e342
@ -244,8 +244,9 @@ func resourceLBVipV1Update(d *schema.ResourceData, meta interface{}) error {
|
||||
|
||||
// If a floating IP is found we unassign it
|
||||
if len(fips) == 1 {
|
||||
portID := ""
|
||||
updateOpts := floatingips.UpdateOpts{
|
||||
PortID: "",
|
||||
PortID: &portID,
|
||||
}
|
||||
if err = floatingips.Update(networkingClient, fips[0].ID, updateOpts).Err; err != nil {
|
||||
return err
|
||||
@ -338,7 +339,7 @@ func lbVipV1AssignFloatingIP(floatingIP, portID string, networkingClient *gopher
|
||||
}
|
||||
|
||||
updateOpts := floatingips.UpdateOpts{
|
||||
PortID: portID,
|
||||
PortID: &portID,
|
||||
}
|
||||
if err = floatingips.Update(networkingClient, fips[0].ID, updateOpts).Err; err != nil {
|
||||
return err
|
||||
|
@ -139,7 +139,8 @@ func resourceNetworkFloatingIPV2Update(d *schema.ResourceData, meta interface{})
|
||||
var updateOpts floatingips.UpdateOpts
|
||||
|
||||
if d.HasChange("port_id") {
|
||||
updateOpts.PortID = d.Get("port_id").(string)
|
||||
portID := d.Get("port_id").(string)
|
||||
updateOpts.PortID = &portID
|
||||
}
|
||||
|
||||
log.Printf("[DEBUG] Update Options: %#v", updateOpts)
|
||||
|
Loading…
Reference in New Issue
Block a user