Skip to content

Commit

Permalink
Fix parsing compute.interval for apm and log queries in dashboards
Browse files Browse the repository at this point in the history
  • Loading branch information
Slavek Kabrda committed Sep 25, 2019
1 parent 80a32dd commit bf3b6a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions datadog/resource_datadog_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -3853,8 +3853,10 @@ func buildDatadogApmOrLogQuery(terraformQuery map[string]interface{}) *datadog.W
if facet, ok := terraformCompute["facet"].(string); ok && len(facet) != 0 {
datadogCompute.Facet = datadog.String(facet)
}
if v, err := strconv.ParseInt(terraformCompute["interval"].(string), 10, 64); err == nil {
datadogCompute.Interval = datadog.Int(int(v))
if interval, ok := terraformCompute["interval"].(string); ok {
if v, err := strconv.ParseInt(interval, 10, 64); err == nil {
datadogCompute.Interval = datadog.Int(int(v))
}
}
datadogQuery.Compute = &datadogCompute
// Search
Expand Down

0 comments on commit bf3b6a5

Please sign in to comment.