Skip to content

Commit

Permalink
Working example
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Jun 21, 2024
1 parent f5776dd commit 215727f
Showing 1 changed file with 5 additions and 35 deletions.
40 changes: 5 additions & 35 deletions examples/dashboard/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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),
},
},
},
Expand Down

0 comments on commit 215727f

Please sign in to comment.