diff --git a/CN_PREPROD/alerting/cd_scb_int.tf b/CN_PREPROD/alerting/cd_scb_int.tf index be11b7d8..6ea77526 100644 --- a/CN_PREPROD/alerting/cd_scb_int.tf +++ b/CN_PREPROD/alerting/cd_scb_int.tf @@ -8,31 +8,31 @@ resource "dynatrace_alerting" "CD_scb_INT" { delay_in_minutes = 0 include_mode = "INCLUDE_ALL" severity_level = "AVAILABILITY" - tags = [ "Environment:INT", "Component:scb" ] + tags = [ "Environment:INT" ] } rule { delay_in_minutes = 10 include_mode = "INCLUDE_ALL" severity_level = "CUSTOM_ALERT" - tags = [ "Environment:INT", "Component:scb" ] + tags = [ "Environment:INT" ] } rule { delay_in_minutes = 10 include_mode = "INCLUDE_ALL" severity_level = "ERRORS" - tags = [ "Environment:INT", "Component:scb" ] + tags = [ "Environment:INT" ] } rule { delay_in_minutes = 30 include_mode = "INCLUDE_ALL" severity_level = "PERFORMANCE" - tags = [ "Environment:INT", "Component:scb" ] + tags = [ "Environment:INT" ] } rule { delay_in_minutes = 30 include_mode = "INCLUDE_ALL" severity_level = "RESOURCE_CONTENTION" - tags = [ "Environment:INT", "Component:scb" ] + tags = [ "Environment:INT" ] } } } \ No newline at end of file diff --git a/CN_PREPROD/dashboard/cd_scb_int-test.tf b/CN_PREPROD/dashboard/cd_scb_int-test.tf index 798d6c77..ba119fd6 100644 --- a/CN_PREPROD/dashboard/cd_scb_int-test.tf +++ b/CN_PREPROD/dashboard/cd_scb_int-test.tf @@ -103,7 +103,7 @@ resource "dynatrace_dashboard" "CD_scb_INT-TEST" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Component:scb", "Environment:TEST" ] + values = [ "Environment:TEST" ] } } } @@ -418,7 +418,7 @@ resource "dynatrace_dashboard" "CD_scb_INT-TEST" { entity_type = "DATABASE" match { key = "AUTO_TAGS" - values = [ "Environment:INT", "Component:scb" ] + values = [ "Environment:INT" ] } } } @@ -459,7 +459,7 @@ resource "dynatrace_dashboard" "CD_scb_INT-TEST" { entity_type = "DATABASE" match { key = "AUTO_TAGS" - values = [ "Component:scb", "Environment:TEST" ] + values = [ "Environment:TEST" ] } } } @@ -489,7 +489,7 @@ resource "dynatrace_dashboard" "CD_scb_INT-TEST" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:INT", "Component:scb" ] + values = [ "Environment:INT" ] } } } @@ -519,7 +519,7 @@ resource "dynatrace_dashboard" "CD_scb_INT-TEST" { entity_type = "HOST" match { key = "AUTO_TAGS" - values = [ "Component:scb", "Environment:TEST" ] + values = [ "Environment:TEST" ] } } } @@ -549,7 +549,7 @@ resource "dynatrace_dashboard" "CD_scb_INT-TEST" { entity_type = "HOST" match { key = "AUTO_TAGS" - values = [ "Environment:INT", "Component:scb" ] + values = [ "Environment:INT" ] } } } diff --git a/CN_PREPROD/dashboard/cd_scb_int.tf b/CN_PREPROD/dashboard/cd_scb_int.tf index a0e056a6..ff43b015 100644 --- a/CN_PREPROD/dashboard/cd_scb_int.tf +++ b/CN_PREPROD/dashboard/cd_scb_int.tf @@ -64,7 +64,7 @@ resource "dynatrace_dashboard" "CD_scb_INT" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:INT", "Component:scb" ] + values = [ "Environment:INT" ] } } } @@ -180,7 +180,7 @@ resource "dynatrace_dashboard" "CD_scb_INT" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:INT", "Component:scb" ] + values = [ "Environment:INT" ] } } } @@ -225,7 +225,7 @@ resource "dynatrace_dashboard" "CD_scb_INT" { entity_type = "DATABASE" match { key = "AUTO_TAGS" - values = [ "Environment:INT", "Component:scb" ] + values = [ "Environment:INT" ] } } } @@ -255,7 +255,7 @@ resource "dynatrace_dashboard" "CD_scb_INT" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:INT", "Component:scb" ] + values = [ "Environment:INT" ] } } } @@ -285,7 +285,7 @@ resource "dynatrace_dashboard" "CD_scb_INT" { entity_type = "HOST" match { key = "AUTO_TAGS" - values = [ "Environment:INT", "Component:scb" ] + values = [ "Environment:INT" ] } } } diff --git a/CN_PREPROD/dashboard/cd_scb_test.tf b/CN_PREPROD/dashboard/cd_scb_test.tf index 4219ecac..db8b5ffe 100644 --- a/CN_PREPROD/dashboard/cd_scb_test.tf +++ b/CN_PREPROD/dashboard/cd_scb_test.tf @@ -64,7 +64,7 @@ resource "dynatrace_dashboard" "CD_scb_TEST" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Component:scb", "Environment:TEST" ] + values = [ "Environment:TEST" ] } } } @@ -180,7 +180,7 @@ resource "dynatrace_dashboard" "CD_scb_TEST" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Component:scb", "Environment:TEST" ] + values = [ "Environment:TEST" ] } } } @@ -225,7 +225,7 @@ resource "dynatrace_dashboard" "CD_scb_TEST" { entity_type = "DATABASE" match { key = "AUTO_TAGS" - values = [ "Component:scb", "Environment:TEST" ] + values = [ "Environment:TEST" ] } } } @@ -255,7 +255,7 @@ resource "dynatrace_dashboard" "CD_scb_TEST" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Component:scb", "Environment:TEST" ] + values = [ "Environment:TEST" ] } } } @@ -285,7 +285,7 @@ resource "dynatrace_dashboard" "CD_scb_TEST" { entity_type = "HOST" match { key = "AUTO_TAGS" - values = [ "Component:scb", "Environment:TEST" ] + values = [ "Environment:TEST" ] } } } diff --git a/CN_PREPROD/management_zone/cd_scb.tf b/CN_PREPROD/management_zone/cd_scb.tf index 285d19b5..ea822a3a 100644 --- a/CN_PREPROD/management_zone/cd_scb.tf +++ b/CN_PREPROD/management_zone/cd_scb.tf @@ -51,6 +51,25 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + } + rules { + type = "HOST" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "HOST_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "compass-id" + value = "scb" + } + } + } } rules { type = "PROCESS_GROUP" @@ -71,6 +90,26 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + } + 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 = "compass-id" + value = "scb" + } + } + } } rules { type = "SERVICE" @@ -92,4 +131,24 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + 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 = "compass-id" + value = "scb" + } + } + } + } } diff --git a/CN_PROD/alerting/cd_scb_prod.tf b/CN_PROD/alerting/cd_scb_prod.tf index bb41fe80..0fbc67ff 100644 --- a/CN_PROD/alerting/cd_scb_prod.tf +++ b/CN_PROD/alerting/cd_scb_prod.tf @@ -8,31 +8,31 @@ resource "dynatrace_alerting" "CD_scb_PROD" { delay_in_minutes = 0 include_mode = "INCLUDE_ALL" severity_level = "AVAILABILITY" - tags = [ "Environment:PROD", "Component:scb" ] + tags = [ "Environment:PROD" ] } rule { delay_in_minutes = 10 include_mode = "INCLUDE_ALL" severity_level = "CUSTOM_ALERT" - tags = [ "Environment:PROD", "Component:scb" ] + tags = [ "Environment:PROD" ] } rule { delay_in_minutes = 10 include_mode = "INCLUDE_ALL" severity_level = "ERRORS" - tags = [ "Environment:PROD", "Component:scb" ] + tags = [ "Environment:PROD" ] } rule { delay_in_minutes = 30 include_mode = "INCLUDE_ALL" severity_level = "PERFORMANCE" - tags = [ "Environment:PROD", "Component:scb" ] + tags = [ "Environment:PROD" ] } rule { delay_in_minutes = 30 include_mode = "INCLUDE_ALL" severity_level = "RESOURCE_CONTENTION" - tags = [ "Environment:PROD", "Component:scb" ] + tags = [ "Environment:PROD" ] } } } \ No newline at end of file diff --git a/CN_PROD/dashboard/cd_scb_e2e.tf b/CN_PROD/dashboard/cd_scb_e2e.tf index 351bb906..afcb3b45 100644 --- a/CN_PROD/dashboard/cd_scb_e2e.tf +++ b/CN_PROD/dashboard/cd_scb_e2e.tf @@ -64,7 +64,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } @@ -180,7 +180,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } @@ -225,7 +225,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "DATABASE" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } @@ -255,7 +255,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } @@ -285,7 +285,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "HOST" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } diff --git a/CN_PROD/dashboard/cd_scb_prod.tf b/CN_PROD/dashboard/cd_scb_prod.tf index 0645c500..d67ca7ba 100644 --- a/CN_PROD/dashboard/cd_scb_prod.tf +++ b/CN_PROD/dashboard/cd_scb_prod.tf @@ -64,7 +64,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } @@ -180,7 +180,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } @@ -225,7 +225,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "DATABASE" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } @@ -255,7 +255,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } @@ -285,7 +285,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "HOST" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } diff --git a/CN_PROD/management_zone/cd_scb.tf b/CN_PROD/management_zone/cd_scb.tf index 303ffa1d..8369a9a7 100644 --- a/CN_PROD/management_zone/cd_scb.tf +++ b/CN_PROD/management_zone/cd_scb.tf @@ -51,6 +51,25 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + } + rules { + type = "HOST" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "HOST_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "compass-id" + value = "scb" + } + } + } } rules { type = "PROCESS_GROUP" @@ -71,6 +90,26 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + } + 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 = "compass-id" + value = "scb" + } + } + } } rules { type = "SERVICE" @@ -92,4 +131,24 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + 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 = "compass-id" + value = "scb" + } + } + } + } } diff --git a/EMEA_PREPROD/management_zone/cd_scb.tf b/EMEA_PREPROD/management_zone/cd_scb.tf index fa510ed8..9d18f1fb 100644 --- a/EMEA_PREPROD/management_zone/cd_scb.tf +++ b/EMEA_PREPROD/management_zone/cd_scb.tf @@ -51,6 +51,25 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + } + rules { + type = "HOST" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "HOST_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "compass-id" + value = "scb" + } + } + } } rules { type = "PROCESS_GROUP" @@ -71,6 +90,26 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + } + 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 = "compass-id" + value = "scb" + } + } + } } rules { type = "SERVICE" @@ -92,4 +131,24 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + 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 = "compass-id" + value = "scb" + } + } + } + } } diff --git a/EMEA_PROD/dashboard/cd_scb_e2e.tf b/EMEA_PROD/dashboard/cd_scb_e2e.tf index e9a2445e..5637a53b 100644 --- a/EMEA_PROD/dashboard/cd_scb_e2e.tf +++ b/EMEA_PROD/dashboard/cd_scb_e2e.tf @@ -67,7 +67,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } @@ -195,7 +195,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } @@ -246,7 +246,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "DATABASE" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } @@ -279,7 +279,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } @@ -312,7 +312,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "HOST" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } diff --git a/EMEA_PROD/dashboard/cd_scb_prod.tf b/EMEA_PROD/dashboard/cd_scb_prod.tf index 6e697760..f7cde9ae 100644 --- a/EMEA_PROD/dashboard/cd_scb_prod.tf +++ b/EMEA_PROD/dashboard/cd_scb_prod.tf @@ -67,7 +67,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } @@ -195,7 +195,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } @@ -246,7 +246,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "DATABASE" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } @@ -279,7 +279,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } @@ -312,7 +312,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "HOST" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } diff --git a/EMEA_PROD/management_zone/cd_scb.tf b/EMEA_PROD/management_zone/cd_scb.tf index 203a5297..97999160 100644 --- a/EMEA_PROD/management_zone/cd_scb.tf +++ b/EMEA_PROD/management_zone/cd_scb.tf @@ -51,6 +51,25 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + } + rules { + type = "HOST" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "HOST_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "compass-id" + value = "scb" + } + } + } } rules { type = "PROCESS_GROUP" @@ -71,6 +90,26 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + } + 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 = "compass-id" + value = "scb" + } + } + } } rules { type = "SERVICE" @@ -92,4 +131,24 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + 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 = "compass-id" + value = "scb" + } + } + } + } } diff --git a/NA_PREPROD/dashboard/cd_scb_int.tf b/NA_PREPROD/dashboard/cd_scb_int.tf index f596a61a..bbe2eec6 100644 --- a/NA_PREPROD/dashboard/cd_scb_int.tf +++ b/NA_PREPROD/dashboard/cd_scb_int.tf @@ -67,7 +67,7 @@ resource "dynatrace_dashboard" "CD_scb_INT" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:INT", "Component:scb" ] + values = [ "Environment:INT" ] } } } @@ -195,7 +195,7 @@ resource "dynatrace_dashboard" "CD_scb_INT" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:INT", "Component:scb" ] + values = [ "Environment:INT" ] } } } @@ -246,7 +246,7 @@ resource "dynatrace_dashboard" "CD_scb_INT" { entity_type = "DATABASE" match { key = "AUTO_TAGS" - values = [ "Environment:INT", "Component:scb" ] + values = [ "Environment:INT" ] } } } @@ -279,7 +279,7 @@ resource "dynatrace_dashboard" "CD_scb_INT" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:INT", "Component:scb" ] + values = [ "Environment:INT" ] } } } @@ -312,7 +312,7 @@ resource "dynatrace_dashboard" "CD_scb_INT" { entity_type = "HOST" match { key = "AUTO_TAGS" - values = [ "Environment:INT", "Component:scb" ] + values = [ "Environment:INT" ] } } } diff --git a/NA_PREPROD/dashboard/cd_scb_test.tf b/NA_PREPROD/dashboard/cd_scb_test.tf index d3c05fd3..6f49e563 100644 --- a/NA_PREPROD/dashboard/cd_scb_test.tf +++ b/NA_PREPROD/dashboard/cd_scb_test.tf @@ -67,7 +67,7 @@ resource "dynatrace_dashboard" "CD_scb_TEST" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Component:scb", "Environment:TEST" ] + values = [ "Environment:TEST" ] } } } @@ -195,7 +195,7 @@ resource "dynatrace_dashboard" "CD_scb_TEST" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Component:scb", "Environment:TEST" ] + values = [ "Environment:TEST" ] } } } @@ -246,7 +246,7 @@ resource "dynatrace_dashboard" "CD_scb_TEST" { entity_type = "DATABASE" match { key = "AUTO_TAGS" - values = [ "Component:scb", "Environment:TEST" ] + values = [ "Environment:TEST" ] } } } @@ -279,7 +279,7 @@ resource "dynatrace_dashboard" "CD_scb_TEST" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Component:scb", "Environment:TEST" ] + values = [ "Environment:TEST" ] } } } @@ -312,7 +312,7 @@ resource "dynatrace_dashboard" "CD_scb_TEST" { entity_type = "HOST" match { key = "AUTO_TAGS" - values = [ "Component:scb", "Environment:TEST" ] + values = [ "Environment:TEST" ] } } } diff --git a/NA_PREPROD/management_zone/cd_scb.tf b/NA_PREPROD/management_zone/cd_scb.tf index b96e0ec2..189f4fb8 100644 --- a/NA_PREPROD/management_zone/cd_scb.tf +++ b/NA_PREPROD/management_zone/cd_scb.tf @@ -51,6 +51,25 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + } + rules { + type = "HOST" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "HOST_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "compass-id" + value = "scb" + } + } + } } rules { type = "PROCESS_GROUP" @@ -71,6 +90,26 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + } + 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 = "compass-id" + value = "scb" + } + } + } } rules { type = "SERVICE" @@ -92,4 +131,24 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + 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 = "compass-id" + value = "scb" + } + } + } + } } diff --git a/NA_PROD/dashboard/cd_scb_e2e.tf b/NA_PROD/dashboard/cd_scb_e2e.tf index 90f14f42..5a3e286c 100644 --- a/NA_PROD/dashboard/cd_scb_e2e.tf +++ b/NA_PROD/dashboard/cd_scb_e2e.tf @@ -67,7 +67,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } @@ -195,7 +195,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } @@ -246,7 +246,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "DATABASE" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } @@ -279,7 +279,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } @@ -312,7 +312,7 @@ resource "dynatrace_dashboard" "CD_scb_E2E" { entity_type = "HOST" match { key = "AUTO_TAGS" - values = [ "Environment:E2E", "Component:scb" ] + values = [ "Environment:E2E" ] } } } diff --git a/NA_PROD/dashboard/cd_scb_prod.tf b/NA_PROD/dashboard/cd_scb_prod.tf index 3b4999c9..a72dee98 100644 --- a/NA_PROD/dashboard/cd_scb_prod.tf +++ b/NA_PROD/dashboard/cd_scb_prod.tf @@ -67,7 +67,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } @@ -195,7 +195,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } @@ -246,7 +246,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "DATABASE" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } @@ -279,7 +279,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "SERVICE" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } @@ -312,7 +312,7 @@ resource "dynatrace_dashboard" "CD_scb_PROD" { entity_type = "HOST" match { key = "AUTO_TAGS" - values = [ "Environment:PROD", "Component:scb" ] + values = [ "Environment:PROD" ] } } } diff --git a/NA_PROD/management_zone/cd_scb.tf b/NA_PROD/management_zone/cd_scb.tf index 64de8574..fafb26b5 100644 --- a/NA_PROD/management_zone/cd_scb.tf +++ b/NA_PROD/management_zone/cd_scb.tf @@ -51,6 +51,25 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + } + rules { + type = "HOST" + enabled = true + conditions { + key { + type = "STATIC" + attribute = "HOST_TAGS" + } + tag { + # negate = false + operator = "EQUALS" + value { + context = "CONTEXTLESS" + key = "compass-id" + value = "scb" + } + } + } } rules { type = "PROCESS_GROUP" @@ -71,6 +90,26 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + } + 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 = "compass-id" + value = "scb" + } + } + } } rules { type = "SERVICE" @@ -92,4 +131,24 @@ resource "dynatrace_management_zone" "CD_scb" { } } } + 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 = "compass-id" + value = "scb" + } + } + } + } }