From 215727ffc39775bbbec3a0ac4b756bb509cdd58c Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Thu, 20 Jun 2024 18:26:55 -0700 Subject: [PATCH] Working example --- examples/dashboard/main.go | 40 +++++--------------------------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/examples/dashboard/main.go b/examples/dashboard/main.go index 64cf3fc8d..d65867150 100644 --- a/examples/dashboard/main.go +++ b/examples/dashboard/main.go @@ -455,11 +455,6 @@ func main() { return err } - powerpack, err := datadog.NewPowerpack(ctx, "powerpack", &datadog.PowerpackArgs{}) - if err != nil { - return err - } - _, err = datadog.NewDashboard(ctx, "free_dashboard", &datadog.DashboardArgs{ Title: pulumi.String("Free Layout Dashboard"), Description: pulumi.String("Created using the Datadog provider in Terraform"), @@ -756,36 +751,11 @@ func main() { }, }, }, - }, - &datadog.DashboardWidgetArgs{ - PowerpackDefinition: &datadog.DashboardWidgetPowerpackDefinitionArgs{ - PowerpackId: powerpack.ID(), - BackgroundColor: pulumi.String("blue"), - BannerImg: pulumi.String("https://example.org/example.png"), - ShowTitle: pulumi.Bool(true), - Title: pulumi.String("Powerpack Widget"), - TemplateVariables: &datadog.DashboardWidgetPowerpackDefinitionTemplateVariablesArgs{ - ControlledExternallies: datadog.DashboardWidgetPowerpackDefinitionTemplateVariablesControlledExternallyArray{ - &datadog.DashboardWidgetPowerpackDefinitionTemplateVariablesControlledExternallyArgs{ - Name: pulumi.String("var_2"), - Values: pulumi.StringArray{ - pulumi.String("autoscaling"), - }, - Prefix: pulumi.String("service_name"), - }, - }, - ControlledByPowerpacks: datadog.DashboardWidgetPowerpackDefinitionTemplateVariablesControlledByPowerpackArray{ - &datadog.DashboardWidgetPowerpackDefinitionTemplateVariablesControlledByPowerpackArgs{ - Name: pulumi.String("var_3"), - Prefix: pulumi.String("timeframe"), - Values: pulumi.StringArray{ - pulumi.String("default"), - pulumi.String("values"), - pulumi.String("here"), - }, - }, - }, - }, + WidgetLayout: &datadog.DashboardWidgetWidgetLayoutArgs{ + Height: pulumi.Int(16), + Width: pulumi.Int(28), + X: pulumi.Int(0), + Y: pulumi.Int(83), }, }, },