adorable-garden-93195
02/14/2023, 5:12 PM...
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.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by