cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Terraform plan doesn't find changes in exported Dynatrace tf files

Slawa
Advisor

1. Exported session replay web privacy: 
> $DYNATRACE_TERRAFORM_BIN -export -ref -id dynatrace_session_replay_web_privacy

Slawa_0-1690805159293.png

 



2. Added variables: in ___variables___.tf

 

variable "dynatrace_web_application" {
  type = any
}

variable "dynatrace_web_application_playback_masking_preset" {
  type    = string
  default = "MASK_USER_INPUT"
}

variable "dynatrace_web_application_recording_masking_preset" {
  type    = string
  default = "MASK_USER_INPUT"
}
			

 

 3. Changed one of configs:

 

# ID vu9U3hXa3q0AAAABAC1idWlsdGluOnNlc3Npb25yZXBsYXkud2ViLnByaXZhY3ktcHJlZmVyZW5jZXMAC0FQUExJQ0FUSU9OABAwQjJBRUU3QzlBNENBRjNDACQ2MjVjNGZiYi02NmU5LTNiZGYtYWUyYS03YWM2MzdiM2EzNTK-71TeFdrerQ
resource "dynatrace_session_replay_web_privacy" "APPLICATION-0B2AEE7C9A4CAF3C" {
  application_id     = "APPLICATION-0B2AEE7C9A4CAF3C"
  enable_opt_in_mode = false
  masking_presets {
    playback_masking_preset  = "${var.dynatrace_web_application_playback_masking_preset}"
    recording_masking_preset = "${var.dynatrace_web_application_recording_masking_preset}"
  }
}

 

4. terraform plan: No changes. Your infrastructure matches the configuration.
I don't found an answer from docs:
https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/guides/export-v2#-id
On terraform sources mentioned the plan logic is up to provider.


2 REPLIES 2

Fin_Ubels
Dynatrace Champion
Dynatrace Champion

Hey Slawa,

Unless someone has an answer here I would recommend opening a Github issue for the provider, the team that maintains it is generally very active and should be able to assist.

Issues · dynatrace-oss/terraform-provider-dynatrace (github.com)

Slawa
Advisor

I found my mistake.
It was'n mentioned in explicily, but need to define modules(folders with files) to start traking changes after init:
e.g.

module "slo_v2n" {
source = "./configuration/modules/slo_v2n"
}

 

Featured Posts