Spinning up an EKS cluster - Inconsistent conditional result types
Using terraform 1.1.0 and service-catalog v0.68.8: ``` │ Error: Inconsistent conditional result types │ │ on .terraform/modules/eks.eks_workers.self_managed_workers/modules/eks-cluster-workers/main.tf line 336, in locals: │ 335: length(data.aws_iam_role.existing) > 0 │ 336: ? data.aws_iam_role.existing[0] │ 337: : ( │ 338: length(aws_iam_role.eks_worker) > 0 │ 339: ? aws_iam_role.eks_worker[0] │ 340: : null │ 341: ) │ ├──────────────── │ │ aws_iam_role.eks_worker is a list of object, known only after apply │ │ aws_iam_role.eks_worker[0] is a object, known only after apply │ │ data.aws_iam_role.existing is a list of object, known only after apply │ │ data.aws_iam_role.existing[0] is a object, known only after apply │ │ The true and false result expressions must have consistent types. The given │ expressions are object and object, respectively. ╵ ERRO[0051] 1 error occurred: * exit status 1 ``` Is there something I should be passing in to declare there isn't an existing cluster? It looks like these should get picked up by checking for roles and workers, but it doesn't seem to be happening.
This is a regression in Terraform `v1.1.0`. Upgrading to Terraform `>=1.1.1` should fix this.