Skip to content

Add accelerator_topology_mode to google_compute_resource_policy#1235

Merged
modular-magician merged 1 commit into
terraform-google-modules:masterfrom
modular-magician:downstream-pr-47396e98f2920deeabf7425d1eac709f95d48283
Mar 9, 2026
Merged

Add accelerator_topology_mode to google_compute_resource_policy#1235
modular-magician merged 1 commit into
terraform-google-modules:masterfrom
modular-magician:downstream-pr-47396e98f2920deeabf7425d1eac709f95d48283

Conversation

@modular-magician

Copy link
Copy Markdown
Collaborator

Description

This PR adds support for the accelerator_topology_mode field in the google_compute_resource_policy resource, specifically within the workload_policy block.

This enables "Super-slicing" for TPU clusters on GKE by allowing users to set the topology mode to values such as PROVISION_ONLY or AUTO_CONNECT. The field aligns with the underlying Compute Engine API and gcloud beta compute resource-policies create workload-policy --accelerator-topology-mode capabilities.

Changes Made:

  • Added acceleratorTopologyMode to mmv1/products/compute/ResourcePolicy.yaml as an Enum type.
  • Updated conflict rules between accelerator_topology_mode, accelerator_topology, and max_topology_distance.
  • Added a new Terraform example (resource_policy_workload_policy_accelerator_topology_mode) to auto-generate documentation.
  • Added a handwritten acceptance test (TestAccComputeResourcePolicy_withTopologyMode) to verify creation and destruction.

Release Note Template for Downstream PRs (will be copied)

compute: added `accelerator_topology_mode` field to `google_compute_resource_policy` resource

Derived from GoogleCloudPlatform/magic-modules#16641

[upstream:47396e98f2920deeabf7425d1eac709f95d48283]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 59ddb59 into terraform-google-modules:master Mar 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant