runtheops / ssm-diff

A human-friendly way of managing parameters in AWS SSM
MIT License
46 stars 25 forks source link

Root Path Config #11

Open ambsw-technology opened 5 years ago

ambsw-technology commented 5 years ago

Any thoughts on adding a root path configuration? For example, I may only want to extract /Prod/Service/<service>/ to a YAML for revision and then push it back up.

We've been storing non-secret client params (we dedicated instances for security reasons) in separate YAML files. I've been pulling my hair out trying to figure out how to get the client-level bulk edit experience on SSM, but this project is perfect -- i.e. keep doing it the same way.

For import (and ongoing management and not pulling unnecessary secrets to disk), I really prefer to work with a subset of the tree at once (a single client or service). It'd be nice if I could pull just that branch. FWIW it could also make sense to allow me to filter that branch on a particular tag.

ambsw-technology commented 5 years ago

Maybe this is what -p does, but a flag is really dangerous. If I init -p /path/ and plan -p /path/ but forget the flag and apply, won't I delete a bunch of keys?

ambsw-technology commented 5 years ago

OK I see why the current behavior exists:

Even if you preserve the -p behavior, it would be OK to remove any paths shared by the two keys.

So I guess I need to revise my proposal: