From ab3f778ba8f5b19653670cebb851f42124389280 Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 18:52:55 +0100 Subject: [PATCH] "Migrating from Monaco to Terraform for management zone: CD_route-composite-service" --- .../cd_route-composite-service.tf | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 CN_PROD/management_zone/cd_route-composite-service.tf diff --git a/CN_PROD/management_zone/cd_route-composite-service.tf b/CN_PROD/management_zone/cd_route-composite-service.tf new file mode 100644 index 00000000..2dc924f0 --- /dev/null +++ b/CN_PROD/management_zone/cd_route-composite-service.tf @@ -0,0 +1,96 @@ +# DEFINE dynatrace_management_zone.CD_route-composite-service.id = 1166619620293728553 +resource "dynatrace_management_zone" "CD_route-composite-service" { + name = "CD_route-composite-service" + description = "route composite service management zone" + rules { + type = "CLOUD_APPLICATION" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "route-composite-service" + } + } + } + rules { + type = "CLOUD_APPLICATION_NAMESPACE" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAMESPACE_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "route-composite-service" + } + } + } + rules { + type = "HOST" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "HOST_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "route-composite-service" + } + } + } + } + rules { + type = "PROCESS_GROUP" + enabled = true + propagation_types = [ "PROCESS_GROUP_TO_HOST" ] + conditions { + key { + type = "STATIC" + attribute = "PROCESS_GROUP_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "route-composite-service" + } + } + } + } + rules { + type = "SERVICE" + enabled = true + propagation_types = [ "SERVICE_TO_HOST_LIKE", "SERVICE_TO_PROCESS_GROUP_LIKE" ] + conditions { + key { + type = "STATIC" + attribute = "SERVICE_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "Component" + value = "route-composite-service" + } + } + } + } +}