openstack_networking_floatingip_v2

Manages a V2 floating IP resource within OpenStack Neutron (networking) that can be used for load balancers. These are similar to Nova (compute) floating IP resources, but only compute floating IPs can be used with compute instances.

Example Usage

Simple floating IP allocation

resource "openstack_networking_floatingip_v2" "floatip_1" {
  pool = "public"
}

Floating IP allocation using a list of subnets

If one of the subnets in a list has an exhausted pool, terraform will try the next subnet ID from the list.

data "openstack_networking_network_v2" "ext_network" {
  name = "public"
}

data "openstack_networking_subnet_ids_v2" "ext_subnets" {
  network_id = data.openstack_networking_network_v2.ext_network.id
}

resource "openstack_networking_floatingip_v2" "floatip_1" {
  pool       = data.openstack_networking_network_v2.ext_network.name
  subnet_ids = data.openstack_networking_subnet_ids_v2.ext_subnets.ids
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Floating IPs can be imported using the id, e.g.

$ terraform import openstack_networking_floatingip_v2.floatip_1 2c7f39f3-702b-48d1-940c-b50384177ee1