leapp icon indicating copy to clipboard operation
leapp copied to clipboard

Import existing config

Open bboure opened this issue 3 years ago • 7 comments

I just found out about Leapp and I absolutely love it already!! Awesome work!

As a new user, I would have loved if Leapp had imported automatically my old ~/.aws/credentials profiles. I have a dozen profiles and it can be tedious to import them all manually.

I only see one caveat to this: the credentials file does not include the required Account Number field, but I guess that an import/onboarding step could easily ask for it and it would be a matter of filling that one missing filed only.

bboure avatar Apr 04 '21 09:04 bboure

Thanks for the kind word! Nice first issue! Can be a good first issue!

andreacavagna01 avatar Apr 04 '21 13:04 andreacavagna01

I will try to find some time and have a crack at it.

bboure avatar Apr 04 '21 13:04 bboure

This could be interesting to replicate in the go engine and probably a good first issue too

pethron avatar Apr 04 '21 16:04 pethron

Thanks @bboure for the enhancement proposal!

I think we can extract account info as described in the following link: https://docs.aws.amazon.com/cli/latest/reference/sts/get-access-key-info.html

As @pethron said, this logic is easily replicable in leapp-daemon.

ericvilla avatar Apr 04 '21 18:04 ericvilla

+1, it would be fantastic to import from my existing credentials file during the first-time 'backup' process.

jcogilvie avatar Aug 31 '21 18:08 jcogilvie

It's especially valuable if we could reuse the existing credentials and config files.

ntkach avatar Oct 27 '21 14:10 ntkach

As I explain in #260, the ~/.aws/credentials is a shared file and I do not think it should be a source of information to import into Leapp, at least not by default or without prompting. Other credentials managers besides Leapp also use this file to store short-lived credentials that would be counter-productive to include in Leapp. Leapp should perhaps offer to import existing configuration from ~/.aws/config, but, as I detailed here, a lot of what is in the config file also should not be imported into Leapp, so care is needed on any import process.

I fully support adding some kind of configuration file specific to Leapp so its configuration can be exported, modified, and imported. Perhaps having a step that collects existing AWS SDK configuration, converts it into a Leapp configuration file, and then offers to import that (with instructions to the user to review and edit it first) would be appropriate. (An automated filter to remove any profiles that have source_profile settings would help.)

Nuru avatar Apr 20 '22 17:04 Nuru