Data Sources Reference for the DigitalOcean Terraform Provider

Generated on 8 May 2025 from Terraform version v2.53.0

Data sources provide external information to Terraform. You can use data sources to query for information such as currently available Droplet images and regions, or account status.

The following data sources are available using the DigitalOcean Terraform provider:

digitalocean_account

Get information on your DigitalOcean account.

digitalocean_app

Get information on a DigitalOcean App.

digitalocean_certificate

Get information on a certificate. This data source provides the name, type, state, domains, expiry date, and the sha1 fingerprint as configured on your DigitalOcean account. This is useful if the certificate in question is not managed by Terraform or you need to utilize any of the certificates data.

digitalocean_container_registry

Get information on a container registry. This data source provides the name as configured on your DigitalOcean account. This is useful if the container registry name in question is not managed by Terraform or you need validate if the container registry exists in the account.

digitalocean_database_ca

Provides the CA certificate for a DigitalOcean database.

digitalocean_database_cluster

Provides information on a DigitalOcean database cluster resource.

digitalocean_database_connection_pool

Provides information on a DigitalOcean PostgreSQL database connection pool.

digitalocean_database_replica

Provides information on a DigitalOcean database replica.

digitalocean_database_user

Provides information on a DigitalOcean database user resource.

digitalocean_domain

Get information on a domain. This data source provides the name, TTL, and zone file as configured on your DigitalOcean account. This is useful if the domain name in question is not managed by Terraform or you need to utilize TTL or zone file data.

digitalocean_domains

Get information on domains for use in other resources, with the ability to filter and sort the results. If no filters are specified, all domains will be returned.

digitalocean_droplet

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 Terraform or you need to utilize any of the Droplet’s data.

digitalocean_droplet_autoscale

Get information on a Droplet Autoscale pool for use with other managed resources. This datasource provides all the Droplet Autoscale pool properties as configured on the DigitalOcean account. This is useful if the Droplet Autoscale pool in question is not managed by Terraform, or any of the relevant data would need to referenced in other managed resources.

digitalocean_droplet_snapshot

Droplet snapshots are saved instances of a Droplet. Use this data source to retrieve the ID of a DigitalOcean Droplet snapshot for use in other resources.

digitalocean_droplets

Get information on Droplets for use in other resources, with the ability to filter and sort the results. If no filters are specified, all Droplets will be returned.

digitalocean_firewall

Get information on a DigitalOcean Firewall.

digitalocean_floating_ip

~> Deprecated: DigitalOcean Floating IPs have been renamed reserved IPs. This data source will be removed in a future release. Please use digitalocean_reserved_ip instead.

digitalocean_image

Get information on an image for use in other resources (e.g. creating a Droplet based on snapshot). This data source provides all of the image properties as configured on your DigitalOcean account. This is useful if the image in question is not managed by Terraform or you need to utilize any of the image’s data.

digitalocean_images

Get information on images for use in other resources (e.g. creating a Droplet based on a snapshot), with the ability to filter and sort the results. If no filters are specified, all images will be returned.

digitalocean_kubernetes_cluster

Retrieves information about a DigitalOcean Kubernetes cluster for use in other resources. This data source provides all of the cluster’s properties as configured on your DigitalOcean account. This is useful if the cluster in question is not managed by Terraform.

digitalocean_kubernetes_versions

Provides access to the available DigitalOcean Kubernetes Service versions.

digitalocean_loadbalancer

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

digitalocean_partner_attachment

-> Partner Attachment is currently in private preview. If you are not a member of the private preview group for this feature, you will not be able to use it until is has been more widely released. Please follow the official DigitalOcean changelog for updates.

digitalocean_project

Get information on a single DigitalOcean project. If neither the id nor name attributes are provided, then this data source returns the default project.

digitalocean_projects

Retrieve information about all DigitalOcean projects associated with an account, with the ability to filter and sort the results. If no filters are specified, all projects will be returned.

digitalocean_record

Get information on a DNS record. This data source provides the name, TTL, and zone file as configured on your DigitalOcean account. This is useful if the record in question is not managed by Terraform.

digitalocean_records

Retrieve information about all DNS records within a domain, with the ability to filter and sort the results. If no filters are specified, all records will be returned.

digitalocean_region

Get information on a single DigitalOcean region. This is useful to find out what Droplet sizes and features are supported within a region.

digitalocean_regions

Retrieve information about all supported DigitalOcean regions, with the ability to filter and sort the results. If no filters are specified, all regions will be returned.

digitalocean_reserved_ip

Get information on a reserved IP. This data source provides the region and Droplet id as configured on your DigitalOcean account. This is useful if the reserved IP in question is not managed by Terraform or you need to find the Droplet the IP is attached to.

digitalocean_reserved_ipv6

Get information on a reserved IPv6. This data source provides the region_slug and droplet id as configured on your DigitalOcean account. This is useful if the reserved IPv6 in question is not managed by Terraform or you need to find the Droplet the IP is attached to.

digitalocean_sizes

Retrieves information about the Droplet sizes that DigitalOcean supports, with the ability to filter and sort the results. If no filters are specified, all sizes will be returned.

digitalocean_spaces_bucket

Get information on a Spaces bucket for use in other resources. This is useful if the Spaces bucket in question is not managed by Terraform or you need to utilize any of the bucket’s data.

digitalocean_spaces_bucket_object

The Spaces object data source allows access to the metadata and optionally (see below) content of an object stored inside a Spaces bucket.

digitalocean_spaces_bucket_objects

~> NOTE on max_keys: Retrieving very large numbers of keys can adversely affect Terraform’s performance.

digitalocean_spaces_buckets

Get information on Spaces buckets for use in other resources, with the ability to filter and sort the results. If no filters are specified, all Spaces buckets will be returned.

digitalocean_spaces_key

Get information on a Spaces key for use in other resources. This is useful if the Spaces key in question is not managed by Terraform or you need to utilize any of the key’s data.

digitalocean_ssh_key

Get information on a ssh key. This data source provides the name, public key, and fingerprint as configured on your DigitalOcean account. This is useful if the ssh key in question is not managed by Terraform or you need to utilize any of the keys data.

digitalocean_ssh_keys

Get information on SSH Keys for use in other resources.

digitalocean_tag

Get information on a tag. This data source provides the name as configured on your DigitalOcean account. This is useful if the tag name in question is not managed by Terraform or you need validate if the tag exists in the account.

digitalocean_tags

Returns a list of tags in your DigitalOcean account, with the ability to filter and sort the results. If no filters are specified, all tags will be returned.

digitalocean_volume

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

digitalocean_volume_snapshot

Volume snapshots are saved instances of a block storage volume. Use this data source to retrieve the ID of a DigitalOcean volume snapshot for use in other resources.

digitalocean_vpc

Retrieve information about a VPC for use in other resources.

digitalocean_vpc_peering

-> VPC peering is currently in alpha. If you are not a member of the alpha group for this feature, you will not be able to use it until it has been more widely released. Please follow the official DigitalOcean changelog for updates.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.