Skip to content

Commit 87c503c

Browse files
Add NetworkConfigs and NetworkConfig.QueueCount to TPU v2 VM (#12481) (#20621)
[upstream:b2265ae629f0e13d9ec36acebd8b8c6b1a429f03] Signed-off-by: Modular Magician <[email protected]>
1 parent 5747104 commit 87c503c

File tree

2 files changed

+42
-6
lines changed

2 files changed

+42
-6
lines changed

.changelog/12481.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
tpuv2: added `network_configs` and `network_config.queue_count` fields to `google_tpu_v2_vm` resource
3+
```

website/docs/r/tpu_v2_vm.html.markdown

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ resource "google_tpu_v2_vm" "tpu" {
9090
enable_external_ips = true
9191
network = google_compute_network.network.id
9292
subnetwork = google_compute_subnetwork.subnet.id
93+
queue_count = 32
9394
}
9495
9596
scheduling_config {
@@ -206,6 +207,12 @@ The following arguments are supported:
206207
Network configurations for the TPU node.
207208
Structure is [documented below](#nested_network_config).
208209

210+
* `network_configs` -
211+
(Optional)
212+
Repeated network configurations for the TPU node. This field is used to specify multiple
213+
network configs for the TPU node.
214+
Structure is [documented below](#nested_network_configs).
215+
209216
* `service_account` -
210217
(Optional)
211218
The Google Cloud Platform Service Account to be used by the TPU node VMs. If None is
@@ -260,16 +267,12 @@ The following arguments are supported:
260267
* `network` -
261268
(Optional)
262269
The name of the network for the TPU node. It must be a preexisting Google Compute Engine
263-
network. If both network and subnetwork are specified, the given subnetwork must belong
264-
to the given network. If network is not specified, it will be looked up from the
265-
subnetwork if one is provided, or otherwise use "default".
270+
network. If none is provided, "default" will be used.
266271

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

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

287+
* `queue_count` -
288+
(Optional)
289+
Specifies networking queue count for TPU VM instance's network interface.
290+
291+
<a name="nested_network_configs"></a>The `network_configs` block supports:
292+
293+
* `network` -
294+
(Optional)
295+
The name of the network for the TPU node. It must be a preexisting Google Compute Engine
296+
network. If none is provided, "default" will be used.
297+
298+
* `subnetwork` -
299+
(Optional)
300+
The name of the subnetwork for the TPU node. It must be a preexisting Google Compute
301+
Engine subnetwork. If none is provided, "default" will be used.
302+
303+
* `enable_external_ips` -
304+
(Optional)
305+
Indicates that external IP addresses would be associated with the TPU workers. If set to
306+
false, the specified subnetwork or network should have Private Google Access enabled.
307+
308+
* `can_ip_forward` -
309+
(Optional)
310+
Allows the TPU node to send and receive packets with non-matching destination or source
311+
IPs. This is required if you plan to use the TPU workers to forward routes.
312+
313+
* `queue_count` -
314+
(Optional)
315+
Specifies networking queue count for TPU VM instance's network interface.
316+
284317
<a name="nested_service_account"></a>The `service_account` block supports:
285318

286319
* `email` -

0 commit comments

Comments
 (0)