I am using a variable of type list(object) and values in the list are of type string.
My terraform version is - v1.9.3
I was getting an error as -
│ Error: Unterminated template string
│
│ on <value for var.open_ai_container_spn> line 1:
│ (source code not available)
│
│ No closing marker was found for the string.
╵
╷
│ Error: Invalid multi-line string
│
│ on <value for var.open_ai_container_spn> line 1:
│ (source code not available)
│
│ 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.
And it suggested to use “heredoc” for multiline string. So I am trying it with heredoc, but its giving error as -
The new error you described seems to be a shell syntax error rather than a Terraform error.
When you use a shell script to generate input to Terraform you need to make sure that the shell syntax is valid first, and then that the valid shell syntax generates something that Terraform would accept as valid. You are using code written in one language to generate code written in another language, so it’s important to be mindful of which parts of the input are being handled as which of the two languages.
Currently you have a shell syntax question rather than a Terraform question. That doesn’t mean that folks here won’t be able to help, but you might also wish to ask about this in a context where people discuss whichever shell you are using here.
Apologies for posting it here in terraform forum. That shell script is dependent for my terraform code as I am using it there, so I thought someone might have encountered the same situation.
Also I tried to find an example on the internet about it, but not able to find any correct one.