This ticket is a feature request to make it possible that you could enable a flag on this widget that configures the drilldown_dashboard_id with the id of the current dashboard.
Create a new dashboard in New Relic insights, creates widgets on that dashboard and if you click on an item of such a widget New Relic will open the linked dashboard and filter on that item.
But often you do not want to open another dashboard but just filter the other widgets on the same dashboard but for that to work you need to pass the widget the dashboardid of the dashboard itself
1.12.10 of TF
1.11.0 of NR provider
Try to create a dashboard with widgets that try to drill down on the dashboard itself.
resource "newrelic_dashboard" "printer" {
title = "test"
icon = "pie-chart"
visibility = "all"
editable = "editable_by_all"
widget {
title = "Print]"
visualization = "facet_pie_chart"
nrql = "SELECT uniqueCount(id) FROM FEED"
row = 1
column = 1
drilldown_dashboard_id = newrelic_dashboard.printer.id
}
This however doesn't work as this is a _Self-referential block_.
For my own information, what would this do? It looks like terraform as a self notion for providers, but not for resources. I wonder if a data source would also solve this. Then you could refer to the dashboard by its data source, which would be fetched in a separate call, and not self-referential.
A datasource wouldn't fix this as for a datasource the object already needs to exists while the idea is that the defined resource creates the object.
What this would do:
Create a new dashboard in New Relic insights, creates widgets on that dashboard and if you click on an item of such a widget New Relic will open the linked dashboard and filter on that item.
But often you do not want to open another dashboard but just filter the other widgets on the same dashboard but for that to work you need to pass the widget the dashboardid of the dashboard itself.
I've run into this as well. I am trying to create a New Relic dashboard that filters by facet, as documented in https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/filter-new-relic-one-dashboards-facets
That is to say, I want to create a widget inside the dashboard that would filter in the current dashboard, as here:
![]()
I am running into this under:
Terraform v0.12.28
provider.newrelic v2.7.1
@danifitz expressed interest in this feature as well for a customer.
Facing the same issue. We are trying to keep all dashboard in terraform but such limitations make it impossible.
What does "rev:high" mean, please? I saw @jpvajda added this label.
@atsalolikhin-spokeo It's just a label to specify the impact a particular issue has on our customer base.
Thanks @jpvajda ! May I ask what "rev" stands for?
@atsalolikhin-spokeo I changed it im: not rev: to be more clear. Thanks for the feedback!
@jpvajda don't laugh but what does "im" mean? Is that short for "impact"?
@atsalolikhin-spokeo No worries on the questions, we like clarity in our backlogs, I just changed it to impact
@jpvajda Great! Thank you very much. 馃憤 That's super clear. I appreciate it.
The newrelic_dashboard resource will soon be deprecated in favor of newrelic_one_dashboard, which already supports linking via the linked_entity_guids argument on a widget. To filter the current dashboard, you'd add the dashboard GUID to linked_entity_guids.
@jthurman42 Okay. It would be nice to be able say "current dashboard" for the GUID without having to hardcode the GUID. (Basically what this issue is all about.) Do we need to do something to request this feature in newrelic_one_dashboard rather than in newrelic_dashboard? Or is this issue sufficient? :)
@atsalolikhin-spokeo Agreed that would be a nice enhancement. Since this issue is over a year old and reported on the 1.x version of the provide, I'm going to close it in favor of a specific issue for the newrelic_one_dashboard resource.
I've created #1193 to track this going forward.
Most helpful comment
The
newrelic_dashboardresource will soon be deprecated in favor ofnewrelic_one_dashboard, which already supports linking via the linked_entity_guids argument on a widget. To filter the current dashboard, you'd add the dashboard GUID tolinked_entity_guids.