Compare commits

...

2 Commits

Author SHA1 Message Date
Patryk Gudalewicz f2fa06905f "Migrating from Monaco to Terraform for management zone: CD_SMACC_BE" 2023-03-01 18:57:39 +01:00
Patryk Gudalewicz c5a505292c "Migrating from Monaco to Terraform for management zone: CD_SMACC_BE" 2023-03-01 18:47:31 +01:00
2 changed files with 472 additions and 0 deletions

View File

@ -0,0 +1,212 @@
# DEFINE dynatrace_management_zone.CD_SMACC_BE.id = 4385063573403167214
resource "dynatrace_management_zone" "CD_SMACC_BE" {
name = "CD_SMACC_BE"
rules {
type = "SERVICE"
enabled = true
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
# negate = false
operator = "CONTAINS"
value = "public n"
}
}
}
rules {
type = "SERVICE"
enabled = true
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
# negate = false
operator = "CONTAINS"
value = "unmonitored"
}
}
}
rules {
type = "SERVICE"
enabled = true
propagation_types = [ "SERVICE_TO_HOST_LIKE", "SERVICE_TO_PROCESS_GROUP_LIKE" ]
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "HealthResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "MetricsResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "PingResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "PrometheusResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_TAGS"
}
tag {
# negate = false
operator = "EQUALS"
value {
context = "CONTEXTLESS"
key = "Component"
value = "SMACC-BE"
}
}
}
}
rules {
type = "SERVICE"
enabled = true
propagation_types = [ "SERVICE_TO_HOST_LIKE", "SERVICE_TO_PROCESS_GROUP_LIKE" ]
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "HealthResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "MetricsResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "PingResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "PrometheusResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_TAGS"
}
tag {
# negate = false
operator = "EQUALS"
value {
context = "CONTEXTLESS"
key = "Component"
value = "SMACC-KTS"
}
}
}
}
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 = "SMACC-BE"
}
}
}
}
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 = "SMACC-KTS"
}
}
}
}
}

View File

@ -0,0 +1,260 @@
# DEFINE dynatrace_management_zone.CD_SMACC_BE.id = 3956159049968100981
resource "dynatrace_management_zone" "CD_SMACC_BE" {
name = "CD_SMACC_BE"
entity_selector_based_rule {
# enabled = false
selector = "type(PROCESS_GROUP_INSTANCE),tag('ms-id:smc2-bl')"
}
entity_selector_based_rule {
enabled = true
selector = "type(Service),tag(\"ms-id:smc2-bl\")"
}
entity_selector_based_rule {
# enabled = false
selector = "type(HOST),tag('msid:smc2-bl')"
}
entity_selector_based_rule {
# enabled = false
selector = "type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag('msid:smc2-bl'))"
}
entity_selector_based_rule {
# enabled = false
selector = "type(PROCESS_GROUP_INSTANCE),tag('msid:smc2-bl')"
}
entity_selector_based_rule {
enabled = true
selector = "type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag(\"ms-id:smc2-bl\"))"
}
entity_selector_based_rule {
enabled = true
selector = "type(HOST),tag(\"ms-id:smc2-bl\")"
}
entity_selector_based_rule {
# enabled = false
selector = "type(Service),tag('msid:smc2-bl')"
}
entity_selector_based_rule {
enabled = true
selector = "type(PROCESS_GROUP_INSTANCE),tag(\"ms-id:smc2-bl\")"
}
entity_selector_based_rule {
# enabled = false
selector = "type(Service),tag('ms-id:smc2-bl')"
}
entity_selector_based_rule {
# enabled = false
selector = "type(HOST),tag('ms-id:smc2-bl')"
}
entity_selector_based_rule {
# enabled = false
selector = "type(SERVICE),databaseName.exists(),toRelationship.calls(type(SERVICE),tag('ms-id:smc2-bl'))"
}
rules {
type = "SERVICE"
# enabled = false
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
# negate = false
operator = "CONTAINS"
value = "public n"
}
}
}
rules {
type = "SERVICE"
# enabled = false
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
# negate = false
operator = "CONTAINS"
value = "unmonitored"
}
}
}
rules {
type = "SERVICE"
# enabled = false
propagation_types = [ "SERVICE_TO_HOST_LIKE", "SERVICE_TO_PROCESS_GROUP_LIKE" ]
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "HealthResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "MetricsResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "PingResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "PrometheusResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_TAGS"
}
tag {
# negate = false
operator = "EQUALS"
value {
context = "CONTEXTLESS"
key = "Component"
value = "SMACC-BE"
}
}
}
}
rules {
type = "SERVICE"
# enabled = false
propagation_types = [ "SERVICE_TO_HOST_LIKE", "SERVICE_TO_PROCESS_GROUP_LIKE" ]
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "HealthResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "MetricsResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "PingResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_NAME"
}
string {
case_sensitive = true
negate = true
operator = "EQUALS"
value = "PrometheusResource"
}
}
conditions {
key {
type = "STATIC"
attribute = "SERVICE_TAGS"
}
tag {
# negate = false
operator = "EQUALS"
value {
context = "CONTEXTLESS"
key = "Component"
value = "SMACC-KTS"
}
}
}
}
rules {
type = "PROCESS_GROUP"
# enabled = false
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 = "SMACC-BE"
}
}
}
}
rules {
type = "PROCESS_GROUP"
# enabled = false
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 = "SMACC-KTS"
}
}
}
}
}