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

Dashboards setup in terraform have some parameters changed without user modifying them whenever pipelines are run

Open saadrafique768 opened this issue 1 year ago • 7 comments

Describe the bug The parameter "preset" that is set in dynatrace_dashboard_sharing resource has its value changed whenever we run pipeline in the environment where dashboards are configured in terraform. It randomly changes preset boolean value from false to true and some times from true to false

To Reproduce Steps to reproduce the behavior:

  1. Run pipelines for environment where dashboards configured in terraform exist
  2. make sure to have some dashboards preset value set to true and some to false.
  3. make sure to include "TF_LOG=debug" for more logs
  4. you can find in logs information regarding preset values being changed with header "Terraform detected the following changes made outside of Terraform since the last "terraform apply"

Terraform version running in CI/CD is 1.1.2

Expected behavior preset value changes from false to true and vice versa without user modification

Screenshots

Terraform detected the following changes made outside of Terraform since the
last "terraform apply":
  # dynatrace_dashboard_sharing.x has changed
  ~ resource "dynatrace_dashboard_sharing" "x" {
        id           = "x.id"
      ~ preset       = true -> false
        # (2 unchanged attributes hidden)
        # (1 unchanged block hidden)
    }
  # dynatrace_dashboard_sharing.y will be updated in-place
  ~ resource "dynatrace_dashboard_sharing" "y" {
        id           = "y.id"
      ~ preset       = false -> true
        # (2 unchanged attributes hidden)
        # (1 unchanged block hidden)
    }

Additional context We also found some warnings that could be relatable but not necessarily the main root cause here.

2022-10-13T14:32:15.411Z [WARN]  Provider "registry.terraform.io/dynatrace-oss/dynatrace" produced an invalid plan for dynatrace_dashboard_sharing.z, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .preset: planned value cty.False for a non-computed attribute
      - .permissions[0].permission[0].id: planned value cty.StringVal("") for a non-computed attribute

Really need help with above issue as it is affecting visibility for team on dashboards that need be viewable at all times for all members in the organization.

saadrafique768 avatar Oct 14 '22 09:10 saadrafique768