GetDroplet

Get information on a Droplet for use in other resources. This data source provides all of the Droplet’s properties as configured on your DigitalOcean account. This is useful if the Droplet in question is not managed by this provider or you need to utilize any of the Droplet’s data.

Note: This data source returns a single Droplet. When specifying a tag, an error is triggered if more than one Droplet is found.

Example Usage

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(DigitalOcean.GetDroplet.InvokeAsync(new DigitalOcean.GetDropletArgs
        {
            Name = "web",
        }));
        this.DropletOutput = example.Apply(example => example.Ipv4Address);
    }

    [Output("dropletOutput")]
    public Output<string> DropletOutput { get; set; }
}

Coming soon!

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_droplet(name="web")
pulumi.export("dropletOutput", example.ipv4_address)
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

const example = digitalocean.getDroplet({
    name: "web",
});
export const dropletOutput = example.then(example => example.ipv4Address);

Using GetDroplet

function getDroplet(args: GetDropletArgs, opts?: InvokeOptions): Promise<GetDropletResult>
function  get_droplet(id=None, name=None, tag=None, opts=None)
func LookupDroplet(ctx *Context, args *LookupDropletArgs, opts ...InvokeOption) (*LookupDropletResult, error)

Note: This function is named LookupDroplet in the Go SDK.

public static class GetDroplet {
    public static Task<GetDropletResult> InvokeAsync(GetDropletArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Id int

The ID of the Droplet

Name string

The name of the Droplet.

Tag string

A tag applied to the Droplet.

Id int

The ID of the Droplet

Name string

The name of the Droplet.

Tag string

A tag applied to the Droplet.

id number

The ID of the Droplet

name string

The name of the Droplet.

tag string

A tag applied to the Droplet.

id float

The ID of the Droplet

name str

The name of the Droplet.

tag str

A tag applied to the Droplet.

GetDroplet Result

The following output properties are available:

Backups bool

Whether backups are enabled.

CreatedAt string
Disk int

The size of the Droplets disk in GB.

Id int
Image string

The Droplet image ID or slug.

Ipv4Address string

The Droplets public IPv4 address

Ipv4AddressPrivate string

The Droplets private IPv4 address

Ipv6 bool

Whether IPv6 is enabled.

Ipv6Address string

The Droplets public IPv6 address

Ipv6AddressPrivate string

The Droplets private IPv6 address

Locked bool

Whether the Droplet is locked.

Memory int

The amount of the Droplets memory in MB.

Monitoring bool

Whether monitoring agent is installed.

Name string
PriceHourly double

Droplet hourly price.

PriceMonthly double

Droplet monthly price.

PrivateNetworking bool

Whether private networks are enabled.

Region string

The region the Droplet is running in.

Size string

The unique slug that indentifies the type of Droplet.

Status string

The status of the Droplet.

Tags List<string>

A list of the tags associated to the Droplet.

Urn string

The uniform resource name of the Droplet

Vcpus int

The number of the Droplets virtual CPUs.

VolumeIds List<string>

List of the IDs of each volumes attached to the Droplet.

VpcUuid string

The ID of the VPC where the Droplet is located.

Tag string
Backups bool

Whether backups are enabled.

CreatedAt string
Disk int

The size of the Droplets disk in GB.

Id int
Image string

The Droplet image ID or slug.

Ipv4Address string

The Droplets public IPv4 address

Ipv4AddressPrivate string

The Droplets private IPv4 address

Ipv6 bool

Whether IPv6 is enabled.

Ipv6Address string

The Droplets public IPv6 address

Ipv6AddressPrivate string

The Droplets private IPv6 address

Locked bool

Whether the Droplet is locked.

Memory int

The amount of the Droplets memory in MB.

Monitoring bool

Whether monitoring agent is installed.

Name string
PriceHourly float64

Droplet hourly price.

PriceMonthly float64

Droplet monthly price.

PrivateNetworking bool

Whether private networks are enabled.

Region string

The region the Droplet is running in.

Size string

The unique slug that indentifies the type of Droplet.

Status string

The status of the Droplet.

Tags []string

A list of the tags associated to the Droplet.

Urn string

The uniform resource name of the Droplet

Vcpus int

The number of the Droplets virtual CPUs.

VolumeIds []string

List of the IDs of each volumes attached to the Droplet.

VpcUuid string

The ID of the VPC where the Droplet is located.

Tag string
backups boolean

Whether backups are enabled.

createdAt string
disk number

The size of the Droplets disk in GB.

id number
image string

The Droplet image ID or slug.

ipv4Address string

The Droplets public IPv4 address

ipv4AddressPrivate string

The Droplets private IPv4 address

ipv6 boolean

Whether IPv6 is enabled.

ipv6Address string

The Droplets public IPv6 address

ipv6AddressPrivate string

The Droplets private IPv6 address

locked boolean

Whether the Droplet is locked.

memory number

The amount of the Droplets memory in MB.

monitoring boolean

Whether monitoring agent is installed.

name string
priceHourly number

Droplet hourly price.

priceMonthly number

Droplet monthly price.

privateNetworking boolean

Whether private networks are enabled.

region string

The region the Droplet is running in.

size string

The unique slug that indentifies the type of Droplet.

status string

The status of the Droplet.

tags string[]

A list of the tags associated to the Droplet.

urn string

The uniform resource name of the Droplet

vcpus number

The number of the Droplets virtual CPUs.

volumeIds string[]

List of the IDs of each volumes attached to the Droplet.

vpcUuid string

The ID of the VPC where the Droplet is located.

tag string
backups bool

Whether backups are enabled.

created_at str
disk float

The size of the Droplets disk in GB.

id float
image str

The Droplet image ID or slug.

ipv4_address str

The Droplets public IPv4 address

ipv4_address_private str

The Droplets private IPv4 address

ipv6 bool

Whether IPv6 is enabled.

ipv6_address str

The Droplets public IPv6 address

ipv6_address_private str

The Droplets private IPv6 address

locked bool

Whether the Droplet is locked.

memory float

The amount of the Droplets memory in MB.

monitoring bool

Whether monitoring agent is installed.

name str
price_hourly float

Droplet hourly price.

price_monthly float

Droplet monthly price.

private_networking bool

Whether private networks are enabled.

region str

The region the Droplet is running in.

size str

The unique slug that indentifies the type of Droplet.

status str

The status of the Droplet.

tags List[str]

A list of the tags associated to the Droplet.

urn str

The uniform resource name of the Droplet

vcpus float

The number of the Droplets virtual CPUs.

volume_ids List[str]

List of the IDs of each volumes attached to the Droplet.

vpc_uuid str

The ID of the VPC where the Droplet is located.

tag str

Package Details

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