【发布时间】:2021-07-28 16:51:30
【问题描述】:
我正在尝试定义资源,但 Terraform 抱怨
resource "aws_cloudwatch_event_target" "my-functions-order-machine-completion-target" {
target_id = "some target id"
rule = aws_cloudwatch_event_rule.my-functions-order-machine-completion-rule.name
arn = module.lambda["myLambda"].function_arn
}
错误:
Quoted strings may not be split over multiple lines. To produce a multi-line
string, either use the \n escape to represent a newline character or use the
"heredoc" multi-line template syntax.
我看到Heredoc Strings,但不知道如何在“资源”之后使用它
【问题讨论】:
-
aws_cloudwatch_event_rule.my-functions-order-machine-completion-rule之后应该有一个.name。 -
是的,抱歉打错了
-
错误信息与显示的代码无关。你想做什么,在哪里,发生了什么错误,到底在哪里!?
-
在 TF 运行时基本上更新了格式,它抱怨字符串不能分成多行
标签: terraform