openstack_networking_floatingip_associate_v2

Associates a floating IP to a port. This is useful for situations where you have a pre-allocated floating IP or are unable to use the openstack_networking_floatingip_v2 resource to create a floating IP.

Example Usage

resource "openstack_networking_port_v2" "port_1" {
  network_id = "a5bbd213-e1d3-49b6-aed1-9df60ea94b9a"
}

resource "openstack_networking_floatingip_associate_v2" "fip_1" {
  floating_ip = "1.2.3.4"
  port_id     = openstack_networking_port_v2.port_1.id
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Floating IP associations can be imported using the id of the floating IP, e.g.

$ terraform import openstack_networking_floatingip_associate_v2.fip 2c7f39f3-702b-48d1-940c-b50384177ee1