Doesn't appear to handle HCL multiline String syntax
Opened this issue · 0 comments
bgehman commented
As described here: https://www.terraform.io/docs/configuration/syntax.html
Multiline strings can use shell-style "here doc" syntax, with the string starting with a marker like <<EOF and then the string ending with EOF on a line of its own. The lines of the string and the end marker must not be indented.
It does not appear the Rhcl.parse() handles this syntax. Testing with example from https://www.terraform.io/docs/providers/vault/r/generic_secret.html
resource "vault_generic_secret" "example" {
path = "secret/foo"
data_json = <<EOT
{
"foo": "bar",
"pizza": "cheese"
}
EOT
}
parser fails with:
Racc::ParseError: parse error on value: <<EOT
1: resource "vault_generic_secret" "example" {
2: path = "secret/foo"
3:
* 4: data_json = __<<EOT__
5: {
6: "foo": "bar",
7: "pizza": "cheese"
parse.y:225:in `raise_error'
parse.y:192:in `on_error'
parse.y:173:in `scan'
parse.y:188:in `parse'
parse.y:230:in `parse'