You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
looks like the problem is when using aws_profile in the Vagrantfile. when setting up aws configure, mine did not come out as profile nonprod but rather just nonprod so I'm forced to put my Access Key & Access Key ID instead which I can't do for security reasons.
rather than making new aws configs just so this plugin works, I think this section should be changed
# determine section in config ini fileifprofile == 'default'ini_profile=profileelseini_profile='profile ' + profileend# get info from config ini file for selected profiledata=File.read(aws_config)doc_cfg=IniParse.parse(data)
possibly to:
# get info from config ini file for selected profiledata=File.read(aws_config)doc_cfg=IniParse.parse(data)# determine section in config ini fileifprofile == 'default' || !doc_cfg[profile].nil?ini_profile=profileelseini_profile='profile ' + profileend
OR
# determine section in config ini fileifprofile == 'default'ini_profile=profileelseini_profile='profile ' + profileend# get info from config ini file for selected profiledata=File.read(aws_config)doc_cfg=IniParse.parse(data)aws_region=doc_cfg[ini_profile]['region']# determine section in credentials ini fileini_profile=profile# get info from credentials ini file for selected profiledata=File.read(aws_creds)doc_cfg=IniParse.parse(data)aws_id=doc_cfg[ini_profile]['aws_access_key_id']aws_secret=doc_cfg[ini_profile]['aws_secret_access_key']aws_token=doc_cfg[ini_profile]['aws_session_token']
to:
# determine section in credentials ini fileini_profile=profile# get info from credentials ini file for selected profiledata=File.read(aws_creds)doc_cfg=IniParse.parse(data)aws_region=doc_cfg[ini_profile]['region']aws_id=doc_cfg[ini_profile]['aws_access_key_id']aws_secret=doc_cfg[ini_profile]['aws_secret_access_key']aws_token=doc_cfg[ini_profile]['aws_session_token']
not sure which would work better, but both fix my issue.
The text was updated successfully, but these errors were encountered:
I hit on this issue as well. The code in question is reading the aws config file (~/.aws/config), not the credentials file, to read the default region. In that file, each profile is indeed prefixed with the string "profile" except for the "default" profile. e.g.
[default]
region = us-east-1
[profile prod]
region = us-west-1
If the code does not find such a section, it barfs.
To fix this, add a config section in ~/.aws/config with a region for the profile being used.
So this should not be a blocker for anyone in production or test.
Not sure what the code "fix" would be for this - hardcode a default aws region I suppose? Or perhaps don't set a default region and let aws assume the default?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
looks like the problem is when using
aws_profile
in the Vagrantfile. when setting up aws configure, mine did not come out asprofile nonprod
but rather justnonprod
so I'm forced to put my Access Key & Access Key ID instead which I can't do for security reasons.rather than making new aws configs just so this plugin works, I think this section should be changed
possibly to:
OR
to:
not sure which would work better, but both fix my issue.
The text was updated successfully, but these errors were encountered: