digitalocean_dedicated_inference_tokens
Generated on 6 May 2026
from Terraform version
v2.85.1
Returns a list of API tokens for a dedicated inference endpoint, with the ability to filter and sort the results.
Note: Token values (secrets) are not returned by this data source. Only token metadata (ID, name, creation time) is available.
Example Usage
data "digitalocean_dedicated_inference_tokens" "example" {
dedicated_inference_id = digitalocean_dedicated_inference.example.id
}
output "tokens" {
value = data.digitalocean_dedicated_inference_tokens.example.tokens
}Filter by name
data "digitalocean_dedicated_inference_tokens" "filtered" {
dedicated_inference_id = digitalocean_dedicated_inference.example.id
filter {
key = "name"
values = ["my-token"]
}
}Argument Reference
dedicated_inference_id- (Required) The ID of the dedicated inference endpoint to list tokens for.filter- (Optional) Filter the results. Thefilterblock is documented below.sort- (Optional) Sort the results. Thesortblock is documented below.
filter supports the following arguments:
key- (Required) Filter the tokens by this key. This may be one ofid,name,created_at.values- (Required) A list of values to match against thekeyfield.match_by- (Optional) One ofexact(default),re, orsubstring.all- (Optional) Set totrueto require that a field match all of thevaluesinstead of just one.
sort supports the following arguments:
key- (Required) Sort the tokens by this key. This may be one of the keys listed infilter.direction- (Optional) The sort direction. This may be eitherascordesc.
Attributes Reference
tokens- A list of tokens satisfying anyfilterandsortcriteria. Each element contains:id- The unique ID of the token.name- The name of the token.created_at- The date and time when the token was created.