Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Existing heatmap widget failed to pull in plan #2096

Closed
viraptor opened this issue Sep 11, 2023 · 2 comments · Fixed by #2103
Closed

Existing heatmap widget failed to pull in plan #2096

viraptor opened this issue Sep 11, 2023 · 2 comments · Fixed by #2103
Labels

Comments

@viraptor
Copy link

Datadog Terraform Provider Version

3.29.0

Terraform Version

1.5.7

What resources or data sources are affected?

datadog_dashboard

Terraform Configuration Files

No response

Relevant debug or panic output

No response

Expected Behavior

When importing an existing dashboard with the following configuration:

{
    "viz": "heatmap",
    "events": [
        {
            "q": "Deployed to Production"
        }
    ],
    "requests": [
        {
            "style": {
                "palette": "dog_classic"
            },
            "response_format": "timeseries",
            "queries": [
                {
                    "data_source": "metrics",
                    "name": "query1",
                    "query": "max:system.load.1{$site,$az,$tg,aws:cloudformation:stack-name:...} by {host}"
                },
                {
                    "data_source": "metrics",
                    "name": "query2",
                    "query": "max:system.load.1{$site,$az,$tg,aws:cloudformation:stack-name:...} by {host}"
                }
            ],
            "formulas": [
                {
                    "formula": "query1"
                },
                {
                    "formula": "query2"
                }
            ]
        }
    ]
}

a terraform plan run should detect and show the correct existing values.

Actual Behavior

Plan shows only this:

      - widget {
          - id = 107436315 -> null

          - heatmap_definition {
              - show_legend = false -> null
              - title       = "Max System Load by host" -> null

              - event {
                  - q = "Deployed to Production" -> null
                }

              - request {

                  - style {
                      - palette = "dog_classic" -> null
                    }
                }
            }
        }

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@viraptor viraptor added the bug label Sep 11, 2023
@viraptor
Copy link
Author

FYI, the details get pulled correctly into datadog_dashboard_json

@nkzou
Copy link
Contributor

nkzou commented Sep 12, 2023

Reproduced, this is due to the api returning some heatmap widgets in a format that the underlying Go sdk didn't expect. Will see what we can do about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants