Skip to content
Open
Show file tree
Hide file tree
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
28 changes: 21 additions & 7 deletions mmv1/products/compute/ResourcePolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ name: ResourcePolicy
description: |
A policy that can be attached to a resource to specify or schedule actions on that resource.
references:
guides: {}
api: https://cloud.google.com/compute/docs/reference/rest/v1/resourcePolicies
base_url: projects/{{project}}/regions/{{region}}/resourcePolicies
has_self_link: true
Expand All @@ -36,8 +35,8 @@ async:
base_url: '{{op_id}}'
include_in_tgc_next: true
tgc_tests:
- name: 'TestAccComputeResourcePolicy_withTopologyMode'
skip: 'The test should not in GA provider'
- name: TestAccComputeResourcePolicy_withTopologyMode
skip: The test should not in GA provider
custom_code:
constants: templates/terraform/constants/compute_resource_policy.go.tmpl
examples:
Expand Down Expand Up @@ -101,6 +100,10 @@ examples:
min_version: beta
vars:
name: gce-policy
- name: resource_policy_placement_policy_multislice
primary_resource_id: default
vars:
name: gce-policy
parameters:
- name: region
type: ResourceRef
Expand Down Expand Up @@ -337,6 +340,17 @@ properties:
Specifies the shape of the TPU slice.
immutable: true
min_version: beta
- name: acceleratorTopologyMode
type: Enum
description: |-
Specifies the connection mode for the accelerator topology. If not
specified, the default is AUTO_CONNECT.
enum_values:
- AUTO_CONNECT
- PROVISION_ONLY
- name: sliceCount
type: Integer
description: Specifies the number of slices in a multislice workload.
- name: instanceSchedulePolicy
type: NestedObject
description: |
Expand Down Expand Up @@ -441,7 +455,6 @@ properties:
- workload_policy.0.max_topology_distance
- name: acceleratorTopologyMode
type: Enum
is_missing_in_cai: true
description: |
Specifies the connection mode for the accelerator topology.
Supported values are:
Expand All @@ -450,10 +463,11 @@ properties:

If not specified, the default is AUTO_CONNECT.
This field can be set only when the workload policy type is HIGH_THROUGHPUT and cannot be set if max topology distance is set.
immutable: true
min_version: beta
conflicts:
- workload_policy.0.max_topology_distance
enum_values:
- AUTO_CONNECT
- PROVISION_ONLY
immutable: true
conflicts:
- workload_policy.0.max_topology_distance
is_missing_in_cai: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "google_compute_resource_policy" "default" {
name = "{{index $.Vars "name"}}"
region = "us-central1"
group_placement_policy {
vm_count = 2
collocation = "COLLOCATED"
accelerator_topology_mode = "AUTO_CONNECT"
slice_count = 2
}
}
Loading