Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to collect region from aws_config_file for specified profile #620

Conversation

dheerajd-msys
Copy link
Contributor

@dheerajd-msys dheerajd-msys commented Nov 26, 2019

Signed-off-by: dheerajd-msys dheeraj.dubey@msystechnologies.com

Description

  • Per issue region was being set default i.e. us-east-1 from aws_config_file for specified profile
  • Handles collecting mentioned region from aws_config_file for particular profile

Issues Resolved

Fixes #614

Output Post Fix

PS E:\Backup\Project\Chef_Repo\knife-ec2> bundle exec knife ec2 server list --aws-profile dheeraj -VV 
DEBUG: Using AWS config file at C:/Users/chef/.aws/config
DEBUG: Using AWS credential file at C:/Users/chef/.aws/credentials
DEBUG: Using AWS profile dheeraj
DEBUG: Using AWS region us-west-2
DEBUG: Setting up AWS connection using aws_access_key_id xxxxxx aws_secret_access_key: xxxxxx aws_session_token:
Instance ID          Name  Public IP  Private IP    Flavor    Image                  SSH Key  Security Groups   State
i-03fbe44fe9b2fab80                   172.31.16.77  t2.micro  ami-0c5204531f799e0c6           launch-wizard-31  stopped
PS E:\Backup\Project\Chef_Repo\knife-ec2>

Check List

Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
@dheerajd-msys dheerajd-msys self-assigned this Nov 26, 2019
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
@dheerajd-msys dheerajd-msys changed the title [WIP]Fix to collect region from aws_config_file for specified profile Fix to collect region from aws_config_file for specified profile Dec 2, 2019
@dheerajd-msys dheerajd-msys requested a review from tas50 December 3, 2019 06:48
@tas50 tas50 merged commit e007048 into chef:master Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot find default region in AWS config file.
2 participants