You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I believe Adam has made known to you, occasionally, terraform-provider-dynatrace -export will omit the attribute name, like:
Writing modules ___providers___.tf
Remove Non-Referenced Modules ...
Finish Export ...
Terraform executable path: /usr/bin/terraform
Executing 'terraform init'
Error: Invalid attribute name
on modules/report/_YYY.report.tf line 3, in resource "dynatrace_report" "_YYY":
3: dashboard_id = "${var.dynatrace_json_dashboard..id}"
An attribute name is required after a dot.
Error: Invalid attribute name
on modules/report/_XXX.report.tf line 3, in resource "dynatrace_report" "_XXX":
3: dashboard_id = "${var.dynatrace_json_dashboard..id}"
An attribute name is required after a dot.
... finished after 9 seconds
often running the same task again will succeed.
To Reproduce
Steps to reproduce the behavior:
run terraform-provider-dynatrace -export -id -ref (we have this running as a GH action)
Expected behavior
Correctly formed terraform
Screenshots
As provided by AG
Additional context
Interestingly, as I was attempting a workaround of #521 it appears that using -ref "*" dynatrace_json_dashboard -exclude dynatrace_oneagent_updates fails with:
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.
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.
@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 #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 ...
The text was updated successfully, but these errors were encountered: