Closed jeevanions closed 1 year ago
Hello @jeevanions
You can use the data source dynatrace_synthetic_location
to make things a bit more readable - like in this example.
data "dynatrace_synthetic_location" "CapeTown" {
cloud_platform = "AZURE"
type = "PUBLIC"
name = "Cape Town"
}
resource "dynatrace_http_monitor" "TerraTest" {
name = "TerraTest2"
enabled = true
frequency = 1
locations = [ data.dynatrace_synthetic_location.CapeTown.id ]
anomaly_detection {
loading_time_thresholds {
enabled = true
}
outage_handling {
global_outage = true
local_outage = false
retry_on_error = false
global_outage_policy {
consecutive_runs = 1
}
}
}
script {
request {
description = "google.at"
method = "GET"
url = "http://www.google.at/"
configuration {
accept_any_certificate = true
follow_redirects = true
}
validation {
rule {
type = "httpStatusesList"
pass_if_found = false
value = ">=400"
}
}
}
}
}
The data source dynatrace_synthetic_locations
(with an s
at the end) would also be an option here. While dynatrace_synthetic_location
delivers only the first match, dynatrace_synthetic_locations
provides a list of locations.
Is your feature request related to a problem? Please describe. It would be good to have a user friendly name' are used in the
dynatrace_http_monitor
resource. At the moment the list of locations are not easily accessible and not user friendly.Describe the solution you'd like If we can make the locations names user friendly like eastus, uksouth, etc that would make it more easy to use this. Moreover the documentation doesn't give you an example of resources with all its dependencies.
I propose to have something like this.
Describe alternatives you've considered We at the moment use the export utility to get the location name and update the terraform resource.
Additional context NA