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

Implement merge of config and credentials file #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

suxor42
Copy link

@suxor42 suxor42 commented Mar 3, 2020

Loading the profile data from the config and credentials files
will new merge the data of the two files. The data in the second
file is preferred. This means in the current load order that the
credentials file will overwrite configuration in the config
file.

Test data and test was added for this case.

@suxor42 suxor42 requested a review from yawn March 3, 2020 20:22
@suxor42 suxor42 force-pushed the merge_config_and_credentials branch 3 times, most recently from 515c850 to d4df47f Compare March 3, 2020 20:32
Loading the profile data from the config and credentials files
will new merge the data of the two files. The data in the second
file is preferred. This means in the current load order that the
credentials file will overwrite configuration in the config
file.

Test data and test was added for this case.
@suxor42 suxor42 force-pushed the merge_config_and_credentials branch from d4df47f to f04d3ba Compare March 3, 2020 20:37
@yawn
Copy link
Contributor

yawn commented Mar 15, 2020

Hm. Looking at #43, re-reading the CLI documentation references there and having a look at the entries of my now de-symlinked config (specifically the SSO entries) I've come to the conclusion that awsu should actually NOT merge anything.

Instead it should just look at ~/.aws/credentials. WDYT @suxor42 & @cybercyst? Does this match your configuration expectations? I seems my local config is/was pretty much an outlier / using old conventions.

@yawn
Copy link
Contributor

yawn commented Mar 16, 2020

After a bit of discussion the approach that would be most suitable seems to be indeed:

  1. read first config, then credentials and merge them field-by-field
  2. drop profile from config with a special case for default

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.

2 participants