Parsing this file:
provider "aws" {
region = "us-west-1"
}
resource "aws_iam_role" "consumer" {
name = "consumer"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
EOF
lifecycle {
create_before_destroy = true
}
}
results in this error:
HCLLexer::ScanError: can not match: '<<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
EOF
lifecycle {
create_before_destroy = true
}
}
'
from /Users/pschipitsch/repos/ruby-hcl-upstream/lib/hcl/lexer.rb:110:in `_next_token'
from /Users/pschipitsch/repos/ruby-hcl-upstream/lib/hcl/lexer.rb:50:in `next_token'
from /Users/pschipitsch/repos/ruby-hcl-upstream/lib/hcl/lexer.rb:122:in `lex'
from parse.y:144:in `parse'
from (irb):2
from /Users/pschipitsch/.rbenv/versions/2.2.2/bin/irb:11:in `<main>'
Parsing this file:
results in this error: