-
Notifications
You must be signed in to change notification settings - Fork 236
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
Add public dashboards support #1026
Conversation
In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically. To do so, a Grafana Labs employee must promote the Drone build. For maintainers, it's better to run only the Cloud tests you need, rather than all of them. You can do so by setting the following parameter when promoting:
|
} | ||
|
||
func CreatePublicDashboard(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { | ||
client := meta.(*common.Client).GrafanaAPI |
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.
Is this an org-scoped or instance-scoped resource? If it's org-scoped, you'll need to add the org_id
attribute and handle it
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 is an instance-scoped resource but It has an orgId
associated because it has a foreign key to a dashboard which PK is uid + orgId
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.
Then in that case, you'll probably need to add the org_id attribute (see dashboard for example) and instantiate an org-specific client (see dashboard again for example)
Otherwise, this won't support dashboards in any org other than the default one
An additional test that checks that you this new resource works in an org might be nice too!
LGTM, but I'd say we can't merge until 10.2.0 is actually available: https://grafana.com/grafana/download. Right now, the tests aren't running in CI |
Great, I will wait until 10.2.0 is released. Thanks @julienduchesne ! |
Turned it back to draft until Grafana 10.2 is released |
@julienduchesne Grafana 10.2 was released last week. We can merge this PR now. |
5ccfbd7
to
ad7ee1f
Compare
Related golang client PR
Fixes: grafana/grafana#74594