Skip to content

Commit a4fd7ce

Browse files
yfrontostack72
authored andcommitted
provider/datadog: Govendor update dependencies (hashicorp#8428)
* Includes bugfixes in zorkian/go-datadog-api * Struct changes upstream required small changes to provider code
1 parent dea2860 commit a4fd7ce

5 files changed

Lines changed: 48 additions & 17 deletions

File tree

builtin/providers/datadog/resource_datadog_monitor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func buildMonitorStruct(d *schema.ResourceData) *datadog.Monitor {
159159
o.NotifyNoData = attr.(bool)
160160
}
161161
if attr, ok := d.GetOk("no_data_timeframe"); ok {
162-
o.NoDataTimeframe = attr.(int)
162+
o.NoDataTimeframe = datadog.NoDataTimeframe(attr.(int))
163163
}
164164
if attr, ok := d.GetOk("renotify_interval"); ok {
165165
o.RenotifyInterval = attr.(int)
@@ -336,7 +336,7 @@ func resourceDatadogMonitorUpdate(d *schema.ResourceData, meta interface{}) erro
336336
o.NotifyNoData = attr.(bool)
337337
}
338338
if attr, ok := d.GetOk("no_data_timeframe"); ok {
339-
o.NoDataTimeframe = attr.(int)
339+
o.NoDataTimeframe = datadog.NoDataTimeframe(attr.(int))
340340
}
341341
if attr, ok := d.GetOk("renotify_interval"); ok {
342342
o.RenotifyInterval = attr.(int)

builtin/providers/datadog/resource_datadog_timeboard.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,10 @@ func appendRequests(datadogGraph *datadog.Graph, terraformRequests *[]interface{
120120
for _, t_ := range *terraformRequests {
121121
t := t_.(map[string]interface{})
122122
d := struct {
123-
Query string `json:"q"`
124-
Stacked bool `json:"stacked"`
123+
Query string `json:"q"`
124+
Stacked bool `json:"stacked"`
125+
Aggregator string
126+
ConditionalFormats []datadog.DashboardConditionalFormat `json:"conditional_formats,omitempty"`
125127
}{Query: t["q"].(string)}
126128
if stacked, ok := t["stacked"]; ok {
127129
d.Stacked = stacked.(bool)

vendor/github.com/zorkian/go-datadog-api/dashboards.go

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/zorkian/go-datadog-api/monitors.go

Lines changed: 28 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/zorkian/go-datadog-api/screenboards.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)