zenml-io / mlstacks

A series of Terraform based recipes to provision popular MLOps stacks on the cloud.
https://mlstacks.zenml.io/
Apache License 2.0
245 stars 32 forks source link

Fix reference to empty eks resource when creating S3 #92

Closed wjayesh closed 9 months ago

wjayesh commented 10 months ago

The following error pops up if you create only an S3 bucket.

│ Error: Invalid index │ │ on eks.tf line 103, in resource "aws_iam_role" "ng": │ 103: Federated = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:oidc-provider/${aws_eks_cluster.cluster[0].identity[0].oidc[0].issuer}" │ ├──────────────── │ │ aws_eks_cluster.cluster is empty tuple │ │ The given key does not identify an element in this collection value: the collection has no │ elements.

This PR fixes it.