Open Q&A
If there's no good subforum for your question - ask it here!
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Use the Dynatrace Export Utility with Terraform Workflows

oluseyi
Newcomer

Summary: This post explains how the Dynatrace export utility can be used in Terraform workflows. It covers what the utility exports, how it interacts with Monaco/Terraform, and considerations for versioning.



How can I use the Dynatrace export utility in Terraform? I came across 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 VS Code. 
Does anyone have a step-by-step guide to using Terraform to export existing Dynatrace resources into their environment 

8 REPLIES 8

AntonPineiro
DynaMight Guru
DynaMight Guru

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

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

AlainD
Observer

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?

Fin_Ubels
Dynatrace Champion
Dynatrace Champion

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?

Thanks for sharing!

Dynatrace provider for Terraform 😍

Romanenkov_Al3x_0-1728366392706.png

Romanenkov_Al3x_2-1728366432718.png

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

 

 

 

DT_NGINX_FORCE_UNKNOWN_VERSION_INSTRUMENTATION=1

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.

Fin_Ubels
Dynatrace Champion
Dynatrace Champion

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.

Fin_Ubels_0-1728510330148.png

 

As simple as that ! Thanks

adam_gardner
Dynatrace Champion
Dynatrace Champion

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/

Featured Posts