Stolonctl with Consul - 403

Morning all,

I’m trying to use stolonctl with consul, targetting a consul agent and every time I try to get any data (eg. stolonctl clusterdata read) I get

cannot get cluster data: Unexpected response code: 403

Which I assume is because it’s not authing correctly and thus the key(s) are not available.

Currently my env is as follows (redacted the sensitive parts)

STOLONCTL_CLUSTER_NAME=foo
STOLONCTL_STORE_BACKEND=consul
STOLONCTL_STORE_KEY=/consul-cli-key.pem
STOLONCTL_STORE_ENDPOINTS=https://10.0.0.1:8501
STOLONCTL_STORE_SKIP_TLS_VERIFY=true
STOLONCTL_STORE_CERT_FILE=/consul-cli-cert.pem

and the keys were generated from Consul via. consul tls cert create -client (I also tried -cli).

I’ve also tried --log-level debug but this doesn’t increase the verbosity or the error message.

Any ideas?

Turns out it still needed the CONSUL_HTTP_TOKEN which is a consul env var, not stolonctl. Colour me confused.