motns / configstore Goto Github PK
View Code? Open in Web Editor NEWNative command line application for storing values in a JSON file database
License: MIT License
Native command line application for storing values in a JSON file database
License: MIT License
As secret values can not be set in the override.json it seems possible to set secret values at the top level then overriding them with non-secret values seems possible (ie. the tool allows it). However when trying to access the subenvironment with get
or process_templates
gives the error:
trying to override key with secret value: key_name
The error would seem to be misleading as I am not overriding the key with a secret, but actually the opposite.
It would be useful to override secret to non-secret to allow creating a sub-environment without secrets, but similar in all other respects to the base env, without having to create a complete new environment.
Currently if the decryption for a specific value fails while loading all values, or processing a template, no context is provided as to which key caused the error. We should use the error wrapping support in Go to provide this context:
https://play.golang.org/p/nqNrM8qOvST
It would be useful to be able to view a tree structure of the envs and sub envs within a given structure.
Although there is a tree command, this shows the keys & values. In a complex environment with multiple top level envrironments and various sub environments it would be good to see how these are laid out.
Currently the only workaround is running something like
find /path/to/config/env -type d
When running configstore package test
with a syntax error in the json the file or sub-environment containing the syntax error is not printed. Only the parent sub-env is printed
Sample output:
Comparing keys for "./config/env/top1/configstore.json" and "./config/env/top2/configstore.json"
Checking sub-environments for env: stag
Checking sub-environment: top1/env1
Checking sub-environment: top1/env2
Checking sub-environment: top1/env3
Checking sub-environment: top1/env4
invalid character ',' after object key
The last line would suggest that there is an error in the top1/env4 sub environment. However, the the error in this case actually in one of many sub environments within env4. eg. top1/env4/subenv6
The command configstore package create <env_name> requires option --master-key or --insecure, and fails with the following message if not found:
Creating environment: prod
you have to specify --master-key if --insecure is not set
Howerver running it again with the correct option also fails as the directory has already been created, but is empty:
Creating environment: prod
environment already exists: prod
Therefore the directory needs to be manually deleted from the tree before proceeding
It would be great if there was a functionality that allows to copy values from one environment to another.
For example, we defined two environments prod
and disaster_recovery
. Both of them are encrypted using different KMS keys. We could have a command that takes values from prod
and copies them over to disaster_recovery
. Values in the latter one need to be decrypted and encrypted for the new environment.
What's more, it would be great if optionally:
The functionality is very useful when one environment is "based" on another.
There is a Python script that does that called; it's called confy and can be found here. Though, I was wondering if we could implement that to Configstore.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.