digitalocean_floating_ip

Get information on a floating ip. This data source provides the region and Droplet id as configured on your DigitalOcean account. This is useful if the floating IP in question is not managed by Terraform or you need to find the Droplet the IP is attached to.

An error is triggered if the provided floating IP does not exist.

Example Usage

Get the floating IP:

variable "public_ip" {}

data "digitalocean_floating_ip" "example" {
  ip_address = var.public_ip
}

output "fip_output" {
  value = data.digitalocean_floating_ip.example.droplet_id
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported: