Skip to content

Commit

Permalink
Merge pull request #322 from bkabrda/fix-query-interval-parsing
Browse files Browse the repository at this point in the history
Fix parsing compute.interval for apm and log queries in dashboards
  • Loading branch information
Slavek Kabrda authored Sep 25, 2019
2 parents 80a32dd + bf3b6a5 commit 49e3ec2
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 49e3ec2

Please sign in to comment.