Skip to content

Commit

Permalink
Allow specifying accelerators in cluster node_config (hashicorp#1115)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhague authored and nat-henderson committed Feb 24, 2018
1 parent c1a1729 commit b01a547
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/r/container_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ The `node_config` block supports:
* `disk_size_gb` - (Optional) Size of the disk attached to each node, specified
in GB. The smallest allowed disk size is 10GB. Defaults to 100GB.

* `guest_accelerator` - (Optional) List of the type and count of accelerator cards attached to the instance.
Structure documented below.

* `image_type` - (Optional) The image type to use for this node.

* `labels` - (Optional) The Kubernetes labels (key/value pairs) to be applied to each node.
Expand Down Expand Up @@ -276,6 +279,12 @@ The `node_config` block supports:
* `tags` - (Optional) The list of instance tags applied to all nodes. Tags are used to identify
valid sources or targets for network firewalls.

The `guest_accelerator` block supports:

* `type` (Required) - The accelerator type resource to expose to this instance. E.g. `nvidia-tesla-k80`.

* `count` (Required) - The number of the guest accelerator cards exposed to this instance.

## Attributes Reference

In addition to the arguments listed above, the following computed attributes are
Expand Down
4 changes: 4 additions & 0 deletions docs/r/container_node_pool.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ resource "google_container_cluster" "primary" {
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring",
]
guest_accelerator = [{
type="nvidia-tesla-k80"
count=1
}]
}
}
```
Expand Down

0 comments on commit b01a547

Please sign in to comment.