-
Notifications
You must be signed in to change notification settings - Fork 107
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
'uid' property is not included in datasource provisioning #229
Comments
This becomes more and more urgent with grafana 9.0, as the dashboard json no longer contains a property like
but instead something like
As grafana keeps adding the datasource to ervery graph, this now requires a lot of editing of the exported json tom replace the old code with the new one, as grafana tends to add the dashboards default data source to every single query now. And recently (9.0.7) grafana became quite creative in replacing the string with an array like
So, being able to set the uid explicitly and later reference that UID in a dashboard would make things a lot easier |
Property defaults are removed from the type and where values are needed on datasource creation, the defaults are in the provider. If updating an existing datasource, only properties that you want to manage have to be specified. The API needs the post to contain several more fields, but these can be pulled from the existing state. `uid` is added as an optional property and, (in versions that support it), is used when updating a datasource, (instead of updating by `id` which has been deprecated.) Fetching and deleting datasources by `id` has also been deprecated in Grafana 9 so is replaced by fetching and deleting by `name`. The managing of multiple datasources is now quicker as the previous implementation made a number of API calls that grew exponentially with the number of datasources. Fixes voxpupuli#229 For users not using `basic_auth` or `password` properties in their datasources restores idempotency when using Grafana 9 (see voxpupuli#289) (From Grafana 9 onwards, users must use `secure_json_data` but this is not idempotent and making it behave 100% correctly is currently impossible as the Grafana API purposefully never exposes this data.) There are still a number of issues open around using datasources in more than one organization. None of these have been addressed in this commit.
Property defaults are removed from the type and where values are needed on datasource creation, the defaults are in the provider. If updating an existing datasource, only properties that you want to manage have to be specified. The API needs the post to contain several more fields, but these can be pulled from the existing state. `uid` is added as an optional property and, (in versions that support it), is used when updating a datasource, (instead of updating by `id` which has been deprecated.) Fetching and deleting datasources by `id` has also been deprecated in Grafana 9 so is replaced by fetching and deleting by `name`. The managing of multiple datasources is now quicker as the previous implementation made a number of API calls that grew exponentially with the number of datasources. Fixes voxpupuli#229 For users not using `basic_auth` or `password` properties in their datasources restores idempotency when using Grafana 9 (see voxpupuli#289) (From Grafana 9 onwards, users must use `secure_json_data` but this is not idempotent and making it behave 100% correctly is currently impossible as the Grafana API purposefully never exposes this data.) There are still a number of issues open around using datasources in more than one organization. None of these have been addressed in this commit.
Property defaults are removed from the type and where values are needed on datasource creation, the defaults are in the provider. If updating an existing datasource, only properties that you want to manage have to be specified. The API needs the post to contain several more fields, but these can be pulled from the existing state. `uid` is added as an optional property and, (in versions that support it), is used when updating a datasource, (instead of updating by `id` which has been deprecated.) Fetching and deleting datasources by `id` has also been deprecated in Grafana 9 so is replaced by fetching and deleting by `name`. The managing of multiple datasources is now quicker as the previous implementation made a number of API calls that grew exponentially with the number of datasources. Fixes voxpupuli#229 For users not using `basic_auth` or `password` properties in their datasources restores idempotency when using Grafana 9 (see voxpupuli#289) (From Grafana 9 onwards, users must use `secure_json_data` but this is not idempotent and making it behave 100% correctly is currently impossible as the Grafana API purposefully never exposes this data.) There are still a number of issues open around using datasources in more than one organization. None of these have been addressed in this commit.
Property defaults are removed from the type and where values are needed on datasource creation, the defaults are in the provider. If updating an existing datasource, only properties that you want to manage have to be specified. The API needs the post to contain several more fields, but these can be pulled from the existing state. `uid` is added as an optional property and, (in versions that support it), is used when updating a datasource, (instead of updating by `id` which has been deprecated.) Fetching and deleting datasources by `id` has also been deprecated in Grafana 9 so is replaced by fetching and deleting by `name`. The managing of multiple datasources is now quicker as the previous implementation made a number of API calls that grew exponentially with the number of datasources. Fixes voxpupuli#229 For users not using `basic_auth` or `password` properties in their datasources restores idempotency when using Grafana 9 (see voxpupuli#289) (From Grafana 9 onwards, users must use `secure_json_data` but this is not idempotent and making it behave 100% correctly is currently impossible as the Grafana API purposefully never exposes this data.) There are still a number of issues open around using datasources in more than one organization. None of these have been addressed in this commit.
Property defaults are removed from the type and where values are needed on datasource creation, the defaults are in the provider. If updating an existing datasource, only properties that you want to manage have to be specified. The API needs the post to contain several more fields, but these can be pulled from the existing state. `uid` is added as an optional property and, (in versions that support it), is used when updating a datasource, (instead of updating by `id` which has been deprecated.) Fetching and deleting datasources by `id` has also been deprecated in Grafana 9 so is replaced by fetching and deleting by `name`. The managing of multiple datasources is now quicker as the previous implementation made a number of API calls that grew exponentially with the number of datasources. Fixes voxpupuli#229 For users not using `basic_auth` or `password` properties in their datasources restores idempotency when using Grafana 9 (see voxpupuli#289) (From Grafana 9 onwards, users must use `secure_json_data` but this is not idempotent and making it behave 100% correctly is currently impossible as the Grafana API purposefully never exposes this data.) There are still a number of issues open around using datasources in more than one organization. None of these have been addressed in this commit.
Property defaults are removed from the type and where values are needed on datasource creation, the defaults are in the provider. If updating an existing datasource, only properties that you want to manage have to be specified. The API needs the post to contain several more fields, but these can be pulled from the existing state. `uid` is added as an optional property and, (in versions that support it), is used when updating a datasource, (instead of updating by `id` which has been deprecated.) Fetching and deleting datasources by `id` has also been deprecated in Grafana 9 so is replaced by fetching and deleting by `name`. The managing of multiple datasources is now quicker as the previous implementation made a number of API calls that grew exponentially with the number of datasources. Fixes voxpupuli#229 For users not using `basic_auth` or `password` properties in their datasources restores idempotency when using Grafana 9 (see voxpupuli#289) (From Grafana 9 onwards, users must use `secure_json_data` but this is not idempotent and making it behave 100% correctly is currently impossible as the Grafana API purposefully never exposes this data.) There are still a number of issues open around using datasources in more than one organization. None of these have been addressed in this commit.
Property defaults are removed from the type and where values are needed on datasource creation, the defaults are in the provider. If updating an existing datasource, only properties that you want to manage have to be specified. The API needs the post to contain several more fields, but these can be pulled from the existing state. `uid` is added as an optional property and, (in versions that support it), is used when updating a datasource, (instead of updating by `id` which has been deprecated.) Fetching and deleting datasources by `id` has also been deprecated in Grafana 9 so is replaced by fetching and deleting by `name`. The managing of multiple datasources is now quicker as the previous implementation made a number of API calls that grew exponentially with the number of datasources. Fixes voxpupuli#229 For users not using `basic_auth` or `password` properties in their datasources restores idempotency when using Grafana 9 (see voxpupuli#289) (From Grafana 9 onwards, users must use `secure_json_data` but this is not idempotent and making it behave 100% correctly is currently impossible as the Grafana API purposefully never exposes this data.) There are still a number of issues open around using datasources in more than one organization. None of these have been addressed in this commit.
Affected Puppet, Ruby, OS and module versions/distributions
latest
How to reproduce (e.g Puppet code you use)
What are you seeing
Not the right uid being configured in Grafana for that datasource.
What behaviour did you expect instead
The datasource being provisioned with the right uid
Output log
Any additional information you'd like to impart
The Grafana documentation for provisioning a datasource includes a 'uid' property to be configured:
https://grafana.com/docs/grafana/latest/administration/provisioning/
The
grafana_datasource
resource is currently not open for configuring that 'uid' property, could that be added?The text was updated successfully, but these errors were encountered: