digitalocean_ssh_keys

Get information on SSH Keys for use in other resources.

This data source is useful if the SSH Keys in question are not managed by Terraform or you need to utilize any of the SSH Keys' data.

Note: You can use the digitalocean_ssh_key data source to obtain metadata about a single SSH Key if you already know the unique name to retrieve.

Example Usage

For example, to find all SSH keys:

data "digitalocean_ssh_keys" "keys" {
  sort {
    key       = "name"
    direction = "asc"
  }
}

Or to find ones matching specific values:

data "digitalocean_ssh_keys" "keys" {
  filter {
    key    = "name"
    values = ["laptop", "desktop"]
  }
}

Argument Reference

filter supports the following arguments:

sort supports the following arguments:

Attributes Reference