You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to exclude all the Dynatrace Public Synthetic locations from the Web Application Capturing, to do this in terraform I need to first use the API to query each locations to bring back the IP addresses and then construct a very ugly piece of code like this
monitoring_settings {
ip_address_restriction_settings {
mode = "EXCLUDE"
restrictions {
range {
address = "1.1.1.1"
}
range {
address = "1.1.1.2"
}
range {
address = "1.1.1.3"
}
range {
address = "1.1.1.4"
}
range {
address = "1.1.1.5"
}
range {
address = "1.1.1.6"
}
range {
address = "1.1.1.2"
}
range {
address = "1.1.1.2"
}
range {
address = "1.1.1.2"
}
range {
address = "1.1.1.2"
}
}
}
This cumbersome when the list of IP addresses is many, I have ~50 to account for
Describe the solution you'd like
I would like to be able to pull all the IP addresses for a Dynatrace Public Synthetic location using the locaiton ID. Use the returned IP addresses in the code without having to type them out.
data "dynatrace_synthetic_locations" "all" {}
locals {
synthetic_ips = flatten([
for location in data.dynatrace_synthetic_locations.all.locations : location.ips
])
}
resource "dynatrace_web_application" "example" {
name = "example"
type = "AUTO_INJECTED"
cost_control_user_session_percentage = 100
load_action_key_performance_metric = "VISUALLY_COMPLETE"
real_user_monitoring_enabled = true
xhr_action_key_performance_metric = "VISUALLY_COMPLETE"
monitoring_settings {
ip_address_restriction_settings {
mode = "EXCLUDE"
restrictions {
range {
for_each = toset(local.synthetic_ips)
address = each.value
}
}
}
}
Be able to use for_each within ip_address_restriction_settings that calls a list of IPs from locals if we have a lot of IPs to exclude that are not Dynatrace IPs
Create a separate resource dynatrace_web_application_restricted_ips that allows us to use for_each on that resource
Describe alternatives you've considered
I have to write out each IP address manually and it's very ugly and I have to keep checking if the Dynatrace Synthetic Public Ip have changed
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
**Is your feature request related to a problem?
I want to exclude all the Dynatrace Public Synthetic locations from the Web Application Capturing, to do this in terraform I need to first use the API to query each locations to bring back the IP addresses and then construct a very ugly piece of code like this
This cumbersome when the list of IP addresses is many, I have ~50 to account for
Describe the solution you'd like
Describe alternatives you've considered
I have to write out each IP address manually and it's very ugly and I have to keep checking if the Dynatrace Synthetic Public Ip have changed
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: