Skip to content

Commit cba6023

Browse files
committed
remove unnecessary foreach for gateway-api channel
1 parent c5a3518 commit cba6023

File tree

10 files changed

+20
-60
lines changed

10 files changed

+20
-60
lines changed

autogen/main/cluster.tf.tmpl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,8 @@ resource "google_container_cluster" "primary" {
5454
}
5555
}
5656

57-
dynamic "gateway_api_config" {
58-
for_each = local.gateway_api_channel
59-
60-
content {
61-
channel = gateway_api_channel.value
62-
}
57+
gateway_api_config {
58+
channel = gateway_api_channel.value
6359
}
6460

6561
dynamic "cost_management_config" {

cluster.tf

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,8 @@ resource "google_container_cluster" "primary" {
4848
}
4949
}
5050

51-
dynamic "gateway_api_config" {
52-
for_each = local.gateway_api_channel
53-
54-
content {
55-
channel = gateway_api_channel.value
56-
}
51+
gateway_api_config {
52+
channel = gateway_api_channel.value
5753
}
5854

5955
dynamic "cost_management_config" {

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,8 @@ resource "google_container_cluster" "primary" {
4040
}
4141
}
4242

43-
dynamic "gateway_api_config" {
44-
for_each = local.gateway_api_channel
45-
46-
content {
47-
channel = gateway_api_channel.value
48-
}
43+
gateway_api_config {
44+
channel = gateway_api_channel.value
4945
}
5046

5147
dynamic "cost_management_config" {

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,8 @@ resource "google_container_cluster" "primary" {
4040
}
4141
}
4242

43-
dynamic "gateway_api_config" {
44-
for_each = local.gateway_api_channel
45-
46-
content {
47-
channel = gateway_api_channel.value
48-
}
43+
gateway_api_config {
44+
channel = gateway_api_channel.value
4945
}
5046

5147
dynamic "cost_management_config" {

modules/beta-private-cluster-update-variant/cluster.tf

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,8 @@ resource "google_container_cluster" "primary" {
4848
}
4949
}
5050

51-
dynamic "gateway_api_config" {
52-
for_each = local.gateway_api_channel
53-
54-
content {
55-
channel = gateway_api_channel.value
56-
}
51+
gateway_api_config {
52+
channel = gateway_api_channel.value
5753
}
5854

5955
dynamic "cost_management_config" {

modules/beta-private-cluster/cluster.tf

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,8 @@ resource "google_container_cluster" "primary" {
4848
}
4949
}
5050

51-
dynamic "gateway_api_config" {
52-
for_each = local.gateway_api_channel
53-
54-
content {
55-
channel = gateway_api_channel.value
56-
}
51+
gateway_api_config {
52+
channel = gateway_api_channel.value
5753
}
5854

5955
dynamic "cost_management_config" {

modules/beta-public-cluster-update-variant/cluster.tf

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,8 @@ resource "google_container_cluster" "primary" {
4848
}
4949
}
5050

51-
dynamic "gateway_api_config" {
52-
for_each = local.gateway_api_channel
53-
54-
content {
55-
channel = gateway_api_channel.value
56-
}
51+
gateway_api_config {
52+
channel = gateway_api_channel.value
5753
}
5854

5955
dynamic "cost_management_config" {

modules/beta-public-cluster/cluster.tf

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,8 @@ resource "google_container_cluster" "primary" {
4848
}
4949
}
5050

51-
dynamic "gateway_api_config" {
52-
for_each = local.gateway_api_channel
53-
54-
content {
55-
channel = gateway_api_channel.value
56-
}
51+
gateway_api_config {
52+
channel = gateway_api_channel.value
5753
}
5854

5955
dynamic "cost_management_config" {

modules/private-cluster-update-variant/cluster.tf

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,8 @@ resource "google_container_cluster" "primary" {
4848
}
4949
}
5050

51-
dynamic "gateway_api_config" {
52-
for_each = local.gateway_api_channel
53-
54-
content {
55-
channel = gateway_api_channel.value
56-
}
51+
gateway_api_config {
52+
channel = gateway_api_channel.value
5753
}
5854

5955
dynamic "cost_management_config" {

modules/private-cluster/cluster.tf

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,8 @@ resource "google_container_cluster" "primary" {
4848
}
4949
}
5050

51-
dynamic "gateway_api_config" {
52-
for_each = local.gateway_api_channel
53-
54-
content {
55-
channel = gateway_api_channel.value
56-
}
51+
gateway_api_config {
52+
channel = gateway_api_channel.value
5753
}
5854

5955
dynamic "cost_management_config" {

0 commit comments

Comments
 (0)