Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Invalid multi-line string terraform

Tags:

terraform

I am trying to define a resource but Terraform complains

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
}

error:

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.

I saw Heredoc Strings but not sure how to use this after "resource"

like image 533
Harry Avatar asked Apr 07 '26 20:04

Harry


1 Answers

Same issue at my end, but for me there was syntax error. there was duplicate double quotes. Notice the first line number mentioned in error.

like image 117
Kumar Shishir Avatar answered Apr 10 '26 02:04

Kumar Shishir



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!