Skip to content

Commit 3f50fce

Browse files
committed
When compute_mode is provided, also configure elastic_load_balancing and storage_config
1 parent bdce021 commit 3f50fce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ resource "aws_eks_cluster" "this" {
5858
}
5959

6060
dynamic "compute_config" {
61-
for_each = var.compute_config != null ? [var.compute_config] : []
61+
for_each = var.compute_config[*]
6262

6363
content {
6464
enabled = compute_config.value.enabled
@@ -81,7 +81,7 @@ resource "aws_eks_cluster" "this" {
8181

8282
content {
8383
dynamic "elastic_load_balancing" {
84-
for_each = local.auto_mode_enabled ? [1] : []
84+
for_each = var.compute_config[*]
8585

8686
content {
8787
enabled = local.auto_mode_enabled
@@ -148,7 +148,7 @@ resource "aws_eks_cluster" "this" {
148148
}
149149

150150
dynamic "storage_config" {
151-
for_each = local.auto_mode_enabled ? [1] : []
151+
for_each = var.compute_config[*]
152152

153153
content {
154154
block_storage {

0 commit comments

Comments
 (0)