It seems like something has changed in AWS, preventing us from creating both ECR and EKS resources in the same Terraform file.
To overcome this issue, I've separated these tasks. First, we create the EKS cluster and the associated IAM role. After that, we retrieve this role and then create the ECR repository.
It seems like something has changed in AWS, preventing us from creating both ECR and EKS resources in the same Terraform file.
To overcome this issue, I've separated these tasks. First, we create the EKS cluster and the associated IAM role. After that, we retrieve this role and then create the ECR repository.
Additionally, I have upgraded the Terraform version to address this issue: https://github.com/hashicorp/terraform/issues/34114. I also upgraded the versions of the providers and modules.