Loading...
Loading...
### Terraform Version ``` Terraform v0.12.1 + provider.datadog v1.9.0 ``` ### Terraform Output No configs except for the standard boilerplate ones. Same for `terraform show` and `terraform state show` ```hcl # module.datadog.datadog_timeboard.alexiss-timeboard-6-jun-2019-1341: resource "datadog_timeboard" "alexiss-timeboard-6-jun-2019-1341" { id = "1234573" title = "Alexis's Timeboard 6 Jun 2019 13:41" graph { autoscale = true events = [] group = [] include_no_metric_hosts = false include_ungrouped_hosts = false precision = "2" scope = [] style = {} title = "Avg of system.load.1 over *" viz = "query_value" yaxis = {} request { aggregator = "avg" increase_good = false q = "avg:system.load.1{*}" stacked = false style = {} } } } ``` `terraform show -json | jq .` (The most complete) ```json { "format_version": "0.1", "terraform_version": "0.12.1", "values": { "root_module": { "child_modules": [ { "resources": [ { "address": "datadog_timeboard.alexiss-timeboard-6-jun-2019-1341", "mode": "managed", "type": "datadog_timeboard", "name": "alexiss-timeboard-6-jun-2019-1341", "provider_name": "datadog", "schema_version": 0, "values": { "description": "", "graph": [ { "autoscale": true, "custom_unit": "", "events": [], "group": [], "include_no_metric_hosts": false, "include_ungrouped_hosts": false, "marker": [], "node_type": "", "precision": "2", "request": [ { "aggregator": "avg", "change_type": "", "compare_to": "", "conditional_format": [], "extra_col": "", "increase_good": false, "order_by": "", "order_direction": "", "q": "avg:system.load.1{*}", "stacked": false, "style": {}, "type": "" } ], "scope": [], "style": {}, "text_align": "", "title": "Avg of system.load.1 over *", "viz": "query_value", "yaxis": {} } ], "id": "1234573", "read_only": null, "template_variable": [], "title": "Alexis's Timeboard 6 Jun 2019 13:41" } } ], "address": "module.datadog" } ] } } } ``` For the truncation issue, here is the first missing embedded resource from the output of `terraform plan` Three total graphs were lost. The missing graphs get transformed into the next graph in the series. The missing graphs are missing in all versions of the `show`: ``` ~ graph { autoscale = false - events = [] -> null - group = [] -> null include_no_metric_hosts = false include_ungrouped_hosts = false - scope = [] -> null style = {} ~ title = "Memory Rollup" -> "Available Swap" viz = "timeseries" yaxis = {} ~ request { increase_good = false ~ q = "max:system.mem.slab{$host}, max:system.mem.buffered{$host}, max:system.mem.cached{$host}, max:system.mem.free{$host}, max:system.mem.shared{$host}, max:system.mem.paged{$host}, max:system.mem.page_tables{$host}, max:system.mem.nonpaged{$host}, max:system.mem.committed{$host}" -> "avg:system.swap.free{$host}, avg:system.swap.used{$host}" stacked = false ~ style = { - "palette" = "dog_classic" -> null - "type" = "solid" -> null - "width" = "normal" -> null } - type = "area" -> null } - request { - increase_good = false -> null - q = "max:system.mem.total{$host}" -> null - stacked = false -> null - style = { - "palette" = "warm" - "type" = "dashed" - "width" = "normal" } -> null - type = "line" -> null } } ``` ### Debug Output Not including - no errors or complaints ### Expected Behavior `terraform show`, `terraform show -json`, and `terraform state show ADDR` should all show the same (complete) information ### Actual Behavior `terraform show`: Strips null and empty string fields, but leaves empty lists and maps `terraform show -json`: Shows null, empty string, etc., but no way to differentiate a list from a repeated embedded block `terraform state show ADDR`: same as `terraform show` All: Occasional complete lost of embedded blocks (consistent between formats) ### Steps to Reproduce Cannot give exact steps for data loss beyond output shown above. Discovered while using datadog, so steps will specify there 1. Create a datadog timeboard with one graph 2. Create a stub resource block to bind the import to 3. `terraform init` 4. `terraform import datadog_dashboard.stub ID` 5. `terraform show`, `terraform show -json`, and `terraform state show datadog_dashboard.stub` ### Additional Context Using `terraform import` and `terraform show` to generate configs that can allow management of existing resources ### References Seems similar to: https://github.com/hashicorp/terraform/issues/20028
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.