Skip to content

Commit 955c852

Browse files
committed
feat: add support for cluster level total_egress_bandwidth_tier
Signed-off-by: drfaust92 <[email protected]>
1 parent e5ade9c commit 955c852

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+194
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ Then perform the following commands on the root folder:
267267
| stub\_domains | Map of stub domains and their resolvers to forward DNS queries for a certain domain to an external DNS server | `map(list(string))` | `{}` | no |
268268
| subnetwork | The subnetwork to host the cluster in (required) | `string` | n/a | yes |
269269
| timeouts | Timeout for cluster operations. | `map(string)` | `{}` | no |
270+
| total\_egress\_bandwidth\_tier | Specifies the total network bandwidth tier for NodePools in the cluster. Valid values are `TIER_UNSPECIFIED` and `TIER_1`. Defaults to `TIER_UNSPECIFIED`. | `string` | `null` | no |
270271
| upstream\_nameservers | If specified, the values replace the nameservers taken by default from the node’s /etc/resolv.conf | `list(string)` | `[]` | no |
271272
| windows\_node\_pools | List of maps containing Windows node pools | `list(map(string))` | `[]` | no |
272273
| zones | The zones to host the cluster in (optional if regional cluster / required if zonal) | `list(string)` | `[]` | no |

autogen/main/cluster.tf.tmpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ resource "google_container_cluster" "primary" {
229229
{% if autopilot_cluster != true %}
230230

231231
dynamic "identity_service_config" {
232-
for_each = var.enable_identity_service !=null ? [var.enable_identity_service] : []
232+
for_each = var.enable_identity_service != null ? [var.enable_identity_service] : []
233233
content {
234234
enabled = identity_service_config.value
235235
}
@@ -259,6 +259,13 @@ resource "google_container_cluster" "primary" {
259259

260260
in_transit_encryption_config = var.in_transit_encryption_config
261261

262+
dynamic "network_performance_config" {
263+
for_each = var.total_egress_bandwidth_tier != null ? [1] : []
264+
content {
265+
total_egress_bandwidth_tier = var.total_egress_bandwidth_tier
266+
}
267+
}
268+
262269
dynamic "secret_manager_config" {
263270
for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
264271
content {

autogen/main/variables.tf.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,12 @@ variable "in_transit_encryption_config" {
704704
default = null
705705
}
706706

707+
variable "total_egress_bandwidth_tier" {
708+
type = string
709+
description = "Specifies the total network bandwidth tier for NodePools in the cluster. Valid values are `TIER_UNSPECIFIED` and `TIER_1`. Defaults to `TIER_UNSPECIFIED`."
710+
default = null
711+
}
712+
707713
variable "security_posture_mode" {
708714
description = "Security posture mode. Accepted values are `DISABLED` and `BASIC`. Defaults to `DISABLED`."
709715
type = string

cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,13 @@ resource "google_container_cluster" "primary" {
198198

199199
in_transit_encryption_config = var.in_transit_encryption_config
200200

201+
dynamic "network_performance_config" {
202+
for_each = var.total_egress_bandwidth_tier != null ? [1] : []
203+
content {
204+
total_egress_bandwidth_tier = var.total_egress_bandwidth_tier
205+
}
206+
}
207+
201208
dynamic "secret_manager_config" {
202209
for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
203210
content {

metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,9 @@ spec:
408408
timeouts:
409409
name: timeouts
410410
title: Timeouts
411+
total_egress_bandwidth_tier:
412+
name: total_egress_bandwidth_tier
413+
title: Total Egress Bandwidth Tier
411414
upstream_nameservers:
412415
name: upstream_nameservers
413416
title: Upstream Nameservers

metadata.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,9 @@ spec:
545545
- name: in_transit_encryption_config
546546
description: Defines the config of in-transit encryption. Valid values are `IN_TRANSIT_ENCRYPTION_DISABLED` and `IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT`.
547547
varType: string
548+
- name: total_egress_bandwidth_tier
549+
description: Specifies the total network bandwidth tier for NodePools in the cluster. Valid values are `TIER_UNSPECIFIED` and `TIER_1`. Defaults to `TIER_UNSPECIFIED`.
550+
varType: string
548551
- name: security_posture_mode
549552
description: Security posture mode. Accepted values are `DISABLED` and `BASIC`. Defaults to `DISABLED`.
550553
varType: string

modules/beta-autopilot-private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ Then perform the following commands on the root folder:
162162
| stateful\_ha | Whether the Stateful HA Addon is enabled for this cluster. | `bool` | `false` | no |
163163
| subnetwork | The subnetwork to host the cluster in (required) | `string` | n/a | yes |
164164
| timeouts | Timeout for cluster operations. | `map(string)` | `{}` | no |
165+
| total\_egress\_bandwidth\_tier | Specifies the total network bandwidth tier for NodePools in the cluster. Valid values are `TIER_UNSPECIFIED` and `TIER_1`. Defaults to `TIER_UNSPECIFIED`. | `string` | `null` | no |
165166
| workload\_config\_audit\_mode | (beta) Sets which mode of auditing should be used for the cluster's workloads. Accepted values are DISABLED, BASIC. | `string` | `"DISABLED"` | no |
166167
| workload\_vulnerability\_mode | (beta) Sets which mode to use for Protect workload vulnerability scanning feature. Accepted values are DISABLED, BASIC. | `string` | `""` | no |
167168
| zones | The zones to host the cluster in (optional if regional cluster / required if zonal) | `list(string)` | `[]` | no |

modules/beta-autopilot-private-cluster/cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ resource "google_container_cluster" "primary" {
118118

119119
in_transit_encryption_config = var.in_transit_encryption_config
120120

121+
dynamic "network_performance_config" {
122+
for_each = var.total_egress_bandwidth_tier != null ? [1] : []
123+
content {
124+
total_egress_bandwidth_tier = var.total_egress_bandwidth_tier
125+
}
126+
}
127+
121128
dynamic "secret_manager_config" {
122129
for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
123130
content {

modules/beta-autopilot-private-cluster/metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,9 @@ spec:
307307
timeouts:
308308
name: timeouts
309309
title: Timeouts
310+
total_egress_bandwidth_tier:
311+
name: total_egress_bandwidth_tier
312+
title: Total Egress Bandwidth Tier
310313
workload_config_audit_mode:
311314
name: workload_config_audit_mode
312315
title: Workload Config Audit Mode

modules/beta-autopilot-private-cluster/metadata.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,9 @@ spec:
380380
- name: in_transit_encryption_config
381381
description: Defines the config of in-transit encryption. Valid values are `IN_TRANSIT_ENCRYPTION_DISABLED` and `IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT`.
382382
varType: string
383+
- name: total_egress_bandwidth_tier
384+
description: Specifies the total network bandwidth tier for NodePools in the cluster. Valid values are `TIER_UNSPECIFIED` and `TIER_1`. Defaults to `TIER_UNSPECIFIED`.
385+
varType: string
383386
- name: security_posture_mode
384387
description: Security posture mode. Accepted values are `DISABLED` and `BASIC`. Defaults to `DISABLED`.
385388
varType: string

0 commit comments

Comments
 (0)