Skip to content

Commit 197022d

Browse files
Feature gap: Add group_placement_policy.0.gpu_topology field to ResourcePolicy (#13354) (#21871)
[upstream:892f5136a4f767351b2d848fcc32c26206544b09] Signed-off-by: Modular Magician <[email protected]>
1 parent fd2f311 commit 197022d

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.changelog/13354.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
compute: Add `group_placement_policy.0.gpu_topology` field to `google_compute_resource_policy` resource (beta)
3+
```

website/docs/r/compute_resource_policy.html.markdown

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,26 @@ resource "google_compute_resource_policy" "cgroup" {
197197
}
198198
}
199199
```
200+
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
201+
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md&cloudshell_working_dir=resource_policy_placement_policy_gpu_topology&open_in_editor=main.tf" target="_blank">
202+
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
203+
</a>
204+
</div>
205+
## Example Usage - Resource Policy Placement Policy Gpu Topology
206+
207+
208+
```hcl
209+
resource "google_compute_resource_policy" "baz" {
210+
provider = google-beta
211+
name = "gce-policy"
212+
region = "europe-west9"
213+
group_placement_policy {
214+
vm_count = 2
215+
collocation = "COLLOCATED"
216+
gpu_topology = "1x72"
217+
}
218+
}
219+
```
200220

201221
## Argument Reference
202222

@@ -388,6 +408,10 @@ The following arguments are supported:
388408
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
389409
Specifies the number of max logical switches.
390410

411+
* `gpu_topology` -
412+
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
413+
Specifies the shape of the GPU slice, in slice based GPU families eg. A4X.
414+
391415
<a name="nested_instance_schedule_policy"></a>The `instance_schedule_policy` block supports:
392416

393417
* `vm_start_schedule` -

0 commit comments

Comments
 (0)