mifi / cognito-backup

CLI for backing up AWS Cogntito User Pools
MIT License
154 stars 26 forks source link

More detailed restore logging #32

Closed jakub-qg closed 1 year ago

jakub-qg commented 1 year ago

Hello,

Thanks for creating such a useful tool!

I have a usecase I'd like to implement however I want to start a discussion before I make a pull request.

I need to cross-reference old and new user identities (sub). I'd like the tool to output something like:

User created oldSub":"xxx" newSub: "yyy"

for each restored user.

Now, I understand other people may want different output formats, fields, etc. hence I'd like to introduce templating (most likely with handlebars).

The CLI would work like so:

cognito-backup restore-users pool_id "Abcd.1234" --file users.json --out-template "{{source.Attributes.sub}} {{response.Attributes.sub}}"
mifi commented 1 year ago

Hi. Il not sure how the out-template argument would work but maybe we can just add a console log? Enabled by a verbose flag

jakub-qg commented 1 year ago

Hey,

My guess is everyone's needs will be different and I wanted to avoid adding something that's very specific to my use case so I figured templating would be a great way to be somewhat flexible.

Having said that I'm fine with a console.log if you are!