feat: use declarative influxdb token for grafana

This commit is contained in:
oddlama 2023-08-16 22:41:20 +02:00
parent 36e3348b37
commit 0ed8f2041d
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
2 changed files with 13 additions and 1 deletions

View file

@ -23,11 +23,23 @@ in {
};
age.secrets.grafana-influxdb-token = {
rekeyFile = config.node.secretsDir + "/grafana-influxdb-token.age";
generator.script = "alnum";
generator.tags = ["influxdb"];
mode = "440";
group = "grafana";
};
nodes.ward-influxdb.services.influxdb2.provision.ensureApiTokens = [
{
name = "grafana servers:telegraf (${config.node.name})";
org = "servers";
user = "admin";
readBuckets = ["telegraf"];
writeBuckets = ["telegraf"];
tokenFile = config.age.secrets.grafana-influxdb-token.path;
}
];
nodes.sentinel = {
age.secrets.loki-basic-auth-hashes.generator.dependencies = [
config.age.secrets.grafana-loki-basic-auth-password