From 9333b03d8ef2b726d245da8654abc003ea68b25a Mon Sep 17 00:00:00 2001 From: Patryk Gudalewicz Date: Wed, 1 Mar 2023 19:08:50 +0100 Subject: [PATCH] "Migrating from Monaco to Terraform for management zone: CD_emobility-hub-composite-service" --- .../cd_emobility-hub-composite-service.tf | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 NA_PREPROD/management_zone/cd_emobility-hub-composite-service.tf diff --git a/NA_PREPROD/management_zone/cd_emobility-hub-composite-service.tf b/NA_PREPROD/management_zone/cd_emobility-hub-composite-service.tf new file mode 100644 index 00000000..484180c5 --- /dev/null +++ b/NA_PREPROD/management_zone/cd_emobility-hub-composite-service.tf @@ -0,0 +1,95 @@ +# DEFINE dynatrace_management_zone.CD_emobility-hub-composite-service.id = 796178311567520846 +resource "dynatrace_management_zone" "CD_emobility-hub-composite-service" { + name = "CD_emobility-hub-composite-service" + rules { + type = "CLOUD_APPLICATION" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "CLOUD_APPLICATION_NAME" + } + string { + case_sensitive = true + # negate = false + operator = "CONTAINS" + value = "emobility-hub-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 = "emobility-hub-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 = "emobility-hub-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 = "emobility-hub-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 = "emobility-hub-composite-service" + } + } + } + } +}