grafana / crossplane-provider-grafana

Crossplane provider of https://github.com/grafana/terraform-provider-grafana. Generated by https://github.com/upbound/upjet
Apache License 2.0
26 stars 14 forks source link

APIKey connection secret not usable for provider config #39

Closed blut closed 5 months ago

blut commented 1 year ago

Creating a API Key adds a connection secret with the following contents

attribute.key=ey...0=
instanceCredentials={"auth":"ey...0="}

When using instanceCredentials in another ProviderConfig, provider-grafana complains that "url" is unset.

The connection secret should create instanceCredentials with

attribute.key=ey...0=
instanceCredentials={"auth":"ey...0=","url":"https://..."}

Workaround is to set the env variable GRAFANA_URL for the provider-grafana deployment. However, this means one provider-grafana can only interact with one Grafana instance.

tchelovilar commented 11 months ago

Hi @blut ,

How are you setting the variable for the provider-grafana? Is it in the provider resource option for that or are you editing the generated deployment?

Thanks

blut commented 11 months ago

Hi @tchelovilar , at the moment I have the env variable set through the ControllerConfig, i.e. at the generated deployment level

julienduchesne commented 5 months ago

You should use a service account token now: https://github.com/grafana/crossplane-provider-grafana/blob/main/examples/cloud-stack-chain.yaml