Open keyvaann opened 9 months ago
Which version of aws-cli
have you installed? Try upgrading to a more recent version and see if that helps.
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
Updated my aws-cli
version to 2.14.5 and getting the same error. I'm using Terraform v1.6.5.
Another thing is we assume the users have got enough permissions before applying the template. Can you check if your IAM user/role has got eks:DescribeCluster
and eks:UpdateClusterConfig
? I can see your cluster was created and does the following run successfully?
aws eks --region <region> update-kubeconfig --name <eks-cluster-name>
Yes that command runs successfully and I'm admin in the AWS account so access probably isn't an issue.
Here are the versions installed on my machine and hope they will help to narrow down the problem on your side:
Terraform v1.4.2
+ provider registry.terraform.io/hashicorp/aws v5.0.1
+ provider registry.terraform.io/hashicorp/cloudinit v2.3.3
+ provider registry.terraform.io/hashicorp/kubernetes v2.24.0
+ provider registry.terraform.io/hashicorp/time v0.9.2
+ provider registry.terraform.io/hashicorp/tls v4.0.5
I have tested both Terraform v1.5.7 and v1.6.5 and there were no errors. I think it is time for your site to check the API logs on AWS CloudTrail. Feel free to share any redacted logs here.
Terraform v1.5.7
+ provider registry.terraform.io/hashicorp/aws v5.0.1
+ provider registry.terraform.io/hashicorp/cloudinit v2.3.3
+ provider registry.terraform.io/hashicorp/kubernetes v2.24.0
+ provider registry.terraform.io/hashicorp/time v0.10.0
+ provider registry.terraform.io/hashicorp/tls v4.0.5
Terraform v1.6.5
+ provider registry.terraform.io/hashicorp/aws v5.0.1
+ provider registry.terraform.io/hashicorp/cloudinit v2.3.3
+ provider registry.terraform.io/hashicorp/kubernetes v2.24.0
+ provider registry.terraform.io/hashicorp/time v0.10.0
+ provider registry.terraform.io/hashicorp/tls v4.0.5
Here are my versions:
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v5.0.1
+ provider registry.terraform.io/hashicorp/cloudinit v2.3.3
+ provider registry.terraform.io/hashicorp/kubernetes v2.24.0
+ provider registry.terraform.io/hashicorp/time v0.9.2
+ provider registry.terraform.io/hashicorp/tls v4.0.5
According to terraform-aws-modules/terraform-aws-eks#2009, looks like this issue happens when you have multiple profiles in your AWS config. Adding a profile setting helped to resolve the issue, will make a PR later.
Oh cool. That's why I think using env vars of AWS_*
s is more explicit than using profiles.
My confession on losing track of the issue. Looks like this can be closed following your update on README? @keyvaann
I think #13 needs to be merged for this issue to be fixed.
Alright, can you please rebase and test it on your site? Happy to get it merged and clear this issue.
I can't do that at the moment since I'm busy with a few projects, hopefully in a couple of weeks I'll have the time for it.
Running
terraform apply
in the cluster directory fails with this error message:Upon rerunning
terraform apply
it appears that it's failing to create this resource: