Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Document values attribute in ssh_keys data source (fixes: #792). #832

Merged
merged 1 commit into from
May 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions docs/data-sources/ssh_keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ about a single SSH Key if you already know the unique `name` to retrieve.

## Example Usage

For example to find all SSH Keys:
For example, to find all SSH keys:

```hcl
data "digitalocean_ssh_keys" "keys" {
Expand All @@ -25,18 +25,31 @@ data "digitalocean_ssh_keys" "keys" {
}
```

Or to find ones matching specific values:

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

## Argument Reference

* `filter` - (Optional) Filter the results.
The `filter` block is documented below.

* `sort` - (Optional) Sort the results.
The `sort` block is documented below.

`filter` supports the following arguments:

* `key` - (Required) Filter the SSH Keys by this key. This may be one of `name`, `public_key`, or `fingerprint`.

* `values` - (Required) A list of values to match against the key field. Only retrieves SSH keys where the key field matches one or more of the values provided here.

`sort` supports the following arguments:

* `key` - (Required) Sort the SSH Keys by this key. This may be one of `name`, `public_key`, or `fingerprint`.
Expand All @@ -45,7 +58,7 @@ data "digitalocean_ssh_keys" "keys" {

## Attributes Reference

* `ssh_keys` - A list of SSH Keys. Each SSH Key has the following attributes:
* `ssh_keys` - A list of SSH Keys. Each SSH Key has the following attributes:

* `id` - The ID of the ssh key.
* `name`: The name of the ssh key.
Expand Down