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

}

Coming soon!

import pulumi
import pulumi_digitalocean as digitalocean

# Create a new Web Droplet in the nyc2 region
web = digitalocean.Droplet("web",
    image="ubuntu-18-04-x64",
    region="nyc2",
    size="s-1vcpu-1gb")
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

// Create a new Web Droplet in the nyc2 region
const web = new digitalocean.Droplet("web", {
    image: "ubuntu-18-04-x64",
    region: "nyc2",
    size: "s-1vcpu-1gb",
});

Create a Droplet Resource

new Droplet(name: string, args: DropletArgs, opts?: CustomResourceOptions);
def Droplet(resource_name, opts=None, backups=None, image=None, ipv6=None, monitoring=None, name=None, private_networking=None, region=None, resize_disk=None, size=None, ssh_keys=None, tags=None, user_data=None, volume_ids=None, vpc_uuid=None, __props__=None);
func NewDroplet(ctx *Context, name string, args DropletArgs, opts ...ResourceOption) (*Droplet, error)
public Droplet(string name, DropletArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DropletArgs
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 DropletArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DropletArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Droplet Resource Properties

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

Inputs

The Droplet resource accepts the following input properties:

Image string

The Droplet image ID or slug.

Region string

The region to start in.

Size string

The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.

Backups bool

Boolean controlling if backups are made. Defaults to false.

Ipv6 bool

Boolean controlling if IPv6 is enabled. Defaults to false.

Monitoring bool

Boolean controlling whether monitoring agent is installed. Defaults to false.

Name string

The Droplet name.

PrivateNetworking bool

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.

ResizeDisk bool

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.

SshKeys List<string>

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.

Tags List<string>

A list of the tags to be applied to this Droplet.

UserData string

A string of the desired User Data for the Droplet.

VolumeIds List<string>

A list of the IDs of each block storage volume to be attached to the Droplet.

VpcUuid string

The ID of the VPC where the Droplet will be located.

Image string

The Droplet image ID or slug.

Region string

The region to start in.

Size string

The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.

Backups bool

Boolean controlling if backups are made. Defaults to false.

Ipv6 bool

Boolean controlling if IPv6 is enabled. Defaults to false.

Monitoring bool

Boolean controlling whether monitoring agent is installed. Defaults to false.

Name string

The Droplet name.

PrivateNetworking bool

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.

ResizeDisk bool

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.

SshKeys []string

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.

Tags []string

A list of the tags to be applied to this Droplet.

UserData string

A string of the desired User Data for the Droplet.

VolumeIds []string

A list of the IDs of each block storage volume to be attached to the Droplet.

VpcUuid string

The ID of the VPC where the Droplet will be located.

image string

The Droplet image ID or slug.

region Region

The region to start in.

size DropletSlug

The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.

backups boolean

Boolean controlling if backups are made. Defaults to false.

ipv6 boolean

Boolean controlling if IPv6 is enabled. Defaults to false.

monitoring boolean

Boolean controlling whether monitoring agent is installed. Defaults to false.

name string

The Droplet name.

privateNetworking boolean

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.

resizeDisk boolean

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.

sshKeys string[]

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.

tags string[]

A list of the tags to be applied to this Droplet.

userData string

A string of the desired User Data for the Droplet.

volumeIds string[]

A list of the IDs of each block storage volume to be attached to the Droplet.

vpcUuid string

The ID of the VPC where the Droplet will be located.

image str

The Droplet image ID or slug.

region str

The region to start in.

size str

The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.

backups bool

Boolean controlling if backups are made. Defaults to false.

ipv6 bool

Boolean controlling if IPv6 is enabled. Defaults to false.

monitoring bool

Boolean controlling whether monitoring agent is installed. Defaults to false.

name str

The Droplet name.

private_networking bool

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.

resize_disk bool

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.

ssh_keys List[str]

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.

tags List[str]

A list of the tags to be applied to this Droplet.

user_data str

A string of the desired User Data for the Droplet.

volume_ids List[str]

A list of the IDs of each block storage volume to be attached to the Droplet.

vpc_uuid str

The ID of the VPC where the Droplet will be located.

Outputs

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

CreatedAt string
Disk int

The size of the instance’s disk in GB

DropletUrn string

The uniform resource name of the Droplet * name- The name of the Droplet

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

The IPv4 address

Ipv4AddressPrivate string

The private networking IPv4 address

Ipv6Address string

The IPv6 address

Locked bool

Is the Droplet locked

Memory int
PriceHourly double

Droplet hourly price

PriceMonthly double

Droplet monthly price

Status string

The status of the Droplet

Vcpus int

The number of the instance’s virtual CPUs

CreatedAt string
Disk int

The size of the instance’s disk in GB

DropletUrn string

The uniform resource name of the Droplet * name- The name of the Droplet

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

The IPv4 address

Ipv4AddressPrivate string

The private networking IPv4 address

Ipv6Address string

The IPv6 address

Locked bool

Is the Droplet locked

Memory int
PriceHourly float64

Droplet hourly price

PriceMonthly float64

Droplet monthly price

Status string

The status of the Droplet

Vcpus int

The number of the instance’s virtual CPUs

createdAt string
disk number

The size of the instance’s disk in GB

dropletUrn string

The uniform resource name of the Droplet * name- The name of the Droplet

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

The IPv4 address

ipv4AddressPrivate string

The private networking IPv4 address

ipv6Address string

The IPv6 address

locked boolean

Is the Droplet locked

memory number
priceHourly number

Droplet hourly price

priceMonthly number

Droplet monthly price

status string

The status of the Droplet

vcpus number

The number of the instance’s virtual CPUs

created_at str
disk float

The size of the instance’s disk in GB

droplet_urn str

The uniform resource name of the Droplet * name- The name of the Droplet

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

The IPv4 address

ipv4_address_private str

The private networking IPv4 address

ipv6_address str

The IPv6 address

locked bool

Is the Droplet locked

memory float
price_hourly float

Droplet hourly price

price_monthly float

Droplet monthly price

status str

The status of the Droplet

vcpus float

The number of the instance’s virtual CPUs

Look up an Existing Droplet Resource

Get an existing Droplet 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?: DropletState, opts?: CustomResourceOptions): Droplet
static get(resource_name, id, opts=None, backups=None, created_at=None, disk=None, droplet_urn=None, image=None, ipv4_address=None, ipv4_address_private=None, ipv6=None, ipv6_address=None, locked=None, memory=None, monitoring=None, name=None, price_hourly=None, price_monthly=None, private_networking=None, region=None, resize_disk=None, size=None, ssh_keys=None, status=None, tags=None, user_data=None, vcpus=None, volume_ids=None, vpc_uuid=None, __props__=None);
func GetDroplet(ctx *Context, name string, id IDInput, state *DropletState, opts ...ResourceOption) (*Droplet, error)
public static Droplet Get(string name, Input<string> id, DropletState? 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:

Backups bool

Boolean controlling if backups are made. Defaults to false.

CreatedAt string
Disk int

The size of the instance’s disk in GB

DropletUrn string

The uniform resource name of the Droplet * name- The name of the Droplet

Image string

The Droplet image ID or slug.

Ipv4Address string

The IPv4 address

Ipv4AddressPrivate string

The private networking IPv4 address

Ipv6 bool

Boolean controlling if IPv6 is enabled. Defaults to false.

Ipv6Address string

The IPv6 address

Locked bool

Is the Droplet locked

Memory int
Monitoring bool

Boolean controlling whether monitoring agent is installed. Defaults to false.

Name string

The Droplet name.

PriceHourly double

Droplet hourly price

PriceMonthly double

Droplet monthly price

PrivateNetworking bool

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.

Region string

The region to start in.

ResizeDisk bool

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.

Size string

The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.

SshKeys List<string>

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.

Status string

The status of the Droplet

Tags List<string>

A list of the tags to be applied to this Droplet.

UserData string

A string of the desired User Data for the Droplet.

Vcpus int

The number of the instance’s virtual CPUs

VolumeIds List<string>

A list of the IDs of each block storage volume to be attached to the Droplet.

VpcUuid string

The ID of the VPC where the Droplet will be located.

Backups bool

Boolean controlling if backups are made. Defaults to false.

CreatedAt string
Disk int

The size of the instance’s disk in GB

DropletUrn string

The uniform resource name of the Droplet * name- The name of the Droplet

Image string

The Droplet image ID or slug.

Ipv4Address string

The IPv4 address

Ipv4AddressPrivate string

The private networking IPv4 address

Ipv6 bool

Boolean controlling if IPv6 is enabled. Defaults to false.

Ipv6Address string

The IPv6 address

Locked bool

Is the Droplet locked

Memory int
Monitoring bool

Boolean controlling whether monitoring agent is installed. Defaults to false.

Name string

The Droplet name.

PriceHourly float64

Droplet hourly price

PriceMonthly float64

Droplet monthly price

PrivateNetworking bool

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.

Region string

The region to start in.

ResizeDisk bool

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.

Size string

The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.

SshKeys []string

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.

Status string

The status of the Droplet

Tags []string

A list of the tags to be applied to this Droplet.

UserData string

A string of the desired User Data for the Droplet.

Vcpus int

The number of the instance’s virtual CPUs

VolumeIds []string

A list of the IDs of each block storage volume to be attached to the Droplet.

VpcUuid string

The ID of the VPC where the Droplet will be located.

backups boolean

Boolean controlling if backups are made. Defaults to false.

createdAt string
disk number

The size of the instance’s disk in GB

dropletUrn string

The uniform resource name of the Droplet * name- The name of the Droplet

image string

The Droplet image ID or slug.

ipv4Address string

The IPv4 address

ipv4AddressPrivate string

The private networking IPv4 address

ipv6 boolean

Boolean controlling if IPv6 is enabled. Defaults to false.

ipv6Address string

The IPv6 address

locked boolean

Is the Droplet locked

memory number
monitoring boolean

Boolean controlling whether monitoring agent is installed. Defaults to false.

name string

The Droplet name.

priceHourly number

Droplet hourly price

priceMonthly number

Droplet monthly price

privateNetworking boolean

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.

region Region

The region to start in.

resizeDisk boolean

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.

size DropletSlug

The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.

sshKeys string[]

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.

status string

The status of the Droplet

tags string[]

A list of the tags to be applied to this Droplet.

userData string

A string of the desired User Data for the Droplet.

vcpus number

The number of the instance’s virtual CPUs

volumeIds string[]

A list of the IDs of each block storage volume to be attached to the Droplet.

vpcUuid string

The ID of the VPC where the Droplet will be located.

backups bool

Boolean controlling if backups are made. Defaults to false.

created_at str
disk float

The size of the instance’s disk in GB

droplet_urn str

The uniform resource name of the Droplet * name- The name of the Droplet

image str

The Droplet image ID or slug.

ipv4_address str

The IPv4 address

ipv4_address_private str

The private networking IPv4 address

ipv6 bool

Boolean controlling if IPv6 is enabled. Defaults to false.

ipv6_address str

The IPv6 address

locked bool

Is the Droplet locked

memory float
monitoring bool

Boolean controlling whether monitoring agent is installed. Defaults to false.

name str

The Droplet name.

price_hourly float

Droplet hourly price

price_monthly float

Droplet monthly price

private_networking bool

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.

region str

The region to start in.

resize_disk bool

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.

size str

The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.

ssh_keys List[str]

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.

status str

The status of the Droplet

tags List[str]

A list of the tags to be applied to this Droplet.

user_data str

A string of the desired User Data for the Droplet.

vcpus float

The number of the instance’s virtual CPUs

volume_ids List[str]

A list of the IDs of each block storage volume to be attached to the Droplet.

vpc_uuid str

The ID of the VPC where the Droplet will be located.

Package Details

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