GetFloatingIp

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 this provider 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

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var publicIp = config.RequireObject<dynamic>("publicIp");
        var example = Output.Create(DigitalOcean.GetFloatingIp.InvokeAsync(new DigitalOcean.GetFloatingIpArgs
        {
            IpAddress = publicIp,
        }));
        this.FipOutput = example.Apply(example => example.DropletId);
    }

    [Output("fipOutput")]
    public Output<string> FipOutput { get; set; }
}

Coming soon!

import pulumi
import pulumi_digitalocean as digitalocean

config = pulumi.Config()
public_ip = config.require_object("publicIp")
example = digitalocean.get_floating_ip(ip_address=public_ip)
pulumi.export("fipOutput", example.droplet_id)
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

const config = new pulumi.Config();
const publicIp = config.requireObject("publicIp");
const example = digitalocean.getFloatingIp({
    ipAddress: publicIp,
});
export const fipOutput = example.then(example => example.dropletId);

Using GetFloatingIp

function getFloatingIp(args: GetFloatingIpArgs, opts?: InvokeOptions): Promise<GetFloatingIpResult>
function  get_floating_ip(ip_address=None, opts=None)
func LookupFloatingIp(ctx *Context, args *LookupFloatingIpArgs, opts ...InvokeOption) (*LookupFloatingIpResult, error)

Note: This function is named LookupFloatingIp in the Go SDK.

public static class GetFloatingIp {
    public static Task<GetFloatingIpResult> InvokeAsync(GetFloatingIpArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

IpAddress string

The allocated IP address of the specific floating IP to retrieve.

IpAddress string

The allocated IP address of the specific floating IP to retrieve.

ipAddress string

The allocated IP address of the specific floating IP to retrieve.

ip_address str

The allocated IP address of the specific floating IP to retrieve.

GetFloatingIp Result

The following output properties are available:

DropletId int
FloatingIpUrn string
Id string

The provider-assigned unique ID for this managed resource.

IpAddress string
Region string
DropletId int
FloatingIpUrn string
Id string

The provider-assigned unique ID for this managed resource.

IpAddress string
Region string
dropletId number
floatingIpUrn string
id string

The provider-assigned unique ID for this managed resource.

ipAddress string
region string
droplet_id float
floating_ip_urn str
id str

The provider-assigned unique ID for this managed resource.

ip_address str
region str

Package Details

Repository
https://github.com/pulumi/pulumi-digitalocean
License
Apache-2.0
Notes
This Pulumi package is based on the digitalocean Terraform Provider.