Closed Rhamus98 closed 6 hours ago
Hello @Rhamus98
We will need to capture the HTTP traffic that happens when you're running the export. To capture that traffic you can set the environment variables
DYNATRACE_DEBUG=true
DYNATRACE_LOG_HTTP=terraform-provider-dynatrace.http.log
DYNATRACE_HTTP_RESPONSE=true
and then execute
terraform-provider-dynatrace_v1.##.# -export dynatrace_document
That will produce a file terraform-provider-dynatrace.http.log
(and likely a file terraform-provider-dynatrace.http.err.log
).
But I want you to wait with that until we have pushed out the release scheduled for tomorrow. It contains a couple of improvements about HTTP traffic logging I would like to be active for that.
Because this is GitHub repo is visible for everyone, I'd suggest to either send the captured logs to terraform@dynatrace.com or to open a Dynatrace Support Ticket for exchanging such information. These logs will contain details about your Dynatrace configuration, and you don't want that to be available out in the public.
My current guess is that your issue is related to permissions on the dashboards in question. But the logs should tell us a bit more.
best regards, Reinhard
I am also having this exact problem with the export utility. I am using 1.69.1. It exports the information block about the resource but leaves the content field blank.
# ID 12345678-ba5e-462b-b2aa-7d0b6d3af61e
resource "dynatrace_document" "test_dashboard" {
name = "test_dashboard"
type = "dashboard"
actor = ""
content = ""
owner = "12345678-0a9c-4a69-a17b-7655102870a5"
private = true
}
I tested this out in 1.69.0 and it was still broken. It worked when I tried an earlier version (1.65.0).
Hi @Rhamus98 and @jparrottOneStream
I have good news here. The upcoming release of the provider (planned for today) will fix this issue.
Thanks for your comment, @jparrottOneStream. It made me revisit past and upcoming changes to the relevant REST client. Before that I was pretty puzzled about why I wasn't able to reproduce the issue.
Just drop us a message in case today's release doesn't work out as expected and I'll reopen the ticket.
Thank you @Reinhard-Pilz-Dynatrace and @jparrottOneStream. I’ll test this and post an update here!
Awesome! Thanks for the quick fix. I'm glad my insight was able to help. I will try it out and post an update here.
Describe the bug When attempting to export the dynatrace_document resource, with the correct, additional, environment variables set:
The resource is returned like this:
To Reproduce Steps to reproduce the behavior: We are executing the export as part of a GitHub Actions workflow step, whereby we retrieve the relevant secrets from hashicorp vault and pass them into a script:
And the script that looks like this:
Expected behavior I'd expect, amongst other thing, for the dynatrace_document resource to be exported per the document, and for the contents block to be a JSON body for example, instead of blank:
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.