Skip to content

Commit

Permalink
fix(dashboard): add multi account support for nrql query in dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
vagrawal-newrelic committed Dec 11, 2024
1 parent 63ba336 commit 8b74a15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/utils/terraform/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type DashboardWidgetFacet struct {
}

type DashboardWidgetNRQLQuery struct {
AccountID int `json:"accountId"`
AccountID []int `json:"accountIds"`
Query string `json:"query"`
}

Expand Down Expand Up @@ -170,7 +170,7 @@ func GenerateDashboardHCL(resourceLabel string, shiftWidth int, input []byte) (s

for _, q := range config.NRQLQueries {
h.WriteBlock("nrql_query", []string{}, func() {
h.WriteIntAttributeIfNotZero("account_id", q.AccountID)
h.WriteIntArrayAttribute("account_ids", q.AccountID)
h.WriteMultilineStringAttribute("query", q.Query)
})
}
Expand Down

0 comments on commit 8b74a15

Please sign in to comment.