Skip to content

Commit

Permalink
Add display_type to display_type_options (#217)
Browse files Browse the repository at this point in the history
* Add display_type to display_type_options

* added terraform docs

* Bump .go-version

---------

Co-authored-by: erik-snow <[email protected]>
  • Loading branch information
erik-snow and erik-snow authored Mar 11, 2024
1 parent 926ad4d commit 2536ce5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1.92.0
1.93.0

2 changes: 2 additions & 0 deletions docs/resources/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ Optional:

Optional:

- `display_type` (String)
- `is_donut` (Boolean)
- `sort_by` (String)
- `sort_direction` (String)
Expand Down Expand Up @@ -274,6 +275,7 @@ Optional:

Optional:

- `display_type` (String)
- `is_donut` (Boolean)
- `sort_by` (String)
- `sort_direction` (String)
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Optional:

Optional:

- `display_type` (String)
- `is_donut` (Boolean)
- `sort_by` (String)
- `sort_direction` (String)
Expand Down Expand Up @@ -281,6 +282,7 @@ Optional:

Optional:

- `display_type` (String)
- `is_donut` (Boolean)
- `sort_by` (String)
- `sort_direction` (String)
Expand Down
4 changes: 4 additions & 0 deletions lightstep/resource_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions lightstep/resource_dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,7 @@ func TestDisplayTypeOptions(t *testing.T) {
{
Config: makeDisplayTypeConfig("pie", strings.TrimSpace(`
display_type_options {
display_type = "pie"
is_donut = true
}
`)),
Expand All @@ -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"),
),
},
{
Expand Down

0 comments on commit 2536ce5

Please sign in to comment.