terraform-provider-dynatrace icon indicating copy to clipboard operation
terraform-provider-dynatrace copied to clipboard

`dynatrace_document` resources applying successfully through Terraform, but resources are not present when checking in Dynatrace

Open caleb-long-vad2r4 opened this issue 1 month ago • 0 comments

Describe the bug I'm attempting to use 2 instances of the "dynatrace_document" resource to apply in Terraform. The two instances of this are to deploy a test dashboard and a test notebook respectively. Both of these resources contain DQL elements. My project has been configured with the proper provider token from my SaaS Dynatrace instance, as well as a proper Automation client with the correct scopes.

The content field on both of these resources point to a the location of the json files I'm attempting to deploy (one for a dashboard and one for a notebook, each of which I previously created in the Dynatrace UI, downloaded, and then deleted so that I could deploy them through Terraform).

When running a terraform apply, the plan looks to pick up the entire content of the json file, and the run is successful when applying these resources. However, when I go out to my SaaS instance of Dynatrace, the resources are no where to be found.

To Reproduce Steps to reproduce the behavior:

  1. Generate a Terraform project.
  2. Configure said Terraform project with a Dynatrace provider containing the proper SaaS token and Automation client with the proper scopes.
  3. Have a pre-configured Dashboard or Notebook from said SaaS instance of Dynatrace downloaded as a json file.
  4. Add the json file to the project directory.
  5. Create a dynatrace_dashboard resource within the project, referencing the location of the json file.
  6. Run a terraform apply and confirm when plan finishes.
  7. Once the apply has succeeded, check the SaaS instance to see if the resources have been created in Dynatrace.

Expected behavior The Dashboard or Notebook can be found in the SaaS Dynatrace instance.

Screenshots Screenshot 2024-05-07 at 2 17 32 PM These are the resources within the Terraform file.

Screenshot 2024-05-07 at 2 38 42 PM The apply for one of them was successful. A target apply was done in this case to not write over another change within the project, but the same result has occurred while doing a regular apply.

Desktop (please complete the following information):

  • OS: iOS 14.4.1
  • Browser: Chrome
  • IDE: Intellij 2023.3.4 (Ultimate Edition)

caleb-long-vad2r4 avatar May 07 '24 20:05 caleb-long-vad2r4