Comments (4)
Hey @yorinasub17 I have problem using aws_profile with aws provider:
provider "aws" { access_key = var.aws_access_key secret_key = var.aws_secret_key region = var.aws_region profile = var.aws_profile }
During apply, I see these errors and finally it times out:
module.eks_cluster.null_resource.wait_for_api (local-exec): time="2020-04-28T13:01:12-05:00" level=warning msg="Error retrieving cluster info Error finding AWS credentials. Did you set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables or configure an AWS profile? Underlying error: NoCredentialProviders: no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors" name=kubergrunt
Is this because profile is now allowed while using kubergrunt/terraform-aws-eks module?
from kubergrunt.
kubergrunt
doesn't use the credentials from the aws profile (because it is an external binrary), and instead relies on the environment. AFAIK, this feature (sharing authentication between scripts and provider) is not possible without using environment variables because terraform does not export the credentials generated from the provider config.
If you want to use aws profiles, the recommended way is to use the environment variable AWS_PROFILE
. E.g., AWS_PROFILE=dev terraform apply
This comes from the recommended practice of decoupling the credentials from your config by using external tooling such as aws-vault
or the credentials profile and provide them as environment variables. This is mentioned in https://blog.gruntwork.io/a-comprehensive-guide-to-authenticating-to-aws-on-the-command-line-63656a686799 .
from kubergrunt.
The there multiple use-case with AWS profiles (~/.aws/config, ~/.aws/credentials). If you are using ~/.aws/config
you need:
AWS_SDK_LOAD_CONFIG=1
AWS_PROFILE=<your profile>
....
kubergrunt ...
from kubergrunt.
I was using AWS profiles ($HOME/.aws/config, $HOME/.aws/credentials
) for quite some time and I was also using AWS_SDK_LOAD_CONFIG=1
and AWS_PROFILE=<my profile>
.
After changing terraform backend repository to S3 suddenly it stop working. I was able to make it work again using environment variables (export AWS_SECRET_ACCESS_KEY=xxxxx; export AWS_ACCESS_KEY_ID=yyyyyy
).
Since for me was not ideal I was able to revert the changes to use AWS profiles again but I had to remove . terraform
folder and run terraform init
again
Not sure if it can help in this case.
from kubergrunt.
Related Issues (20)
- Add debug logs if kubergrunt cannot access Kubernetes cluster HOT 1
- Add support for 1.25 and drop support of 1.21
- Document a list of kubergrunt versions compatible with k8s versions
- Support for new regions: ECR repo HOT 1
- Update dependencies in kubergrunt
- eks 1.26 support for kubergrunt
- EKS has released k8s 1.27 support. Update kubergrunt to support it and remove 1.22
- MacOS issue with signing key
- Update kubergrunt ver in readme
- About the latest release HOT 2
- kubergrunt EKS 1.24 core components are not up to date
- kubergrunt eks deploy - unrecognized loadbalancer annotation
- Add support for EKS 1.28
- Kubergrunt eks sync-core-components Error-message. Code: TOO_MANY_EKS_BUILD_TAGS HOT 2
- Error deploying coredns v1.9.0-eksbuild.7 in EKS Fargate HOT 2
- CoreDNS on Fargate stuck in pending state
- Add Support for EKS 1.29
- Error Code: TOO_MANY_EKS_BUILD_TAGS HOT 8
- Add Kubergrunt Version Support Table to Docs
- Update TestFindLatestEKSBuilds/eks/* Version Check Tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubergrunt.