Comments (4)
@tmack8001 correct, the label is expected to be a string here https://github.com/zorkian/go-datadog-api/blob/master/dashboards.go#L44 but this is the case only when the checkmark on the UI is set AND the input type contains some text, otherwise the API returns true
, meaning the label is set but it contains the marker definition value (which is whatever is in the value
JSON field).
The correct behaviour IMO would be having another, boolean JSON field in the response representing whether the label checkmark was set or not and always return a string for label
but this is something that needs to be addressed on the Datadog side, in the meantime I can't think about any workaround other than leaving a note on the docs.
from terraform-provider-datadog.
I'm also seeing similar when not specifying label values in the Datadog UI which then breaks our CI/CD pipelines for terraform changes.
* module.main-timeboard.datadog_timeboard.main-dashboard: datadog_timeboard.main-dashboard: json: cannot unmarshal bool into Go struct field GraphDefinitionMarker.label of type string
here is the example marker block as defined in the Datadog API for the graph that breaks terraform builds:
"markers": [
{
"val": "250000000",
"value": "y = 250000000",
"type": "error dashed",
"label": true
},
{
"val": "200000000",
"value": "y = 200000000",
"type": "warning dashed",
"label": true
}
]
This "label: true" is the syntax for when a string isn't provided in the "label" field in the UI / API. I'm guessing the go http library used by this provider is expecting this to always be a string and sometimes (when no text label is provided) breaks unmarshalling with the expected struct.
from terraform-provider-datadog.
@robinbowes setting dim
, min
and max
explicitly is not actually needed, to set a range between 0.8 and 1.0 on y, all you have to do is the following
marker {
label = "High Latency"
type = "error solid"
value = "0.8 > y > 0"
}
from terraform-provider-datadog.
Closing this as the first issue seems invalid and the second one was fixed adding a note to the docs (literally the only thing I can do at this moment).
from terraform-provider-datadog.
Related Issues (20)
- Data source for query value HOT 2
- Import doesn't work for datadog_sensitive_data_scanner_*, datadog_restriction_policy
- datadog_restriction_policy's bindings should support all possible principals
- AWS Cloudtrail integration
- object contains unparsed element in datadog_service_level_objective resource HOT 8
- object contains unparsed element in datadog_service_level_objective resource HOT 1
- Request for Default_Tags parameter for Datadog Terraform provider HOT 1
- Add support for "Account Tags" to datadog_integration_aws resource HOT 1
- Provider 3.39.0 doesn't support `extended_resource_collection_enabled` attribute, but documentation says it does HOT 3
- The updated resource for datadog_csm_threats_agent_rule results in a 403 Forbidden error of the terraform plan
- Refresh=False Still Checking Metric Tag Configuration State
- Allow for passing Value to synthetic_test.config_variable
- datadog_logs_archive / terraform plan / Error: object contains unparsed element: map[bucket:datadog-rehydrate-tf integration:map[] path:/test type:s3] HOT 1
- Reference Tables Resource Provider
- Cannot update Monitor Downtime HOT 1
- Add support for order by group on dashboard query_table_definition
- Provider has incorrect checksum when downloaded from GitHub (darwin/arm64) HOT 1
- More flexibility in writing recurring_schedule.recurrence.duration
- Provider attempting to remove query metric
- `widget.timeseries_definition.request.query.slo_query.slo_query_type` doesn't support `time_slice` option
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-datadog.