lewispeckover / consulator

Import and synchronize your Consul KV data from JSON and YAML
MIT License
32 stars 13 forks source link

Export support? #8

Closed prologic closed 5 years ago

prologic commented 5 years ago

Would you consider the addition of an "export" feature and associated command? The idea basically to mirror the import facility. Take the contents of Consul and export it as either JSON or YAML.

I'm hesitant to make sync a 3-way sync; but if you are open to the above we can explore that layer or just make this a "user problem" to deal with.

lewispeckover commented 5 years ago

Hmm, would it add anything over the native consul kv export?

prologic commented 5 years ago

Hmm tbh I didn't see that consul had consul kv import and consul kv export :D

I have to ask then... What is the purpose of this tool consulator -- Just to handle YAML representation?

prologic commented 5 years ago

Import and synchronize your Consul KV data from JSON and YAML

It seems the native consul kv import|export already does this well for JSON right?

lewispeckover commented 5 years ago

If you simply want to back up and restore then the native import/export will indeed do the trick. This tool was created to let you work with a more logical & user-friendly representation of the data.

prologic commented 5 years ago

This tool was created to let you work with a more logical & user-friendly representation of the data

That's precisely how/why I came across this. I want import/export -- But I also want it in a form that's:

JSON is "okay" but it gets a bit tedious when you have large quantities of it.

prologic commented 5 years ago

So after playing around with various tools to ingest data into Consul, yq, yj and consul itself I realise consulator doesn't need an export at all :) Turns out that consul kv import doesn't quite import plain 'ol JSON -- So I need to use your nicely written consulator anyway :)