Show / Hide Table of Contents

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",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Droplet
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.DigitalOcean
Assembly: Pulumi.DigitalOcean.dll
Syntax
public class Droplet : CustomResource

Constructors

View Source

Droplet(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 Source

Backups

Boolean controlling if backups are made. Defaults to false.

Declaration
public Output<bool?> Backups { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

CreatedAt

Declaration
public Output<string> CreatedAt { get; }
Property Value
Type Description
Output<System.String>
View Source

Disk

The size of the instance's disk in GB

Declaration
public Output<int> Disk { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Image

The Droplet image ID or slug.

Declaration
public Output<string> Image { get; }
Property Value
Type Description
Output<System.String>
View Source

Ipv4Address

The IPv4 address

Declaration
public Output<string> Ipv4Address { get; }
Property Value
Type Description
Output<System.String>
View Source

Ipv4AddressPrivate

The private networking IPv4 address

Declaration
public Output<string> Ipv4AddressPrivate { get; }
Property Value
Type Description
Output<System.String>
View Source

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>>
View Source

Ipv6Address

The IPv6 address

Declaration
public Output<string> Ipv6Address { get; }
Property Value
Type Description
Output<System.String>
View Source

Locked

Is the Droplet locked

Declaration
public Output<bool> Locked { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

Memory

Declaration
public Output<int> Memory { get; }
Property Value
Type Description
Output<System.Int32>
View Source

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>>
View Source

Name

The Droplet name.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

PriceHourly

Droplet hourly price

Declaration
public Output<double> PriceHourly { get; }
Property Value
Type Description
Output<System.Double>
View Source

PriceMonthly

Droplet monthly price

Declaration
public Output<double> PriceMonthly { get; }
Property Value
Type Description
Output<System.Double>
View Source

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>
View Source

Region

The region to start in.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

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>>
View Source

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>
View Source

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>>
View Source

Status

The status of the Droplet

Declaration
public Output<string> Status { get; }
Property Value
Type Description
Output<System.String>
View Source

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>>
View Source

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>
View Source

UserData

A string of the desired User Data for the Droplet.

Declaration
public Output<string> UserData { get; }
Property Value
Type Description
Output<System.String>
View Source

Vcpus

The number of the instance's virtual CPUs

Declaration
public Output<int> Vcpus { get; }
Property Value
Type Description
Output<System.Int32>
View Source

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>>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.