Skip to content

OneDashboard resource widgetPies property throws an error  #175

@MitchellGerdisch

Description

@MitchellGerdisch

The newrelic OneDashboard resource allows one to create pages and widgets on those pages.
There are various such widgets (e.g. Line widgets and Pie widgets).
The Pie widgets is throwing this error:
error: newrelic:index/oneDashboard:OneDashboard resource 'my-onedashboard' has a problem: page.0: invalid or unknown key: widget_pies
It appears that the terraform bridge is not singularizing the parameter correctly.
However other parameters (e.g. widgetLines) work fine.

The following code can be used to reproduce the issue.
The code includes the problematic widgetPies example as well as a commented out widgetLines example.

Code to reproduce:

import * as newrelic from "@pulumi/newrelic";
import { accountId } from "@pulumi/newrelic/config";

const dashboard = new newrelic.OneDashboard("my-onedashboard", {
  name: "my-stats", 
  permissions: "public_read_only",
  pages: [{
            name: "my-stats", 
            widgetMarkdowns: [{title: "Dashboard Notes", row: 1, column: 9, text: "### Helpful Links\n\n* [New Relic One](https://one.newrelic.com)\n* [Developer Portal](https://developer.newrelic.com)"}],
            widgetPies: [{
              title: "Some Average Response Time",
              row: 1,
              column: 1,
              nrqlQueries: [{
                accountId: Number(accountId),
                query: "SELECT average(duration * 1000) AS 'Response time' FROM Transaction TIMESERIES SINCE 1800 seconds ago EXTRAPOLATE"
              }]
            }]
            
            // widgetLines: [{
            //   title: "${nameBase} Average Response Time",
            //   row: 1,
            //   column: 1,
            //   nrqlQueries: [{
            //     accountId: Number(accountId),
            //     query: "SELECT average(duration * 1000) AS 'Response time' FROM Transaction TIMESERIES SINCE 1800 seconds ago EXTRAPOLATE"
            //   }]
            // }],
          }],
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSome behavior is incorrect or out of spec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions