-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Le Gall, Benoit edited this page Oct 7, 2025
·
7 revisions
Alternative to git2consul which is not maintained anymore.
Concept: give a tool to easily push content in Consul KV to be used as distributed configurations
-
consul.uri: Consul URI. (Will be taken overhostandport) -
consul.host: Consul host. Defaults to localhost (Required ifurinot set) -
consul.port: Consul port. Defaults to 8500 (Required ifurinot set) -
consul.secured: Set whether Consul is secured. Defaults to false (Optional) -
consul.acl-token: ACL token needed to read and write in KV path. When present, will be added to requests using?tokenquery parameter (Optional) -
consul.dc: Consul datacenter name. When present, will be added to requests using?dcquery parameter (Optional) -
consul.timeout: Amount of time (in milliseconds) for requests (Optional) -
consul.kv.prefix: Prefix for the KV path where the configuration is stored. Defaults to config (Required) -
consul.kv.version: Version of the configuration. When present, will be used in the KV path (Optional)
- All arguments have to be passed in the format
--{property} - All properties but sensitive are logged in INFO at start of execution
- There is an additional argument
--dry-runthat will not run the import
so point 2 & 3 can be used to debug
If you need to use environment (Micronaut) or profile (Spring), you will have to name your KV according to the
format: {key},{environment} like explained in the following table
| Key path | Description |
|---|---|
| /config/application | Configuration shared by all applications |
| /config/application,XXX | Configuration shared by all applications for the XXX Environment/Profile |
| /config/[APPLICATION_NAME] | Application-specific configuration, example /config/hello-world |
| /config/[APPLICATION_NAME],XXX | Application-specific configuration for the XXX Environment/Profile |
For more details, read Micronaut#HashiCorp Consul Support - Storing Configuration as Key/Value Pairs