Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables in data source provisioning files don't work with boolean properties #442

Closed
floushee opened this issue Aug 8, 2022 · 1 comment · Fixed by grafana/grafana#63085
Assignees
Labels

Comments

@floushee
Copy link

floushee commented Aug 8, 2022

What happened:
We use the adx plugin in multiple deployments. Sometimes we want to have on behalf of authentication and sometimes we don't. As we use Docker containers for the deployments we use env variables to inject settings into Grafana and its plugins as it is described here.

When we do that with the adx plugin, e.g:

datasources:
  - name: ...
    ...
    jsonData:
      clusterUrl: ...
      tenantId: ...
      clientId: ...
      onBehalfOf: $ADX_ON_BEHALF_OF
      oauthPassThru: $ADX_OAUTH_PASS_THRU

We get the following error messages:
"could not unmarshal DatasourceSettings json: json: cannot unmarshal string into Go struct field DatasourceSettings.oauthPassThru of type bool"

What you expected to happen:
We would expect that setting the env variables to true would enable the on behalf of authentication whereas false would disable it.

How to reproduce it (as minimally and precisely as possible):
Just configure the two env variables and set the value to either true or false.

  • Grafana version: 9.0.5
  • Plugin version: 4.1.3
@floushee floushee added datasource/ADX type/bug Something isn't working labels Aug 8, 2022
@aangelisc
Copy link
Contributor

Hi @floushee, thanks for reporting this! I'm currently investigating and will let you know if I need more information 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
2 participants