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.
- 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_uuidattribute 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 tofalse, 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<string> A list of SSH IDs or fingerprints to enable in the format
[12345, 123456]. To retrieve this info, use a tool such ascurlwith the DigitalOcean API, to retrieve them.- List<string>
A list of the tags to be applied to this Droplet.
- User
Data string A string of the desired User Data for the Droplet.
- Volume
Ids List<string> A list of the IDs of each block storage volume to be attached to the Droplet.
- Vpc
Uuid 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.
- 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_uuidattribute 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 tofalse, 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 []string A list of SSH IDs or fingerprints to enable in the format
[12345, 123456]. To retrieve this info, use a tool such ascurlwith the DigitalOcean API, to retrieve them.- []string
A list of the tags to be applied to this Droplet.
- User
Data string A string of the desired User Data for the Droplet.
- Volume
Ids []string A list of the IDs of each block storage volume to be attached to the Droplet.
- Vpc
Uuid 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
Droplet
Slug 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.
- private
Networking 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_uuidattribute to specify a different VPC.- resize
Disk boolean Boolean controlling whether to increase the disk size when resizing a Droplet. It defaults to
true. When set tofalse, 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 string[] A list of SSH IDs or fingerprints to enable in the format
[12345, 123456]. To retrieve this info, use a tool such ascurlwith the DigitalOcean API, to retrieve them.- string[]
A list of the tags to be applied to this Droplet.
- user
Data string A string of the desired User Data for the Droplet.
- volume
Ids string[] A list of the IDs of each block storage volume to be attached to the Droplet.
- vpc
Uuid 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_uuidattribute 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 tofalse, 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 ascurlwith the DigitalOcean API, to retrieve them.- 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:
- Created
At string - Disk int
The size of the instance’s disk in GB
- Droplet
Urn 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
- Ipv4Address
Private string The private networking IPv4 address
- Ipv6Address string
The IPv6 address
- Locked bool
Is the Droplet locked
- Memory int
- Price
Hourly double Droplet hourly price
- Price
Monthly double Droplet monthly price
- Status string
The status of the Droplet
- Vcpus int
The number of the instance’s virtual CPUs
- Created
At string - Disk int
The size of the instance’s disk in GB
- Droplet
Urn 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
- Ipv4Address
Private string The private networking IPv4 address
- Ipv6Address string
The IPv6 address
- Locked bool
Is the Droplet locked
- Memory int
- Price
Hourly float64 Droplet hourly price
- Price
Monthly float64 Droplet monthly price
- Status string
The status of the Droplet
- Vcpus int
The number of the instance’s virtual CPUs
- created
At string - disk number
The size of the instance’s disk in GB
- droplet
Urn 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
- ipv4Address
Private string The private networking IPv4 address
- ipv6Address string
The IPv6 address
- locked boolean
Is the Droplet locked
- memory number
- price
Hourly number Droplet hourly price
- price
Monthly 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_ strprivate 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): Dropletstatic 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.
- Created
At string - Disk int
The size of the instance’s disk in GB
- Droplet
Urn 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
- Ipv4Address
Private 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.
- Price
Hourly double Droplet hourly price
- Price
Monthly double 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_uuidattribute to specify a different VPC.- Region string
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 tofalse, 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.
- Ssh
Keys List<string> A list of SSH IDs or fingerprints to enable in the format
[12345, 123456]. To retrieve this info, use a tool such ascurlwith the DigitalOcean API, to retrieve them.- Status string
The status of the Droplet
- List<string>
A list of the tags to be applied to this Droplet.
- User
Data string A string of the desired User Data for the Droplet.
- Vcpus int
The number of the instance’s virtual CPUs
- Volume
Ids List<string> A list of the IDs of each block storage volume to be attached to the Droplet.
- Vpc
Uuid 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 string - Disk int
The size of the instance’s disk in GB
- Droplet
Urn 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
- Ipv4Address
Private 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.
- Price
Hourly float64 Droplet hourly price
- Price
Monthly float64 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_uuidattribute to specify a different VPC.- Region string
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 tofalse, 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.
- Ssh
Keys []string A list of SSH IDs or fingerprints to enable in the format
[12345, 123456]. To retrieve this info, use a tool such ascurlwith the DigitalOcean API, to retrieve them.- Status string
The status of the Droplet
- []string
A list of the tags to be applied to this Droplet.
- User
Data string A string of the desired User Data for the Droplet.
- Vcpus int
The number of the instance’s virtual CPUs
- Volume
Ids []string A list of the IDs of each block storage volume to be attached to the Droplet.
- Vpc
Uuid string The ID of the VPC where the Droplet will be located.
- backups boolean
Boolean controlling if backups are made. Defaults to false.
- created
At string - disk number
The size of the instance’s disk in GB
- droplet
Urn 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
- ipv4Address
Private 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.
- price
Hourly number Droplet hourly price
- price
Monthly number Droplet monthly price
- private
Networking 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_uuidattribute to specify a different VPC.- region Region
The region to start in.
- resize
Disk boolean Boolean controlling whether to increase the disk size when resizing a Droplet. It defaults to
true. When set tofalse, 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
Droplet
Slug The unique slug that indentifies the type of Droplet. You can find a list of available slugs on DigitalOcean API documentation.
- ssh
Keys string[] A list of SSH IDs or fingerprints to enable in the format
[12345, 123456]. To retrieve this info, use a tool such ascurlwith the DigitalOcean API, to retrieve them.- status string
The status of the Droplet
- string[]
A list of the tags to be applied to this Droplet.
- user
Data string A string of the desired User Data for the Droplet.
- vcpus number
The number of the instance’s virtual CPUs
- volume
Ids string[] A list of the IDs of each block storage volume to be attached to the Droplet.
- vpc
Uuid 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_ strprivate 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_uuidattribute 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 tofalse, 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 ascurlwith the DigitalOcean API, to retrieve them.- status str
The status of the Droplet
- 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
digitaloceanTerraform Provider.