Skip to content
This repository has been archived by the owner on Aug 14, 2021. It is now read-only.

Doesn't appear to handle HCL multiline String syntax #5

Open
bgehman opened this issue Apr 13, 2017 · 0 comments
Open

Doesn't appear to handle HCL multiline String syntax #5

bgehman opened this issue Apr 13, 2017 · 0 comments

Comments

@bgehman
Copy link

bgehman commented Apr 13, 2017

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'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant