Hello, if it can be useful I would like to report that the use of “-” character in the names of secrets is not allowed.
For example:
services:
telegraf:
container_name: telegraf
...
...
secrets:
- influxdb2-telegraf
environment:
- INFLUXDB_ORG=${INFLUXDB_ORG}
- INFLUXDB_BUCKET=${TELEGRAF_BUCKET}
restart: unless-stopped
secrets:
influxdb2-telegraf:
environment: TELEGRAF_TOKEN
The file /run/secrets/influxdb2-telegraf
is created and its content is correct but telegraf fails to authenticate to influxdb2. If the name is changed to influxdb2_telegraf
there are no problems.
However, with the image of InfluxDB2 there are no problems, “-” can be used in the names of the secrets.