Data Sources Reference for the DigitalOcean Terraform Provider

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:

Get information on your DigitalOcean account.
Get information on a DigitalOcean App.
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.
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.
Provides the CA certificate for a DigitalOcean database.
Provides information on a DigitalOcean database cluster resource.
Provides information on a DigitalOcean PostgreSQL database connection pool.
Provides information on a DigitalOcean database replica.
Provides information on a DigitalOcean database user resource.
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.
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.
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.
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.
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.
Get information on a DigitalOcean Firewall.
~> 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.
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.
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.
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.
Provides access to the available DigitalOcean Kubernetes Service versions.
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.
Get information on a single DigitalOcean project. If neither the id nor name attributes are provided, then this data source returns the default project.
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.
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.
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.
Get information on a single DigitalOcean region. This is useful to find out what Droplet sizes and features are supported within a region.
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.
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.
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.
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.
The Spaces object data source allows access to the metadata and optionally (see below) content of an object stored inside a Spaces bucket.
~> NOTE on max_keys: Retrieving very large numbers of keys can adversely affect Terraform’s performance.
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.
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.
Get information on SSH Keys for use in other resources.
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.
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.
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.
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.
Retrieve information about a VPC for use in other resources.