Skip to content

Commit

Permalink
Add NetworkConfigs and NetworkConfig.QueueCount to TPU v2 VM (#12481) (
Browse files Browse the repository at this point in the history
…#20621)

[upstream:b2265ae629f0e13d9ec36acebd8b8c6b1a429f03]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Dec 6, 2024
1 parent 5747104 commit 87c503c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .changelog/12481.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
tpuv2: added `network_configs` and `network_config.queue_count` fields to `google_tpu_v2_vm` resource
```
45 changes: 39 additions & 6 deletions website/docs/r/tpu_v2_vm.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ resource "google_tpu_v2_vm" "tpu" {
enable_external_ips = true
network = google_compute_network.network.id
subnetwork = google_compute_subnetwork.subnet.id
queue_count = 32
}
scheduling_config {
Expand Down Expand Up @@ -206,6 +207,12 @@ The following arguments are supported:
Network configurations for the TPU node.
Structure is [documented below](#nested_network_config).

* `network_configs` -
(Optional)
Repeated network configurations for the TPU node. This field is used to specify multiple
network configs for the TPU node.
Structure is [documented below](#nested_network_configs).

* `service_account` -
(Optional)
The Google Cloud Platform Service Account to be used by the TPU node VMs. If None is
Expand Down Expand Up @@ -260,16 +267,12 @@ The following arguments are supported:
* `network` -
(Optional)
The name of the network for the TPU node. It must be a preexisting Google Compute Engine
network. If both network and subnetwork are specified, the given subnetwork must belong
to the given network. If network is not specified, it will be looked up from the
subnetwork if one is provided, or otherwise use "default".
network. If none is provided, "default" will be used.

* `subnetwork` -
(Optional)
The name of the subnetwork for the TPU node. It must be a preexisting Google Compute
Engine subnetwork. If both network and subnetwork are specified, the given subnetwork
must belong to the given network. If subnetwork is not specified, the subnetwork with the
same name as the network will be used.
Engine subnetwork. If none is provided, "default" will be used.

* `enable_external_ips` -
(Optional)
Expand All @@ -281,6 +284,36 @@ The following arguments are supported:
Allows the TPU node to send and receive packets with non-matching destination or source
IPs. This is required if you plan to use the TPU workers to forward routes.

* `queue_count` -
(Optional)
Specifies networking queue count for TPU VM instance's network interface.

<a name="nested_network_configs"></a>The `network_configs` block supports:

* `network` -
(Optional)
The name of the network for the TPU node. It must be a preexisting Google Compute Engine
network. If none is provided, "default" will be used.

* `subnetwork` -
(Optional)
The name of the subnetwork for the TPU node. It must be a preexisting Google Compute
Engine subnetwork. If none is provided, "default" will be used.

* `enable_external_ips` -
(Optional)
Indicates that external IP addresses would be associated with the TPU workers. If set to
false, the specified subnetwork or network should have Private Google Access enabled.

* `can_ip_forward` -
(Optional)
Allows the TPU node to send and receive packets with non-matching destination or source
IPs. This is required if you plan to use the TPU workers to forward routes.

* `queue_count` -
(Optional)
Specifies networking queue count for TPU VM instance's network interface.

<a name="nested_service_account"></a>The `service_account` block supports:

* `email` -
Expand Down

0 comments on commit 87c503c

Please sign in to comment.