"Migrating from Monaco to Terraform for management zone: CD_XCC"

CD_XCC
Patryk Gudalewicz 2023-03-01 18:58:35 +01:00
parent 7fbb69661d
commit 60beecbe5e
1 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1,84 @@
# DEFINE dynatrace_management_zone.CD_XCC.id = -8695410134780987301
resource "dynatrace_management_zone" "CD_XCC" {
name = "CD_XCC"
entity_selector_based_rule {
enabled = true
selector =<<-EOT
type(Service),tag("compass-id:xcc-campaigns","compass-id:xcc-settings","compass-id:xcc-statistics","compass-id:xcc-cmgr","compass-id:xcc-users","compass-id:xcc-next-campaigns","compass-id:xcc-next-legacy-facade")
EOT
}
entity_selector_based_rule {
enabled = true
selector =<<-EOT
type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag("compass-id:xcc-campaigns","compass-id:xcc-settings","compass-id:xcc-statistics","compass-id:xcc-cmgr","compass-id:xcc-users","compass-id:xcc-next-campaigns","compass-id:xcc-next-legacy-facade"))
EOT
}
entity_selector_based_rule {
enabled = true
selector =<<-EOT
type(PROCESS_GROUP_INSTANCE),tag("compass-id:xcc-campaigns","compass-id:xcc-settings","compass-id:xcc-statistics","compass-id:xcc-cmgr","compass-id:xcc-users","compass-id:xcc-next-campaigns","compass-id:xcc-next-legacy-facade")
EOT
}
entity_selector_based_rule {
enabled = true
selector =<<-EOT
type(HOST),tag("compass-id:xcc-campaigns","compass-id:xcc-settings","compass-id:xcc-statistics","compass-id:xcc-cmgr","compass-id:xcc-users","compass-id:xcc-next-campaigns","compass-id:xcc-next-legacy-facade")
EOT
}
entity_selector_based_rule {
enabled = true
selector =<<-EOT
type(Service),tag("app-id:APP-18886","[AWS]APP-ID:APP-18886")
EOT
}
entity_selector_based_rule {
enabled = true
selector =<<-EOT
type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag("app-id:APP-18886","[AWS]APP-ID:APP-18886"))
EOT
}
entity_selector_based_rule {
enabled = true
selector =<<-EOT
type(PROCESS_GROUP_INSTANCE),tag("app-id:APP-18886","[AWS]APP-ID:APP-18886")
EOT
}
entity_selector_based_rule {
enabled = true
selector =<<-EOT
type(HOST),tag("app-id:APP-18886","[AWS]APP-ID:APP-18886")
EOT
}
rules {
type = "AWS_RELATIONAL_DATABASE_SERVICE"
# enabled = false
conditions {
key {
type = "STATIC"
attribute = "AWS_RELATIONAL_DATABASE_SERVICE_DB_NAME"
}
string {
case_sensitive = true
# negate = false
operator = "BEGINS_WITH"
value = "xcc_next"
}
}
}
rules {
type = "AWS_ACCOUNT"
# enabled = false
conditions {
key {
type = "STATIC"
attribute = "AWS_ACCOUNT_ID"
}
string {
case_sensitive = true
# negate = false
operator = "EQUALS"
value = "486530126820"
}
}
}
}