Hello everyone, since I don't see a dedicated open...
# python
a
Hello everyone, since I don't see a dedicated openstack channel but I use python to deploy my resources, I figured I'd post my question here first.
Copy code
...

    port = openstack.networking.Port(
        port_name,
        name=port_name,
        network_id=net_objects[net_name]["network"],
        port_security_enabled=False,
        fixed_ips=[
            {
                "subnet_id": net_objects[net_name]["subnet"],
                "ip_address": net_port["ip"],
            }
        ],
    )
    ports_list.append(port)
    port_names.append(port_name)

if net_port["is_float"] is True:

    # If the port has a floating point IP assigned to it, then
    # create the relevant resources
    float_ip = openstack.networking.FloatingIp(
        f"{port_name}_float",
        pool="public",
    )
    float_ip_assoc = openstack.networking.FloatingIpAssociate(
        f"{port_name}_float_assoc",
        floating_ip=float_ip.address,
        port_id=port.id,
    )
    pulumi.export(f"float_ip_{port_name}", float_ip.address)
On initial stack deploy, I create reference a library that has the relevant port info, and it build sthe port and float resources without issue. When I change the IP of a port in the library (seperate yaml file) and run
pulumi up
again, it DOES update the IP, but doesn't re-associate a new floating IP. (The existing floating IP resource still exists in Openstack and is mapped to the old IP). I'm just not sure how to delete the old association so I can create the new one in the python program. Hopefully that makes sense, thanks for the help.