I am working on creating some widgets of DD using CDKTF Datadog GO provider. I am not able to create a group widget using the struct DashboardWidgetGroupDefinition. If I add the slice of objects with this struct then it is not working however normal widgets work. Can anyone help me on this?
This is the core code for dashboard with DashboardWidgetGroupDefinition:
datadog.NewDashboard(stack, jsii.String("TerraformTest"), &datadog.DashboardConfig{
Title: jsii.String("Terraform Test Dashboard with Group"),
LayoutType: jsii.String("ordered"),
Widget: []datadog.DashboardWidgetGroupDefinition{
{
LayoutType: jsii.String("ordered"),
Title: jsii.String("CDKTF Group Widget"),
Widget: []datadog.DashboardWidget{testWidget},
},
},
})
This is how the widget Definition looks like:
widget := datadog.DashboardWidgetTimeseriesDefinition{
Title: jsii.String("Testing"),
Request: []datadog.DashboardWidgetTimeseriesDefinitionRequest{
{
Q: jsii.String("query"),
DisplayType: jsii.String("line"),
},
},
Event: []datadog.DashboardWidgetTimeseriesDefinitionEvent{
{
Q: jsii.String("query"),
},
},
}
testWidget := datadog.DashboardWidget{}
testWidget.TimeseriesDefinition = &widget
above code results into blank list of Widgets