From 95e77462d2879bc28edb272eff842b6bcb397500 Mon Sep 17 00:00:00 2001 From: Matt Miller <59583822+matt-miller-ddog@users.noreply.github.com> Date: Fri, 1 Sep 2023 11:13:39 -0400 Subject: [PATCH] [datadog_dashboard] Add support for sunburst widget request style (#2089) * Add 'style' to sunburst requests * Add style to test coverage * Drop RBAC properties from sunburst tests * Bump Go client to pull in new style property * 'make fmt' * Fix assert * Update cassettes * 'make docs' --- datadog/resource_datadog_dashboard.go | 19 +++++++++++++++ .../TestAccDatadogDashboardSunburst.freeze | 2 +- .../TestAccDatadogDashboardSunburst.yaml | 24 +++++++++---------- ...tAccDatadogDashboardSunburst_import.freeze | 2 +- ...estAccDatadogDashboardSunburst_import.yaml | 24 +++++++++---------- ...esource_datadog_dashboard_sunburst_test.go | 6 +++-- docs/resources/dashboard.md | 22 +++++++++++++++-- go.mod | 2 +- go.sum | 4 ++-- 9 files changed, 72 insertions(+), 33 deletions(-) diff --git a/datadog/resource_datadog_dashboard.go b/datadog/resource_datadog_dashboard.go index bda9c02fe..040403cf4 100644 --- a/datadog/resource_datadog_dashboard.go +++ b/datadog/resource_datadog_dashboard.go @@ -5926,6 +5926,16 @@ func getSunburstRequestSchema() map[string]*schema.Schema { // "query" and "formula" go together "query": getFormulaQuerySchema(), "formula": getFormulaSchema(), + // Settings specific to Sunburst requests + "style": { + Description: "Define style for the widget's request.", + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: getWidgetRequestStyle(), + }, + }, } } @@ -6070,6 +6080,11 @@ func buildDatadogSunburstRequests(terraformRequests *[]interface{}) *[]datadogV1 } datadogSunburstRequest.SetFormulas(formulas) } + if style, ok := terraformRequest["style"].([]interface{}); ok && len(style) > 0 { + if v, ok := style[0].(map[string]interface{}); ok && len(v) > 0 { + datadogSunburstRequest.Style = buildDatadogWidgetStyle(v) + } + } datadogRequests[i] = *datadogSunburstRequest } return &datadogRequests @@ -6109,6 +6124,10 @@ func buildTerraformSunburstRequests(datadogSunburstRequests *[]datadogV1.Sunburs if v, ok := datadogRequest.GetFormulasOk(); ok { terraformRequest["formula"] = buildTerraformFormula(v) } + if v, ok := datadogRequest.GetStyleOk(); ok { + style := buildTerraformWidgetStyle(*v) + terraformRequest["style"] = []map[string]interface{}{style} + } terraformRequests[i] = terraformRequest } return &terraformRequests diff --git a/datadog/tests/cassettes/TestAccDatadogDashboardSunburst.freeze b/datadog/tests/cassettes/TestAccDatadogDashboardSunburst.freeze index 86ba07249..6444638d1 100644 --- a/datadog/tests/cassettes/TestAccDatadogDashboardSunburst.freeze +++ b/datadog/tests/cassettes/TestAccDatadogDashboardSunburst.freeze @@ -1 +1 @@ -2023-04-20T11:11:39.486019-04:00 \ No newline at end of file +2023-08-31T13:02:55.221453-04:00 \ No newline at end of file diff --git a/datadog/tests/cassettes/TestAccDatadogDashboardSunburst.yaml b/datadog/tests/cassettes/TestAccDatadogDashboardSunburst.yaml index daa069946..300c3b7f4 100644 --- a/datadog/tests/cassettes/TestAccDatadogDashboardSunburst.yaml +++ b/datadog/tests/cassettes/TestAccDatadogDashboardSunburst.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"description":"Created using the Datadog provider in Terraform","id":"","is_read_only":true,"layout_type":"ordered","notify_list":[],"tags":[],"template_variable_presets":[],"template_variables":[],"title":"tf-TestAccDatadogDashboardSunburst-local-1682003499","widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar"}],"type":"sunburst"}},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"}},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst-local-1682003499","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"}}]}}]} + {"description":"Created using the Datadog provider in Terraform","id":"","layout_type":"ordered","notify_list":[],"tags":[],"template_variable_presets":[],"template_variables":[],"title":"tf-TestAccDatadogDashboardSunburst-local-1693501375","widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar","style":{"palette":"dog_classic"}}],"type":"sunburst"}},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"}},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst-local-1693501375","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"}}]}}]} form: {} headers: Accept: @@ -14,7 +14,7 @@ interactions: method: POST response: body: | - {"id":"aia-ikn-jng","title":"tf-TestAccDatadogDashboardSunburst-local-1682003499","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/aia-ikn-jng/tf-testaccdatadogdashboardsunburst-local-1682003499","is_read_only":true,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar"}],"type":"sunburst"},"id":2921021892712832},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":8092419862566682},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst-local-1682003499","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":553938127414477}]},"id":2707368200909357}],"notify_list":[],"created_at":"2023-04-20T15:11:41.281652+00:00","modified_at":"2023-04-20T15:11:41.281652+00:00","template_variable_presets":[],"tags":[]} + {"id":"cyy-h8s-qyg","title":"tf-TestAccDatadogDashboardSunburst-local-1693501375","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/cyy-h8s-qyg/tf-testaccdatadogdashboardsunburst-local-1693501375","is_read_only":false,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar","style":{"palette":"dog_classic"}}],"type":"sunburst"},"id":5299931556924856},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":952684438865742},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst-local-1693501375","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":1497433965060519}]},"id":6176650891167215}],"notify_list":[],"created_at":"2023-08-31T17:02:57.218781+00:00","modified_at":"2023-08-31T17:02:57.218781+00:00","template_variable_presets":[],"tags":[]} headers: Content-Type: - application/json @@ -27,11 +27,11 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/dashboard/aia-ikn-jng + url: https://api.datadoghq.com/api/v1/dashboard/cyy-h8s-qyg method: GET response: body: | - {"id":"aia-ikn-jng","title":"tf-TestAccDatadogDashboardSunburst-local-1682003499","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/aia-ikn-jng/tf-testaccdatadogdashboardsunburst-local-1682003499","is_read_only":true,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar"}],"type":"sunburst"},"id":2921021892712832},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":8092419862566682},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst-local-1682003499","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":553938127414477}]},"id":2707368200909357}],"notify_list":[],"created_at":"2023-04-20T15:11:41.281652+00:00","modified_at":"2023-04-20T15:11:41.281652+00:00","template_variable_presets":[],"tags":[]} + {"id":"cyy-h8s-qyg","title":"tf-TestAccDatadogDashboardSunburst-local-1693501375","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/cyy-h8s-qyg/tf-testaccdatadogdashboardsunburst-local-1693501375","is_read_only":false,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar","style":{"palette":"dog_classic"}}],"type":"sunburst"},"id":5299931556924856},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":952684438865742},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst-local-1693501375","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":1497433965060519}]},"id":6176650891167215}],"notify_list":[],"created_at":"2023-08-31T17:02:57.218781+00:00","modified_at":"2023-08-31T17:02:57.218781+00:00","template_variable_presets":[],"tags":[]} headers: Content-Type: - application/json @@ -44,11 +44,11 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/dashboard/aia-ikn-jng + url: https://api.datadoghq.com/api/v1/dashboard/cyy-h8s-qyg method: GET response: body: | - {"id":"aia-ikn-jng","title":"tf-TestAccDatadogDashboardSunburst-local-1682003499","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/aia-ikn-jng/tf-testaccdatadogdashboardsunburst-local-1682003499","is_read_only":true,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar"}],"type":"sunburst"},"id":2921021892712832},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":8092419862566682},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst-local-1682003499","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":553938127414477}]},"id":2707368200909357}],"notify_list":[],"created_at":"2023-04-20T15:11:41.281652+00:00","modified_at":"2023-04-20T15:11:41.281652+00:00","template_variable_presets":[],"tags":[]} + {"id":"cyy-h8s-qyg","title":"tf-TestAccDatadogDashboardSunburst-local-1693501375","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/cyy-h8s-qyg/tf-testaccdatadogdashboardsunburst-local-1693501375","is_read_only":false,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar","style":{"palette":"dog_classic"}}],"type":"sunburst"},"id":5299931556924856},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":952684438865742},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst-local-1693501375","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":1497433965060519}]},"id":6176650891167215}],"notify_list":[],"created_at":"2023-08-31T17:02:57.218781+00:00","modified_at":"2023-08-31T17:02:57.218781+00:00","template_variable_presets":[],"tags":[]} headers: Content-Type: - application/json @@ -61,11 +61,11 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/dashboard/aia-ikn-jng + url: https://api.datadoghq.com/api/v1/dashboard/cyy-h8s-qyg method: GET response: body: | - {"id":"aia-ikn-jng","title":"tf-TestAccDatadogDashboardSunburst-local-1682003499","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/aia-ikn-jng/tf-testaccdatadogdashboardsunburst-local-1682003499","is_read_only":true,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar"}],"type":"sunburst"},"id":2921021892712832},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":8092419862566682},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst-local-1682003499","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":553938127414477}]},"id":2707368200909357}],"notify_list":[],"created_at":"2023-04-20T15:11:41.281652+00:00","modified_at":"2023-04-20T15:11:41.281652+00:00","template_variable_presets":[],"tags":[]} + {"id":"cyy-h8s-qyg","title":"tf-TestAccDatadogDashboardSunburst-local-1693501375","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/cyy-h8s-qyg/tf-testaccdatadogdashboardsunburst-local-1693501375","is_read_only":false,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar","style":{"palette":"dog_classic"}}],"type":"sunburst"},"id":5299931556924856},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":952684438865742},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst-local-1693501375","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":1497433965060519}]},"id":6176650891167215}],"notify_list":[],"created_at":"2023-08-31T17:02:57.218781+00:00","modified_at":"2023-08-31T17:02:57.218781+00:00","template_variable_presets":[],"tags":[]} headers: Content-Type: - application/json @@ -78,11 +78,11 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/dashboard/aia-ikn-jng + url: https://api.datadoghq.com/api/v1/dashboard/cyy-h8s-qyg method: DELETE response: body: | - {"deleted_dashboard_id":"aia-ikn-jng"} + {"deleted_dashboard_id":"cyy-h8s-qyg"} headers: Content-Type: - application/json @@ -95,10 +95,10 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/dashboard/aia-ikn-jng + url: https://api.datadoghq.com/api/v1/dashboard/cyy-h8s-qyg method: GET response: - body: '{"errors":["Dashboard with ID aia-ikn-jng not found"]}' + body: '{"errors":["Dashboard with ID cyy-h8s-qyg not found"]}' headers: Content-Type: - application/json diff --git a/datadog/tests/cassettes/TestAccDatadogDashboardSunburst_import.freeze b/datadog/tests/cassettes/TestAccDatadogDashboardSunburst_import.freeze index 36fba522a..0954a473c 100644 --- a/datadog/tests/cassettes/TestAccDatadogDashboardSunburst_import.freeze +++ b/datadog/tests/cassettes/TestAccDatadogDashboardSunburst_import.freeze @@ -1 +1 @@ -2023-04-20T11:11:39.144014-04:00 \ No newline at end of file +2023-08-31T13:02:55.221405-04:00 \ No newline at end of file diff --git a/datadog/tests/cassettes/TestAccDatadogDashboardSunburst_import.yaml b/datadog/tests/cassettes/TestAccDatadogDashboardSunburst_import.yaml index 70cd355e2..7fda2d620 100644 --- a/datadog/tests/cassettes/TestAccDatadogDashboardSunburst_import.yaml +++ b/datadog/tests/cassettes/TestAccDatadogDashboardSunburst_import.yaml @@ -3,7 +3,7 @@ version: 1 interactions: - request: body: | - {"description":"Created using the Datadog provider in Terraform","id":"","is_read_only":true,"layout_type":"ordered","notify_list":[],"tags":[],"template_variable_presets":[],"template_variables":[],"title":"tf-TestAccDatadogDashboardSunburst_import-local-1682003499","widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar"}],"type":"sunburst"}},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"}},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst_import-local-1682003499","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"}}]}}]} + {"description":"Created using the Datadog provider in Terraform","id":"","layout_type":"ordered","notify_list":[],"tags":[],"template_variable_presets":[],"template_variables":[],"title":"tf-TestAccDatadogDashboardSunburst_import-local-1693501375","widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar","style":{"palette":"dog_classic"}}],"type":"sunburst"}},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"}},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst_import-local-1693501375","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"}}]}}]} form: {} headers: Accept: @@ -14,7 +14,7 @@ interactions: method: POST response: body: | - {"id":"bvj-ih4-hcr","title":"tf-TestAccDatadogDashboardSunburst_import-local-1682003499","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/bvj-ih4-hcr/tf-testaccdatadogdashboardsunburstimport-local-1682003499","is_read_only":true,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar"}],"type":"sunburst"},"id":5891386180229889},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":4331340382388147},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst_import-local-1682003499","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":1888132110231644}]},"id":54713283071304}],"notify_list":[],"created_at":"2023-04-20T15:11:40.944659+00:00","modified_at":"2023-04-20T15:11:40.944659+00:00","template_variable_presets":[],"tags":[]} + {"id":"uqe-4uv-bms","title":"tf-TestAccDatadogDashboardSunburst_import-local-1693501375","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/uqe-4uv-bms/tf-testaccdatadogdashboardsunburstimport-local-1693501375","is_read_only":false,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar","style":{"palette":"dog_classic"}}],"type":"sunburst"},"id":4333291131184286},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":2684748660131411},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst_import-local-1693501375","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":3559690099426305}]},"id":332944613648376}],"notify_list":[],"created_at":"2023-08-31T17:02:57.493115+00:00","modified_at":"2023-08-31T17:02:57.493115+00:00","template_variable_presets":[],"tags":[]} headers: Content-Type: - application/json @@ -27,11 +27,11 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/dashboard/bvj-ih4-hcr + url: https://api.datadoghq.com/api/v1/dashboard/uqe-4uv-bms method: GET response: body: | - {"id":"bvj-ih4-hcr","title":"tf-TestAccDatadogDashboardSunburst_import-local-1682003499","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/bvj-ih4-hcr/tf-testaccdatadogdashboardsunburstimport-local-1682003499","is_read_only":true,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar"}],"type":"sunburst"},"id":5891386180229889},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":4331340382388147},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst_import-local-1682003499","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":1888132110231644}]},"id":54713283071304}],"notify_list":[],"created_at":"2023-04-20T15:11:40.944659+00:00","modified_at":"2023-04-20T15:11:40.944659+00:00","template_variable_presets":[],"tags":[]} + {"id":"uqe-4uv-bms","title":"tf-TestAccDatadogDashboardSunburst_import-local-1693501375","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/uqe-4uv-bms/tf-testaccdatadogdashboardsunburstimport-local-1693501375","is_read_only":false,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar","style":{"palette":"dog_classic"}}],"type":"sunburst"},"id":4333291131184286},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":2684748660131411},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst_import-local-1693501375","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":3559690099426305}]},"id":332944613648376}],"notify_list":[],"created_at":"2023-08-31T17:02:57.493115+00:00","modified_at":"2023-08-31T17:02:57.493115+00:00","template_variable_presets":[],"tags":[]} headers: Content-Type: - application/json @@ -44,11 +44,11 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/dashboard/bvj-ih4-hcr + url: https://api.datadoghq.com/api/v1/dashboard/uqe-4uv-bms method: GET response: body: | - {"id":"bvj-ih4-hcr","title":"tf-TestAccDatadogDashboardSunburst_import-local-1682003499","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/bvj-ih4-hcr/tf-testaccdatadogdashboardsunburstimport-local-1682003499","is_read_only":true,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar"}],"type":"sunburst"},"id":5891386180229889},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":4331340382388147},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst_import-local-1682003499","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":1888132110231644}]},"id":54713283071304}],"notify_list":[],"created_at":"2023-04-20T15:11:40.944659+00:00","modified_at":"2023-04-20T15:11:40.944659+00:00","template_variable_presets":[],"tags":[]} + {"id":"uqe-4uv-bms","title":"tf-TestAccDatadogDashboardSunburst_import-local-1693501375","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/uqe-4uv-bms/tf-testaccdatadogdashboardsunburstimport-local-1693501375","is_read_only":false,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar","style":{"palette":"dog_classic"}}],"type":"sunburst"},"id":4333291131184286},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":2684748660131411},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst_import-local-1693501375","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":3559690099426305}]},"id":332944613648376}],"notify_list":[],"created_at":"2023-08-31T17:02:57.493115+00:00","modified_at":"2023-08-31T17:02:57.493115+00:00","template_variable_presets":[],"tags":[]} headers: Content-Type: - application/json @@ -61,11 +61,11 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/dashboard/bvj-ih4-hcr + url: https://api.datadoghq.com/api/v1/dashboard/uqe-4uv-bms method: GET response: body: | - {"id":"bvj-ih4-hcr","title":"tf-TestAccDatadogDashboardSunburst_import-local-1682003499","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/bvj-ih4-hcr/tf-testaccdatadogdashboardsunburstimport-local-1682003499","is_read_only":true,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar"}],"type":"sunburst"},"id":5891386180229889},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":4331340382388147},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst_import-local-1682003499","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":1888132110231644}]},"id":54713283071304}],"notify_list":[],"created_at":"2023-04-20T15:11:40.944659+00:00","modified_at":"2023-04-20T15:11:40.944659+00:00","template_variable_presets":[],"tags":[]} + {"id":"uqe-4uv-bms","title":"tf-TestAccDatadogDashboardSunburst_import-local-1693501375","description":"Created using the Datadog provider in Terraform","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/uqe-4uv-bms/tf-testaccdatadogdashboardsunburstimport-local-1693501375","is_read_only":false,"template_variables":[],"widgets":[{"definition":{"custom_links":[{"label":"Test Custom Link label","link":"https://app.datadoghq.com/dashboard/lists"}],"legend":{"hide_percent":false,"hide_value":true,"type":"automatic"},"requests":[{"formulas":[{"alias":"my ff query","formula":"my_query_1 + my_query_2"}],"queries":[{"aggregator":"sum","data_source":"metrics","name":"my_query_1","query":"avg:system.cpu.user{foo:bar} by {env}"}],"response_format":"scalar","style":{"palette":"dog_classic"}}],"type":"sunburst"},"id":4333291131184286},{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":2684748660131411},{"definition":{"layout_type":"ordered","show_title":true,"title":"tf-TestAccDatadogDashboardSunburst_import-local-1693501375","type":"group","widgets":[{"definition":{"hide_total":true,"legend":{"type":"table"},"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"abc"}}],"response_format":"scalar"}],"type":"sunburst"},"id":3559690099426305}]},"id":332944613648376}],"notify_list":[],"created_at":"2023-08-31T17:02:57.493115+00:00","modified_at":"2023-08-31T17:02:57.493115+00:00","template_variable_presets":[],"tags":[]} headers: Content-Type: - application/json @@ -78,11 +78,11 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/dashboard/bvj-ih4-hcr + url: https://api.datadoghq.com/api/v1/dashboard/uqe-4uv-bms method: DELETE response: body: | - {"deleted_dashboard_id":"bvj-ih4-hcr"} + {"deleted_dashboard_id":"uqe-4uv-bms"} headers: Content-Type: - application/json @@ -95,10 +95,10 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/dashboard/bvj-ih4-hcr + url: https://api.datadoghq.com/api/v1/dashboard/uqe-4uv-bms method: GET response: - body: '{"errors":["Dashboard with ID bvj-ih4-hcr not found"]}' + body: '{"errors":["Dashboard with ID uqe-4uv-bms not found"]}' headers: Content-Type: - application/json diff --git a/datadog/tests/resource_datadog_dashboard_sunburst_test.go b/datadog/tests/resource_datadog_dashboard_sunburst_test.go index e5b3633a2..0c3fb0460 100644 --- a/datadog/tests/resource_datadog_dashboard_sunburst_test.go +++ b/datadog/tests/resource_datadog_dashboard_sunburst_test.go @@ -9,7 +9,6 @@ resource "datadog_dashboard" "sunburst_dashboard" { title = "{{uniq}}" description = "Created using the Datadog provider in Terraform" layout_type = "ordered" - is_read_only = true widget { sunburst_definition { request { @@ -25,6 +24,9 @@ resource "datadog_dashboard" "sunburst_dashboard" { aggregator = "sum" } } + style { + palette = "dog_classic" + } } hide_total = false legend_inline { @@ -97,13 +99,13 @@ var datadogDashboardSunburstAsserts = []string{ "description = Created using the Datadog provider in Terraform", "layout_type = ordered", "title = {{uniq}}", - "is_read_only = true", "widget.0.sunburst_definition.0.request.0.formula.0.formula_expression = my_query_1 + my_query_2", "widget.0.sunburst_definition.0.request.0.formula.0.alias = my ff query", "widget.0.sunburst_definition.0.request.0.query.0.metric_query.0.data_source = metrics", "widget.0.sunburst_definition.0.request.0.query.0.metric_query.0.query = avg:system.cpu.user{foo:bar} by {env}", "widget.0.sunburst_definition.0.request.0.query.0.metric_query.0.name = my_query_1", "widget.0.sunburst_definition.0.request.0.query.0.metric_query.0.aggregator = sum", + "widget.0.sunburst_definition.0.request.0.style.0.palette = dog_classic", "widget.0.sunburst_definition.0.hide_total = false", "widget.0.sunburst_definition.0.legend_inline.0.type = automatic", "widget.0.sunburst_definition.0.legend_inline.0.hide_value = true", diff --git a/docs/resources/dashboard.md b/docs/resources/dashboard.md index b4b3ba6f0..649f04a1a 100644 --- a/docs/resources/dashboard.md +++ b/docs/resources/dashboard.md @@ -4625,7 +4625,7 @@ Required: Required: -- `data_source` (String) Source from which to query items to display in the stream. Valid values are `logs_stream`, `audit_stream`, `ci_pipeline_stream`, `ci_test_stream`, `rum_issue_stream`, `apm_issue_stream`, `logs_issue_stream`, `logs_pattern_stream`, `logs_transaction_stream`, `event_stream`. +- `data_source` (String) Source from which to query items to display in the stream. Valid values are `logs_stream`, `audit_stream`, `ci_pipeline_stream`, `ci_test_stream`, `rum_issue_stream`, `apm_issue_stream`, `trace_stream`, `logs_issue_stream`, `logs_pattern_stream`, `logs_transaction_stream`, `event_stream`. Optional: @@ -6954,6 +6954,7 @@ Optional: - `query` (Block List) (see [below for nested schema](#nestedblock--widget--group_definition--widget--sunburst_definition--request--query)) - `rum_query` (Block List, Max: 1) The query to use for this widget. (see [below for nested schema](#nestedblock--widget--group_definition--widget--sunburst_definition--request--rum_query)) - `security_query` (Block List, Max: 1) The query to use for this widget. (see [below for nested schema](#nestedblock--widget--group_definition--widget--sunburst_definition--request--security_query)) +- `style` (Block List, Max: 1) Define style for the widget's request. (see [below for nested schema](#nestedblock--widget--group_definition--widget--sunburst_definition--request--style)) ### Nested Schema for `widget.group_definition.widget.sunburst_definition.request.apm_query` @@ -7573,6 +7574,14 @@ Optional: + +### Nested Schema for `widget.group_definition.widget.sunburst_definition.request.style` + +Optional: + +- `palette` (String) A color palette to apply to the widget. The available options are available at: https://docs.datadoghq.com/dashboards/widgets/timeseries/#appearance. + + @@ -10283,7 +10292,7 @@ Required: Required: -- `data_source` (String) Source from which to query items to display in the stream. Valid values are `logs_stream`, `audit_stream`, `ci_pipeline_stream`, `ci_test_stream`, `rum_issue_stream`, `apm_issue_stream`, `logs_issue_stream`, `logs_pattern_stream`, `logs_transaction_stream`, `event_stream`. +- `data_source` (String) Source from which to query items to display in the stream. Valid values are `logs_stream`, `audit_stream`, `ci_pipeline_stream`, `ci_test_stream`, `rum_issue_stream`, `apm_issue_stream`, `trace_stream`, `logs_issue_stream`, `logs_pattern_stream`, `logs_transaction_stream`, `event_stream`. Optional: @@ -12612,6 +12621,7 @@ Optional: - `query` (Block List) (see [below for nested schema](#nestedblock--widget--sunburst_definition--request--query)) - `rum_query` (Block List, Max: 1) The query to use for this widget. (see [below for nested schema](#nestedblock--widget--sunburst_definition--request--rum_query)) - `security_query` (Block List, Max: 1) The query to use for this widget. (see [below for nested schema](#nestedblock--widget--sunburst_definition--request--security_query)) +- `style` (Block List, Max: 1) Define style for the widget's request. (see [below for nested schema](#nestedblock--widget--sunburst_definition--request--style)) ### Nested Schema for `widget.sunburst_definition.request.apm_query` @@ -13231,6 +13241,14 @@ Optional: + +### Nested Schema for `widget.sunburst_definition.request.style` + +Optional: + +- `palette` (String) A color palette to apply to the widget. The available options are available at: https://docs.datadoghq.com/dashboards/widgets/timeseries/#appearance. + + diff --git a/go.mod b/go.mod index c299b9b69..2487234a6 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/terraform-providers/terraform-provider-datadog require ( - github.com/DataDog/datadog-api-client-go/v2 v2.16.0 + github.com/DataDog/datadog-api-client-go/v2 v2.16.1-0.20230831134252-8a2ecace0920 github.com/DataDog/dd-sdk-go-testing v0.0.0-20211116174033-1cd082e322ad github.com/dnaeon/go-vcr v1.0.1 github.com/hashicorp/go-cleanhttp v0.5.2 diff --git a/go.sum b/go.sum index c610094d9..e8fd972e2 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/datadog-api-client-go/v2 v2.16.0 h1:wwroXLmBlO5/o+uS1UxDpuMIkhIL6gJAu6m0ttGM5Yc= -github.com/DataDog/datadog-api-client-go/v2 v2.16.0/go.mod h1:uJd7G1BONVIyiVw684VMn2XYI1FfN1tx4bRGenAf2bo= +github.com/DataDog/datadog-api-client-go/v2 v2.16.1-0.20230831134252-8a2ecace0920 h1:coE+poJvFIhpoUd044OQ1I/mHZntpVBvzcVWaXmpshk= +github.com/DataDog/datadog-api-client-go/v2 v2.16.1-0.20230831134252-8a2ecace0920/go.mod h1:uJd7G1BONVIyiVw684VMn2XYI1FfN1tx4bRGenAf2bo= github.com/DataDog/datadog-go v4.4.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=