mantl / consul-cli

Command line interface to Consul HTTP API
Apache License 2.0
251 stars 67 forks source link

Allow ACL import from JSON #48

Open dictvm opened 7 years ago

dictvm commented 7 years ago

ACL rules are pretty complex to write by hand - though maybe I'm just doing it wrong. So far I have not found a tool that makes it easy to create ACL rules. It would be useful if consul admins could simply write rules in prettified JSON, save them to a file and import it using a syntax similar the that being used to import key/value entries:

key/value: consul-cli kv create --json kv.json acl: consul-cli acl create --json acl-rules.json

This way, admins could pull a list of all ACLs, save them to a JSON file and import them again using the same tooling:

consul-cli acl list >> acl-rules.json