Terraform 嵌入多行字符串的地形输出,在输出中连接新行
我正在使用带有here字符串的资源:Terraform 嵌入多行字符串的地形输出,在输出中连接新行,terraform,datadog,Terraform,Datadog,我正在使用带有here字符串的资源: resource "datadog_monitor" "test" { name = "test" type = "metric alert" message = <<EOF {{#is_alert}} aaaaaaaaa {{/is_alert}} {{#is_warning}} bbbbbbbb {{/is_warning}
resource "datadog_monitor" "test" {
name = "test"
type = "metric alert"
message = <<EOF
{{#is_alert}}
aaaaaaaaa
{{/is_alert}}
{{#is_warning}}
bbbbbbbb
{{/is_warning}}
{{#is_recovery}}
cccccccc
{{/is_recovery}}
EOF
....
有没有一种方法可以让“消息”的输出是多行的,而不是全部在一行,这样更容易阅读?我知道这是一个老问题,但如果有人想知道该问题的答案:
使用
EOT
(嵌入式opentype)而不是EOF
(文件结尾)我知道这是一个老问题,但如果有人想知道该问题的答案:
使用
EOT
(嵌入式opentype)而不是EOF
(文件末尾)我在其他资源中也遇到过这个问题。。。但从来没有真正困扰我太多,我没有看到一种方式去周围。。。也许打开一个功能请求:我在其他资源中也遇到过这个问题。。。但从来没有真正困扰我太多,我没有看到一种方式去周围。。。可能会打开一个功能请求:
+ resource "datadog_monitor" "test" {
+ evaluation_delay = 900
+ id = (known after apply)
+ include_tags = true
+ locked = false
+ message = "{{#is_alert}}\n aaaaa\n aaaaa\n {{/is_alert}}\n\n {{#is_warning}}\n bbbbbbbb\n {{/is_warning}}\n\n {{#is_recovery}}\n cccccccc\n {{/is_recovery}}\n
......