Conversation
|
In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically. |
02dd357 to
5b2990b
Compare
Flattens the existing configuration block by removing the unused `logs_disabled` field and only allowing toggling alerts
mariaalons
left a comment
There was a problem hiding this comment.
Nice work! Test it locally works as expected 👏
Left only two comments that are related
internal/resources/cloudintegrations/resource_cloud_integration.go
Outdated
Show resolved
Hide resolved
…ntegration.go and resource.go
…ns-client' into dasomeone/feat/gcloud-integrations-client
| for i, dashboard := range dashboardsResponse.Data { | ||
| err = c.CreateDashboard(ctx, dashboard, folderUID) | ||
| if err != nil { | ||
| _ = c.DeleteFolder(ctx, folderUID) |
There was a problem hiding this comment.
if this folder pre-existed before installlation, deleting it here on dashboard failure would destroy data. we may want to track whether the folder was newly created vs already present before deciding to delete on rollback
There was a problem hiding this comment.
This is on purpose to mirror the exact behaviour taken by Grafana Cloud Integrations. These folders will be, hopefully, created as readonly in the future.
What is this PR and why do we need it?
This PR introduces a new
grafana_cloud_integrationsprovider to perform simple management of Grafana Cloud IntegrationsCloud Integrations a bit of an anti-pattern currently, as the API doesn't manage much of the actual lifecycle, and so control and configuration options are a bit more limited than normally expected.
Either way, this PR introduces this new provider based on the newer Plugin Framework, and supports the following operations:
please note, this provider does not supply an update/upgrade functionality as Cloud Integrations are "updated" by a reinstall to ensure getting a clean set of dashboards and alerts
Unit tests have been added for some internals, alongside client interaction tests.
Heavily inspired by original work in this direction by @clementduveau in #2191 (thank you! 🙏)
CC: @aditya-konarde @mariaalons @Alex3k