awsu icon indicating copy to clipboard operation
awsu copied to clipboard

Implement merge of config and credentials file

Open suxor42 opened this issue 5 years ago • 2 comments

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 avatar Mar 03 '20 20:03 suxor42

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 avatar Mar 15 '20 16:03 yawn

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

yawn avatar Mar 16 '20 09:03 yawn