Class Droplet
Provides a DigitalOcean Droplet resource. This can be used to create, modify, and delete Droplets. Droplets also support provisioning.
Example Usage
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
class MyStack : Stack
{
public MyStack()
{
// Create a new Web Droplet in the nyc2 region
var web = new DigitalOcean.Droplet("web", new DigitalOcean.DropletArgs
{
Image = "ubuntu-18-04-x64",
Region = "nyc2",
Size = "s-1vcpu-1gb",
});
}
}
Inherited Members
Namespace: Pulumi.DigitalOcean
Assembly: Pulumi.DigitalOcean.dll
Syntax
public class Droplet : CustomResource
Constructors
View SourceDroplet(String, DropletArgs, CustomResourceOptions)
Create a Droplet resource with the given unique name, arguments, and options.
Declaration
public Droplet(string name, DropletArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DropletArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceBackups
Boolean controlling if backups are made. Defaults to false.
Declaration
public Output<bool?> Backups { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
CreatedAt
Declaration
public Output<string> CreatedAt { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Disk
The size of the instance's disk in GB
Declaration
public Output<int> Disk { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Image
The Droplet image ID or slug.
Declaration
public Output<string> Image { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Ipv4Address
The IPv4 address
Declaration
public Output<string> Ipv4Address { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Ipv4AddressPrivate
The private networking IPv4 address
Declaration
public Output<string> Ipv4AddressPrivate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Ipv6
Boolean controlling if IPv6 is enabled. Defaults to false.
Declaration
public Output<bool?> Ipv6 { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Ipv6Address
The IPv6 address
Declaration
public Output<string> Ipv6Address { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Locked
Is the Droplet locked
Declaration
public Output<bool> Locked { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Memory
Declaration
public Output<int> Memory { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Monitoring
Boolean controlling whether monitoring agent is installed. Defaults to false.
Declaration
public Output<bool?> Monitoring { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Name
The Droplet name.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PriceHourly
Droplet hourly price
Declaration
public Output<double> PriceHourly { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Double> |
PriceMonthly
Droplet monthly price
Declaration
public Output<double> PriceMonthly { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Double> |
PrivateNetworking
Boolean controlling if private networking
is enabled. When VPC is enabled on an account, this will provision the
Droplet inside of your account's default VPC for the region. Use the
vpc_uuid attribute to specify a different VPC.
Declaration
public Output<bool> PrivateNetworking { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Region
The region to start in.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResizeDisk
Boolean controlling whether to increase the disk
size when resizing a Droplet. It defaults to true. When set to false,
only the Droplet's RAM and CPU will be resized. Increasing a Droplet's disk
size is a permanent change. Increasing only RAM and CPU is reversible.
Declaration
public Output<bool?> ResizeDisk { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Size
The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.
Declaration
public Output<string> Size { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SshKeys
A list of SSH IDs or fingerprints to enable in
the format [12345, 123456]. To retrieve this info, use a tool such
as curl with the DigitalOcean API,
to retrieve them.
Declaration
public Output<ImmutableArray<string>> SshKeys { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Status
The status of the Droplet
Declaration
public Output<string> Status { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A list of the tags to be applied to this Droplet.
Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Urn
The uniform resource name of the Droplet
name- The name of the Droplet
Declaration
public Output<string> Urn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UserData
A string of the desired User Data for the Droplet.
Declaration
public Output<string> UserData { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Vcpus
The number of the instance's virtual CPUs
Declaration
public Output<int> Vcpus { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
VolumeIds
A list of the IDs of each block storage volume to be attached to the Droplet.
Declaration
public Output<ImmutableArray<string>> VolumeIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
VpcUuid
The ID of the VPC where the Droplet will be located.
Declaration
public Output<string> VpcUuid { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, DropletState, CustomResourceOptions)
Get an existing Droplet resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Droplet Get(string name, Input<string> id, DropletState 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. |
| DropletState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Droplet |