Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

credentials_set?': undefined method access_key_id' for nil:NilClass (NoMethodError) #471

Open
RanjitRajput opened this issue Jun 19, 2019 · 2 comments

Comments

@RanjitRajput
Copy link

#terraforming sg --profile admin

Getting error "credentials_set?': undefined method access_key_id' for nil:NilClass (NoMethodError)" while trying to use terraforming.

My config and credentials files as below -

$ cat .aws/config
[default]
region = us-east-1

[profile admin]
region = us-east-1
role_arn = arn:aws:iam::AccountID:role/admin
source_profile = default

[profile readonly]
region = us-east-1
role_arn = arn:aws:iam::AccountID:role/readonly
source_profile = default

$ cat .aws/credentials
[default]
aws_access_key_id = Access key
aws_secret_access_key = Secret key

The same configuration is working fine in another account where I don't have any profile,only changing access key and secret key.

ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]

Tried terraforming sg --profile admin --assume arn:aws:iam::accountID:role/admin but getting same error.

aws cli working fine with these credentials.
aws iam list-users --profile admin

Is there any way to fix this ?

@fauzan-n
Copy link

fauzan-n commented Jan 8, 2020

me too

@djtecha
Copy link

djtecha commented Jun 12, 2020

I found if you use what's set in the source_profile part it works

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants