diff --git a/.go-version b/.go-version index dac5843..3d7531d 100644 --- a/.go-version +++ b/.go-version @@ -1,2 +1,2 @@ -1.92.0 +1.93.0 diff --git a/docs/resources/alert.md b/docs/resources/alert.md index bd5a446..1eac0b6 100644 --- a/docs/resources/alert.md +++ b/docs/resources/alert.md @@ -207,6 +207,7 @@ Optional: Optional: +- `display_type` (String) - `is_donut` (Boolean) - `sort_by` (String) - `sort_direction` (String) @@ -274,6 +275,7 @@ Optional: Optional: +- `display_type` (String) - `is_donut` (Boolean) - `sort_by` (String) - `sort_direction` (String) diff --git a/docs/resources/dashboard.md b/docs/resources/dashboard.md index a7b2e26..2725888 100644 --- a/docs/resources/dashboard.md +++ b/docs/resources/dashboard.md @@ -131,6 +131,7 @@ Optional: Optional: +- `display_type` (String) - `is_donut` (Boolean) - `sort_by` (String) - `sort_direction` (String) @@ -281,6 +282,7 @@ Optional: Optional: +- `display_type` (String) - `is_donut` (Boolean) - `sort_by` (String) - `sort_direction` (String) diff --git a/lightstep/resource_dashboard.go b/lightstep/resource_dashboard.go index 28bc328..740ac32 100644 --- a/lightstep/resource_dashboard.go +++ b/lightstep/resource_dashboard.go @@ -42,6 +42,10 @@ func getUnifiedQuerySchemaMap() map[string]*schema.Schema { Elem: &schema.Resource{ // This is the superset of all possible fields for all display types Schema: map[string]*schema.Schema{ + "display_type": { + Type: schema.TypeString, + Optional: true, + }, "sort_by": { Type: schema.TypeString, Optional: true, diff --git a/lightstep/resource_dashboard_test.go b/lightstep/resource_dashboard_test.go index f43d41f..868e008 100644 --- a/lightstep/resource_dashboard_test.go +++ b/lightstep/resource_dashboard_test.go @@ -992,6 +992,7 @@ func TestDisplayTypeOptions(t *testing.T) { { Config: makeDisplayTypeConfig("pie", strings.TrimSpace(` display_type_options { + display_type = "pie" is_donut = true } `)), @@ -1000,6 +1001,7 @@ func TestDisplayTypeOptions(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "dashboard_name", "test display_type_options"), resource.TestCheckResourceAttr(resourceName, "group.0.chart.0.query.0.display", "pie"), resource.TestCheckResourceAttr(resourceName, "group.0.chart.0.query.0.display_type_options.0.is_donut", "true"), + resource.TestCheckResourceAttr(resourceName, "group.0.chart.0.query.0.display_type_options.0.display_type", "pie"), ), }, {