Use the Dynatrace Export Utility with Terraform Workflows

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

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

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?

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 😍

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

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.

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.

As simple as that ! Thanks

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: 1. About - Dynatrace Observability Lab: Automated Dynatrace Configuration as Code with Crossplane