Skip to content

Commit

Permalink
Add documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsomething committed Oct 25, 2024
1 parent eddc4da commit 0205419
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
10 changes: 5 additions & 5 deletions digitalocean/droplet/datasource_droplets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ resource "digitalocean_ssh_key" "foobar" {
}
resource "digitalocean_droplet" "gpu" {
name = "%s"
size = "%s"
image = "%s"
region = "nyc2"
ssh_keys = [digitalocean_ssh_key.foobar.id]
name = "%s"
size = "%s"
image = "%s"
region = "nyc2"
ssh_keys = [digitalocean_ssh_key.foobar.id]
}
resource "digitalocean_droplet" "regular" {
Expand Down
4 changes: 4 additions & 0 deletions docs/data-sources/droplet.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ One of the following arguments must be provided:
* `name` - (Optional) The name of the Droplet.
* `tag` - (Optional) A tag applied to the Droplet.

To include GPU Droplets when searching by name, use:

* `gpu` - (Optional) A boolean value specifying whether or not to search GPU Droplets

## Attributes Reference

The following attributes are exported:
Expand Down
5 changes: 5 additions & 0 deletions docs/data-sources/droplets.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ If no filters are specified, all Droplets will be returned.
This data source is useful if the Droplets in question are not managed by Terraform or you need to
utilize any of the Droplets' data.

By default, only non-GPU Droplets are returned. To list only GPU Droplets, set
the `gpus` attribute to `true`.

Note: You can use the [`digitalocean_droplet`](droplet) data source to obtain metadata
about a single Droplet if you already know the `id`, unique `name`, or unique `tag` to retrieve.

Expand Down Expand Up @@ -50,6 +53,8 @@ data "digitalocean_droplets" "small-with-backups" {

## Argument Reference

* `gpus` - (Optional) A boolean value specifying whether or not to list GPU Droplets

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

Expand Down

0 comments on commit 0205419

Please sign in to comment.