digitalocean_microdroplets
Generated on 6 Aug 2026
from Terraform version
v2.99.1
Fetches a list of DigitalOcean MicroDroplets with optional region and name server-side filters, plus filter and sort blocks for client-side narrowing.
Example Usage
data "digitalocean_microdroplets" "all" {}
data "digitalocean_microdroplets" "nyc3" {
region = "nyc3"
}
data "digitalocean_microdroplets" "by_name" {
name = "my-microdroplet"
}
data "digitalocean_microdroplets" "running" {
filter {
key = "current_state"
values = ["running"]
}
}Argument Reference
region- (Optional) Server-side filter: only include MicroDroplets in this region. Conflicts withname.name- (Optional) Server-side filter: only include MicroDroplets whose name matches exactly. Conflicts withregion.filter- (Optional) Repeatable client-side filter block:key- (Required) Field to match.values- (Required) List of values to match onkey.all- (Optional) Require every value to match. Defaults tofalse.match_by- (Optional)exact,re, orsubstring. Defaults toexact.
sort- (Optional) Repeatable client-side sort block:key- (Required) Field to sort by.direction- (Optional)asc(default) ordesc.
Attributes Reference
micro_droplets- A list of MicroDroplet records. Each record has the same attribute set as thedigitalocean_microdropletdata source.