-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced Storage Classes #19
Open
ambsw-technology
wants to merge
13
commits into
runtheops:master
Choose a base branch
from
ambsw:storage-improvements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…, and better encapsulate behaviors (among other things to simplify testing)
…lified/standardized the interface (i.e. `configure`, `merge`, `plan`, and `__init__`)
claytondaley
force-pushed
the
storage-improvements
branch
2 times, most recently
from
May 1, 2019 22:12
8968375
to
7614275
Compare
…nd line flags to ENV variables (fixes runtheops#15), (2) a way to generate YAML files for branches of the SSM tree (closes runtheops#11), (3) the ability to ignore SecureString keys if they are not necessary (closes runtheops#13), (4) support for the SSM StringList type and more timely type coercion so e.g. YAML integers and SSM strings match, and (5) the introduction of metadata in the YAML files to permit compatibility checking (more general fix for runtheops#15 with support for new features)
claytondaley
force-pushed
the
storage-improvements
branch
from
May 1, 2019 22:57
7614275
to
d01c7dc
Compare
…` class to simplify inserts (both backwards-compatible to the `SecureTag`. For safer backups, an `AWS_NO_DECRYPT` (i.e. kwarg `no_decrypt`) was added. README was updated and the CLI commands were fully converted to `git` style names.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is built on #18 (for easy merging) but is mostly unrelated. It introduces a variety of improvements to the storage engines (i.e.
YAMLFile
andParamterStore
) with related changes to the CLI experience:YAMLFile
accepts aroot_path
kwarg (default=/
, env variableSSM_YAML_ROOT
). The root of the YAML file will be equivalent to this path in the Parameter Store when reading and writing (closes Root Path Config #11).ParameterStore
accepts ano_secure
kwarg (default=False, env variableSSM_NO_SECURE
). If true, it will not request secure parameters from ParameterStore (closes Ignore Encrypted Entries #13)ParameterStore
coerces basic types (e.g.int
,float
,NoneType
) so a YAML integer and SSM string are recognized as a match if they're otherwise equal.ParameterStore
now supports theStringList
type (i.e. a list of strings) and is more aggressive about type checking.-p
flag has been converted to the env variableSSM_PATHS
to increase safety (resolves Replace -p with ENV Variable #15). The env variable accepts:
and;
as separators (the kwarg expects atuple
/list
/set
).However, the more significant improvement is the introduction of metadata in the YAML files. YAML files now store the
root_path
,paths
andno_secure
settings used to generate them. If a subsequent command attempts to use the file with incompatible configurations, it will throw an exception.This is a more general solution to my concerns in #15. It can be extended to cover all relevant parameters, whether used through the CLI or programmatically. For example, it prevents the following sequence of events:
However, it's smart enough to permit subsets of the original scope:
P.S. This PR may contain small fixes to previous PRs.
EDIT: Encapsulated the type checking and coercion in
ParameterStore
. I had originally implemented it in the DiffResolver, but realized thatParameterStore
is really the limiting factor here. In theory, you could use theDiffResolver
with a less restrictive endpoint (Azure? Vault? AWS Secrets?) and might want different coercion and type checking.