Skip to content

Commit

Permalink
fix: fix escape
Browse files Browse the repository at this point in the history
  • Loading branch information
JianLi-Expedia committed Nov 20, 2024
1 parent cf606d2 commit e25ba40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions common.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ locals {

ro_ingress_cidr = var.ingress_cidr
rw_ingress_cidr = length(var.rw_ingress_cidr) == 0 ? var.ingress_cidr : var.rw_ingress_cidr
hms_metrics = join("\",\"", var.datadog_metrics_hms_readwrite_readonly)
hms_metrics_type_overrides = join("\": \"gauge\",\"", var.datadog_metrics_hms_readwrite_readonly)
hms_metrics = join("\\\",\\\"", var.datadog_metrics_hms_readwrite_readonly)
hms_metrics_type_overrides = join("\\\": \\\"gauge\\\",\\\"", var.datadog_metrics_hms_readwrite_readonly)
}

data "aws_iam_account_alias" "current" {}
Expand Down
6 changes: 3 additions & 3 deletions templates/apiary-hms-readonly.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
}
},
"dockerLabels": {
"com.datadoghq.ad.instances": '[{ "prometheus_url": "http://%%host%%:8080/actuator/prometheus", "namespace": "${hms_metrics_namespace}", "metrics": ["${hms_metrics}"],"type_overrides":{"${hms_metrics_type_overrides}": "gauge"} }]',
"com.datadoghq.ad.check_names": '["prometheus"]',
"com.datadoghq.ad.init_configs": '[{}]'
"com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]",
"com.datadoghq.ad.check_names": "[\"prometheus\"]",
"com.datadoghq.ad.init_configs": "[{}]"
},
"portMappings": [
{
Expand Down
6 changes: 3 additions & 3 deletions templates/apiary-hms-readwrite.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
}
},
"dockerLabels": {
"com.datadoghq.ad.instances": '[{ "prometheus_url": "http://%%host%%:8080/actuator/prometheus", "namespace": "${hms_metrics_namespace}", "metrics": ["${hms_metrics}"],"type_overrides":{"${hms_metrics_type_overrides}": "gauge"} }]',
"com.datadoghq.ad.check_names": '["prometheus"]',
"com.datadoghq.ad.init_configs": '[{}]'
"com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]",
"com.datadoghq.ad.check_names": "[\"prometheus\"]",
"com.datadoghq.ad.init_configs": "[{}]"
},
"portMappings": [
{
Expand Down

0 comments on commit e25ba40

Please sign in to comment.