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
LookupDropletin the Go SDK.
public static class GetDroplet {
public static Task<GetDropletResult> InvokeAsync(GetDropletArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetDroplet Result
The following output properties are available:
- Backups bool
Whether backups are enabled.
- Created
At 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
- Ipv4Address
Private string The Droplets private IPv4 address
- Ipv6 bool
Whether IPv6 is enabled.
- Ipv6Address string
The Droplets public IPv6 address
- Ipv6Address
Private 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
- Price
Hourly double Droplet hourly price.
- Price
Monthly double Droplet monthly price.
- Private
Networking 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.
- 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.
- Volume
Ids List<string> List of the IDs of each volumes attached to the Droplet.
- Vpc
Uuid string The ID of the VPC where the Droplet is located.
- Tag string
- Backups bool
Whether backups are enabled.
- Created
At 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
- Ipv4Address
Private string The Droplets private IPv4 address
- Ipv6 bool
Whether IPv6 is enabled.
- Ipv6Address string
The Droplets public IPv6 address
- Ipv6Address
Private 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
- Price
Hourly float64 Droplet hourly price.
- Price
Monthly float64 Droplet monthly price.
- Private
Networking 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.
- []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.
- Volume
Ids []string List of the IDs of each volumes attached to the Droplet.
- Vpc
Uuid string The ID of the VPC where the Droplet is located.
- Tag string
- backups boolean
Whether backups are enabled.
- created
At 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
- ipv4Address
Private string The Droplets private IPv4 address
- ipv6 boolean
Whether IPv6 is enabled.
- ipv6Address string
The Droplets public IPv6 address
- ipv6Address
Private 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
- price
Hourly number Droplet hourly price.
- price
Monthly number Droplet monthly price.
- private
Networking 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.
- 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.
- volume
Ids string[] List of the IDs of each volumes attached to the Droplet.
- vpc
Uuid 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_ strprivate The Droplets private IPv4 address
- ipv6 bool
Whether IPv6 is enabled.
- ipv6_
address str The Droplets public IPv6 address
- ipv6_
address_ strprivate 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.
- 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
digitaloceanTerraform Provider.