digitalocean_floating_ip

Provides a DigitalOcean Floating IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Droplets.

Example Usage

resource "digitalocean_droplet" "foobar" {
  name               = "baz"
  size               = "1gb"
  image              = "centos-5-8-x32"
  region             = "sgp1"
  ipv6               = true
  private_networking = true
}

resource "digitalocean_floating_ip" "foobar" {
  droplet_id = "${digitalocean_droplet.foobar.id}"
  region     = "${digitalocean_droplet.foobar.region}"
}

Argument Reference

The following arguments are supported:

  • region - (Required) The region that the Floating IP is reserved to.
  • droplet_id - (Optional) The ID of Droplet that the Floating IP will be assigned to.

Attributes Reference

The following attributes are exported:

Import

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

terraform import digitalocean_floating_ip.myip 192.168.0.1

© 2018 HashiCorp
Licensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/do/r/floating_ip.html