You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a new EKS cluster plan fails with error - cluster.tf line 94, in resource "aws_security_group_rule" "cluster_private_access_cidrs_source"
#1573
Closed
nielsvz opened this issue
Sep 6, 2021
· 4 comments
When creating a new EKS cluster, Terraform plan fails with the following error:
Error: Invalid for_each argument
on .terraform/modules/mdt-eks.eks/cluster.tf line 94, in resource "aws_security_group_rule" "cluster_private_access_cidrs_source":
94: for_each = var.create_eks && var.cluster_create_endpoint_private_access_sg_rule && var.cluster_endpoint_private_access && var.cluster_endpoint_private_access_cidrs != null ? toset(var.cluster_endpoint_private_access_cidrs) : []
│────────────────
│ var.cluster_create_endpoint_private_access_sg_rule is true
│ var.cluster_endpoint_private_access is true
│ var.cluster_endpoint_private_access_cidrs is list of string with 1 element
│ var.create_eks is true
Sensitive values, or values derived from sensitive values, cannot be used
as for_each arguments. If used, the sensitive value could be exposed as a
resource instance key.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
When creating a new EKS cluster, Terraform plan fails with the following error:
Versions
eks v17.14.0
Reproduction
Steps to reproduce the behaviour:
Not using workspaces, tried creating a new EKS cluster without any existing state/cache
Expected behavior
terraform plan succeeds without errors as with the previous module version we were using (eks v17.8.0)
Actual behavior
terraform plan fails with the error indicated in the description
Additional context
Possibly related to #1549 and release v17.14.0
The text was updated successfully, but these errors were encountered: