newrelic / newrelic-client-go

New Relic Client for the Go programming language
https://newrelic.github.io/observability-as-code
Apache License 2.0
75 stars 95 forks source link

fix(dashboard): change in default value for 'to' and 'from' in Table and line widget for newrelic_one_dashboard resource #1199

Closed vagrawal-newrelic closed 4 months ago

vagrawal-newrelic commented 4 months ago

changed the default values for 'to' and 'from' fields in threshold for table and line widget in dashboard. This PR include update for these field type from float64 to string to omit these fields in nerdgraph request if these fields are not specified in the terraform configuration file.

changes in PR:

Updated the type of to and from fields in threshold block of newrelic_one_dashbaod from *float64 to string, as in this git issue: 2705 customer reported that if we donot pass any for these field's in TF config then it is defaulting to a 0 value which is wrong as it cannot differentiate between the situation when customer donot provide a value and provide a 0 value. As terraform provide a default value of 0 to a float64 variable so we changed the type to string type so that if the customer donot provide any value then by default it should show a blank value in UI and if the customer provide a 0 value then only it should be visible as 0 in UI.