Closed mestuddtc closed 2 years ago
We should add the profile argument to that command. You can get around this issue by running:
AWS_PROFILE=second terraform init
AWS_PROFILE=second terraform apply
I experienced this same error too, I'm going to throw spaghetti at the wall with a proposed fix and see if it sticks.
This should be fixed now, closing.
It's working for me now. Thanks!
Summary
I am following the EKS on AWS setup instructions to evaluate jenkinsx. I have multiple aws profiles across multiple aws accounts. I set the correct profile to use in the infrastructure repo variables. Running
terraform apply
fails with an error.Steps to reproduce the behavior
~/.aws/credentials
with "default" profile in one account and "second" profile in a different account.default = "second"
for "profile" variable in variables.tfterraform init && terraform apply
Expected behavior
Terraform commands complete successfully.
Actual behavior
Terraform fails with error:
Running
aws eks update-kubeconfig --name tf-jx-capital-sunfish --region=us-east-1 --profile second
succeeds.Terraform version
The output of
terraform version
is:Module version
1.15.37
Operating system
MacOS