27 Apr 2023 11:23 PM - last edited on 21 Oct 2024 09:45 AM by AgataWlodarczyk
How can i use dynatrace export utility in terraform.? i came accross a video where the presenter actually exported an existing dynatrace dashboard into his terraform config. i followed the steps and i couldn't get the config to download on my vscode.
Does anyone have a step by step guide to using terraform to export existing dynatrace resources into their environment
Solved! Go to Solution.
27 Apr 2023 11:37 PM - edited 27 Apr 2023 11:37 PM
Hi,
Maybe you already know it but Dynatrace has its own tool:
If you still want Terraform, maybe this webinar will be useful.
Best regards
07 Oct 2024 03:36 PM
I try to use export utility with terraform provider as well in documentation you can user directly the executable terraform-provider-dynatrace_v1.68.1.exe directly but in reality I have this message :
This binary is a plugin. These are not meant to be executed directly.
Please execute the program that consumes these plugins, which will
load any plugins automatically.
Must be doing something wrong, any clue for this?
08 Oct 2024 03:50 AM
Hey AlainD, there is a tutorial for the export utility here, have you tried following this? If you've tried following the tutorial from the docs and you get that error, what command are you trying to execute that returns that?
08 Oct 2024 06:42 AM - edited 08 Oct 2024 06:52 AM
Thanks for sharing!
Dynatrace provider for Terraform 😍
I would like to take a moment to express my heartfelt gratitude to this terraform provider. They have been an invaluable tool in assisting me with the transfer of a significant number of metrics and dashboards from one cluster to another, effectively moving everything between different environments. This provider made a complex process much smoother.
Regards,
Alex Romanenkov
09 Oct 2024 01:20 PM
Hi,
Yes I did, using C:\Local\Dynatrace\Terraformv2\.terraform\providers\registry.terraform.io\dynatrace-oss\dynatrace\1.68.1\windows_386\terraform-provider-dynatrace_v1.68.1.exe cause this error.
09 Oct 2024 10:47 PM
Hey AlainD,
In step 3 of the tutorial I linked it adds -export to the end of the command. Under that there are also a bunch of export examples with descriptions of what each do. Directly invoking the exe without -export will result in the error you're experiencing as seen below.
10 Oct 2024 02:57 PM
As simple as that ! Thanks
21 Oct 2024 07:09 AM
For other readers, if this interests you, you may also be interested in "wrapping" Terraform "in" crossplane and thus having auto-reconciling config as code: https://dynatrace.github.io/demo-crossplane/