Open davidghughes opened 2 months ago
Hello @davidghughes,
It sounds suspiciously like a race condition we're dealing with here. Does the issue occur for a certain kind of resource more often than others? Based on the data Adam forwarded to us and the information you've posted here, it looks like Dashboards and Synthetic Monitors are definitely affected.
Let's say, it happens for Dashboards primarily. How many Dashboards can be found in your environment? Reason for these rather weird questions is, that we need to find a way to reproduce the issue pretty reliably.
Another way to approach this would be to provide a couple of debug builds for you, so you can run them internally and provide the output for us. That, of course, only makes sense if you have the bandwidth for it - and most importantly, don't have to run these debug builds dozens of times until the issue re-emerges.
thanks, Reinhard
Hello @Reinhard-Pilz-Dynatrace and thanks for the update.
I'm more than happy to try debug builds.
From doing a couple of test runs this morning, I am able to reproduce the issue. I'll forward you the results.
I am noticing that is mainly the dynatrace_report resource that generates the error.
Running ./terraform-provider-dynatrace -export -id -ref "*"
results in 27 reports and 30 json_dashboards
Running ./terraform-provider-dynatrace -export -id -ref "*" dynatrace_json_dashboard
results in 27 reports and 119 dashboards
a diff of the json_dashboard terraform files between successful and failed reports shows that they are identical.
thanks, Dave.
@davidghughes I would suggest that we continue this via email. We will have to exchange binaries and logs that may contain sensitive data from your environment. A public GitHub ticket isn't the right place for that.
I just responded to the email Adam sent out to connect the two of us.
Describe the bug
As I believe Adam has made known to you, occasionally, terraform-provider-dynatrace -export will omit the attribute name, like:
often running the same task again will succeed.
To Reproduce Steps to reproduce the behavior:
Expected behavior Correctly formed terraform
Screenshots As provided by AG
Additional context Interestingly, as I was attempting a workaround of https://github.com/dynatrace-oss/terraform-provider-dynatrace/issues/521 it appears that using -ref "*" dynatrace_json_dashboard -exclude dynatrace_oneagent_updates fails with:
running the following succeeds, however we ideally need the extra modules ...