-
Notifications
You must be signed in to change notification settings - Fork 272
Grafana Cloud Integrations #2191
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
base: main
Are you sure you want to change the base?
Conversation
|
Solves #1917 |
|
Since it's been a while, I just want to add some documentation around how it works, otherwise I will forget. When someone wants to install the integration, they click on the "Install dashboard and alerts" button. The chain of action:
So the client is the one doing most of the installation. This terraform ressources does that the same way. When uninstalling, it's pretty much the same thing, but instead of getting the JSON, it just removes the folder with the dashboards and call the endpoint to disable & remove alerts. |
| * folders:read | ||
| * folders:write | ||
| * dashboards:read | ||
| * dashboards:write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also installing alerts and rules isn't it?
| @@ -0,0 +1,371 @@ | |||
| package integrations | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the other clients in internal/common. Could you move it?
| // PostDashboards posts dashboards for an integration with the given configuration | ||
| func (c *Client) PostDashboards(ctx context.Context, slug string, config *InstallationConfig) (*GetDashboardsResponse, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the integrations API is doing that.
|
Thanks @jeschkies for reminding me this exists! @clementduveau this is an interesting one, and it's related to work that we're picking up that may affect this. With the rollout of Grafana Managed Alerts this will extend to alerts/rules as well, so we'll need to touch base on what all is needed and desired here in order to get all that added in :) |
Hello there 👋
This is a "simple" implementation of Grafana Cloud Integrations in the Terraform provider.
Integrations don't have an OpenAPI specs (because they rely on the webclient to create the dashboards, it's a mix), nor they have a client (AFAIK). So the client relies on direct API calls for the "easy start" part.
What works and have been tested:
What I didn't test or even tried:
What could be improved
always-try-updateto consider than the resource needs a change, forcing the upgrade.EDIT: tested more things