Provisioning datasource using env variables conduct to GO error about variable types

Hello

Ubuntu 20.04.4 LTS
Grafana v9.0.1

I try to use an environment variable in a provisioning datasource file (yaml) to have flexibility on service Port configuration

I do this in the yaml file

jsonData:
host: 192.168.0.78
port: $MQTT_LOCAL_PORT

I get this

logger=context traceID=00000000000000000000000000000000 userId=1 orgId=1 uname=admin t=2022-06-24T10:27:57.13133916+02:00 level=error msg=“Query data error” error="failed to query data: Failed to query data: rpc error: code = Unknown desc = json: cannot unmarshal string into Go struct field Options.port of type uint16" remote_addr=172.18.0.1 traceID=00000000000000000000000000000000

The enthronement variable is well detected but its type is wrong … string instead of uint16 waited

Have you any idea how to cope with that issue?

thanks, have a good day.

Olivier

to be noted that following works


jsonData:
host: ${MQTT_LOCAL_HOST}
port: 1883