╷
│ Error: Invalid for_each argument
│
│ on .terraform/modules/eks_blueprints.aws_eks.kms/main.tf line 252, in resource "aws_kms_alias" "this":
│ 252: for_each = { for k, v in toset(var.aliases) : k => v if var.create }
│ ├────────────────
│ │ var.aliases is list of string with 1 element
│ │ var.create is false
│
│ 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.
╵
This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days
Description
I am trying to pull the cluster name from ssm parameter and pass name to blueprint. example:
⚠️ Note
Before you submit an issue, please perform the following first:
.terraform
directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/
terraform init
Versions
Module version [Required]:
Terraform version: v1.3.7
Provider version(s):
Reproduction Code [Required]
Steps to reproduce the behaviour:
Create SSM parameter with the name
/dev1/eks/cluster_name
Create Provider with following value:Create main.tf
Expected behaviour
Cluster name should be pulled from ssm parameter
Actual behaviour
Terminal Output Screenshot(s)
Additional context