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..FloatingIpresource by setting adroplet_idor using thedigitalocean..FloatingIpAssignmentresource, 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
new FloatingIp(name: string, args: FloatingIpArgs, opts?: CustomResourceOptions);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 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:
- Floating
Ip stringUrn The uniform resource name of the floating ip
- Id string
- The provider-assigned unique ID for this managed resource.
- Floating
Ip stringUrn The uniform resource name of the floating ip
- Id string
- The provider-assigned unique ID for this managed resource.
- floating
Ip stringUrn The uniform resource name of the floating ip
- id string
- The provider-assigned unique ID for this managed resource.
- floating_
ip_ strurn 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): FloatingIpstatic 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:
- droplet_
id float The ID of Droplet that the Floating IP will be assigned to.
- floating_
ip_ strurn 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
digitaloceanTerraform Provider.