Comments (2)
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?
from ssm-diff.
OK I see why the current behavior exists:
-p
accepts multiple paths.- To avoid key collisions, full paths must be retained.
- If two of the
-p
paths had the same key, they would collide. - Keeping the parent key won't help either since
-p a/b/c
and-p b/c
would also collide.
- If two of the
Even if you preserve the -p
behavior, it would be OK to remove any paths shared by the two keys.
- Let's assume you add an environment variable
ROOT_PATH=a/b
. - It would be valid to call
-p a/b/c
, returning a YAML with only thec
key (and any nested values) - It would be invalid (need to error) to call
-p x/y/z
since they are not contained in theROOT_PATH
- It would also be valid to call
-p a/b/c -p a/b/z/c
. The resulting file would includec
andz/c
in the root (plus any nested values). It would exclude a key likea/b/z/d
per the-p
behavior.
So I guess I need to revise my proposal:
- Support an ENV variable (e.g.
ROOT_PATH
). These paths are excluded from the YAML file during generation and the YAML file is nested at this path during update.- For example, if the SSM structure can be represented by a
dict
like{a: b: c: {d: da, e: ea}}}
and youinit
withROOT_PATH=a/b/c
, this would produce the YAML:d: da e: ea
- For example, if the SSM structure can be represented by a
- The
-p
flag is retained. It can still filter keys within theROOT_PATH
- If
-p
is not specifiedROOT_PATH
implicitly limits the search to the same path (i.e. like adding-p $ROOT_PATH
) - If both are present, all values for the
-p
flag must be children ofROOT_PATH
(or an error will be thrown)
- If
from ssm-diff.
Related Issues (16)
- YAML Export Templates HOT 2
- Ignore Encrypted Entries HOT 1
- Add git-like alias
- Replace -p with ENV Variable HOT 1
- Improved concurrency handling in `pull` HOT 2
- Change top-level package name
- Support description HOT 1
- It Fails if user has access to specific path
- ssm-diff errors when pulling a numerical only value from parameter store
- Typeerror within states/helpers.py on init HOT 1
- Feature request: add a flag for merging local changes to remote, instead of sync-ing
- AttributeError with newer Python version
- Document the AWS_DEFAULT_REGION trick HOT 1
- Issue executing ssm-diff init HOT 3
- Integers defined break ssm-diff HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ssm-diff.