A Concourse resource for interacting with Consul's KV store.
concourse-consul-kv-resource
can be used to get or set a key in Consul's KV store.
key
: Required. The Consul key to interact with. Note that all URL path parts following/v1/kv
are required. For example, if your key ismy-consul:8500/v1/kv/my/key
, thenkey
should be "my/key".host
: Required. The Consul host.token
: Required. A Consul ACL token.tls_cert
: Required. A TLS cert for the Consul.tls_key
: Required. A TLS cert key for the Consul.port
: Optional. The port on which the Consul API is hosted. Defaults to8500
.protocol
: Optional. The protocol to use in calling the Consul API. Defaults tohttps
.skip_cert_check
: Optional. Check the validity of the SSL cert.
Gets the value of the Consul KV key configured in the source.
Sets the Consul KV key configured in the source to the value specified in the params.
value
or file
must be set. Both cannot be set.
value
: Optional. The value to set the key to.file
: Optional. The path to a file in which the intended value is written.
resources:
- name: my-consul-key
type: consul-kv
source:
token: my-acl-token
host: my-consul.com
tls_cert: my-cert-string
tls_key: my-cert-key-string
key: my/key
resource_types:
- name: consul-kv
type: docker-image
source:
repository: clapclapexcitement/concourse-consul-kv-resource
tag: latest
jobs:
- name: set-my-consul-key
plan:
- put: my-consul-key
params:
value: 'foobar'
- name: set-my-consul-key-from-a-file
plan:
- put: my-consul-key
params:
file: my-new-key/my-key-file