FloatingIp

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

NOTE: Floating IPs can be assigned to a Droplet either directly on the digitalocean..FloatingIp resource by setting a droplet_id or using the digitalocean..FloatingIpAssignment resource, but the two cannot be used together.

Example Usage

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
    public MyStack()
    {
        var foobarDroplet = new DigitalOcean.Droplet("foobarDroplet", new DigitalOcean.DropletArgs
        {
            Size = "s-1vcpu-1gb",
            Image = "ubuntu-18-04-x64",
            Region = "sgp1",
            Ipv6 = true,
            PrivateNetworking = true,
        });
        var foobarFloatingIp = new DigitalOcean.FloatingIp("foobarFloatingIp", new DigitalOcean.FloatingIpArgs
        {
            DropletId = foobarDroplet.Id,
            Region = foobarDroplet.Region,
        });
    }

}

Coming soon!

import pulumi
import pulumi_digitalocean as digitalocean

foobar_droplet = digitalocean.Droplet("foobarDroplet",
    size="s-1vcpu-1gb",
    image="ubuntu-18-04-x64",
    region="sgp1",
    ipv6=True,
    private_networking=True)
foobar_floating_ip = digitalocean.FloatingIp("foobarFloatingIp",
    droplet_id=foobar_droplet.id,
    region=foobar_droplet.region)
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

const foobarDroplet = new digitalocean.Droplet("foobarDroplet", {
    size: "s-1vcpu-1gb",
    image: "ubuntu-18-04-x64",
    region: "sgp1",
    ipv6: true,
    privateNetworking: true,
});
const foobarFloatingIp = new digitalocean.FloatingIp("foobarFloatingIp", {
    dropletId: foobarDroplet.id,
    region: foobarDroplet.region,
});

Create a FloatingIp Resource

def FloatingIp(resource_name, opts=None, droplet_id=None, ip_address=None, region=None, __props__=None);
func NewFloatingIp(ctx *Context, name string, args FloatingIpArgs, opts ...ResourceOption) (*FloatingIp, error)
public FloatingIp(string name, FloatingIpArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args FloatingIpArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args FloatingIpArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FloatingIpArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

FloatingIp Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The FloatingIp resource accepts the following input properties:

Region string

The region that the Floating IP is reserved to.

DropletId int

The ID of Droplet that the Floating IP will be assigned to.

IpAddress string

The IP Address of the resource

Region string

The region that the Floating IP is reserved to.

DropletId int

The ID of Droplet that the Floating IP will be assigned to.

IpAddress string

The IP Address of the resource

region string

The region that the Floating IP is reserved to.

dropletId number

The ID of Droplet that the Floating IP will be assigned to.

ipAddress string

The IP Address of the resource

region str

The region that the Floating IP is reserved to.

droplet_id float

The ID of Droplet that the Floating IP will be assigned to.

ip_address str

The IP Address of the resource

Outputs

All input properties are implicitly available as output properties. Additionally, the FloatingIp resource produces the following output properties:

FloatingIpUrn string

The uniform resource name of the floating ip

Id string
The provider-assigned unique ID for this managed resource.
FloatingIpUrn string

The uniform resource name of the floating ip

Id string
The provider-assigned unique ID for this managed resource.
floatingIpUrn string

The uniform resource name of the floating ip

id string
The provider-assigned unique ID for this managed resource.
floating_ip_urn str

The uniform resource name of the floating ip

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing FloatingIp Resource

Get an existing FloatingIp resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: FloatingIpState, opts?: CustomResourceOptions): FloatingIp
static get(resource_name, id, opts=None, droplet_id=None, floating_ip_urn=None, ip_address=None, region=None, __props__=None);
func GetFloatingIp(ctx *Context, name string, id IDInput, state *FloatingIpState, opts ...ResourceOption) (*FloatingIp, error)
public static FloatingIp Get(string name, Input<string> id, FloatingIpState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

DropletId int

The ID of Droplet that the Floating IP will be assigned to.

FloatingIpUrn string

The uniform resource name of the floating ip

IpAddress string

The IP Address of the resource

Region string

The region that the Floating IP is reserved to.

DropletId int

The ID of Droplet that the Floating IP will be assigned to.

FloatingIpUrn string

The uniform resource name of the floating ip

IpAddress string

The IP Address of the resource

Region string

The region that the Floating IP is reserved to.

dropletId number

The ID of Droplet that the Floating IP will be assigned to.

floatingIpUrn string

The uniform resource name of the floating ip

ipAddress string

The IP Address of the resource

region string

The region that the Floating IP is reserved to.

droplet_id float

The ID of Droplet that the Floating IP will be assigned to.

floating_ip_urn str

The uniform resource name of the floating ip

ip_address str

The IP Address of the resource

region str

The region that the Floating IP is reserved to.

Package Details

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