Class 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,
});
}
}
Inherited Members
Namespace: Pulumi.DigitalOcean
Assembly: Pulumi.DigitalOcean.dll
Syntax
public class FloatingIp : CustomResource
Constructors
View SourceFloatingIp(String, FloatingIpArgs, CustomResourceOptions)
Create a FloatingIp resource with the given unique name, arguments, and options.
Declaration
public FloatingIp(string name, FloatingIpArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| FloatingIpArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDropletId
The ID of Droplet that the Floating IP will be assigned to.
Declaration
public Output<int?> DropletId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
IpAddress
The IP Address of the resource
Declaration
public Output<string> IpAddress { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Region
The region that the Floating IP is reserved to.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Urn
The uniform resource name of the floating ip
Declaration
public Output<string> Urn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, FloatingIpState, CustomResourceOptions)
Get an existing FloatingIp resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static FloatingIp Get(string name, Input<string> id, FloatingIpState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| FloatingIpState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| FloatingIp |