https://pulumi.com logo
Title
a

adventurous-lighter-33507

02/03/2021, 5:33 PM
I am attempting to create a New Relic One Dashboard with the provider that was released a little bit ago. Here is my code:
import { OneDashboard, OneDashboardArgs } from "@pulumi/newrelic";
import { OneDashboardPage } from "@pulumi/newrelic/types/input";
import { CustomResourceOptions } from "@pulumi/pulumi";

const page1: OneDashboardPage = {
  name: "page1",
};

const oneDashArgs: OneDashboardArgs = {
  name: "sample dashboard",
  pages: [page1],
};
const oneDashOptions: CustomResourceOptions = {};

const oneDash = new OneDashboard("my-one-dashboard", oneDashArgs, oneDashOptions);
I get this error:
error: Argument "dashboard" has invalid value $dashboard.
    In field "pages": Expected type "[DashboardPageInput!]!", found [{name: "page1"}].
    In element #1: Expected type "DashboardPageInput", found {name: "page1"}.
    In field "widgets": Expected type "[DashboardWidgetInput!]!", found null.
It seems like there may be a mismatch between the New Relic One GraphQL API and the provider. Am I doing something wrong?
👀 1
c

cool-fireman-90027

02/05/2021, 9:19 PM
This should get you past that error.
a

adventurous-lighter-33507

02/08/2021, 8:41 PM
thank, i will give that a try