I have been able to successfully execute Terrascan against the /tests/infrastructure/ files included. When running against simple Terraform templates that that successfully execute both 'terraform plan' and 'terraform apply,' it fails out on every test. Does it support Terraform 0.11.x?
# pathes omitted
C:\<path>\terrascan -l C:\<path> -t all
ERROR: test_aws_alb_listener_certificate (terrascan.checks.encryption.TestEncryption)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\users\<user>\appdata\local\programs\python\python36-32\lib\site-packages\terraform_validate\terraform_validate.py", line 464, in parse_terraform_directory
hcl.loads(new_terraform)
File "c:\users\<user>\appdata\local\programs\python\python36-32\lib\site-packages\hcl\api.py", line 62, in loads
return HclParser().parse(s)
File "c:\users\<user>\appdata\local\programs\python\python36-32\lib\site-packages\hcl\parser.py", line 307, in parse
return self.yacc.parse(s, lexer=Lexer())
File "c:\users\<user>\appdata\local\programs\python\python36-32\lib\site-packages\ply\yacc.py", line 331, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "c:\users\<user>\appdata\local\programs\python\python36-32\lib\site-packages\ply\yacc.py", line 1061, in parseopt_notrack
lookahead = get_token() # Get the next token
File "c:\users\<user>\appdata\local\programs\python\python36-32\lib\site-packages\hcl\lexer.py", line 275, in token
return self.lex.token()
File "c:\users\<user>\appdata\local\programs\python\python36-32\lib\site-packages\ply\lex.py", line 406, in token
newtok = self.lexeoff(tok)
File "c:\users\<user>\appdata\local\programs\python\python36-32\lib\site-packages\hcl\lexer.py", line 222, in t_heredoc_eof
_raise_error(t, 'EOF before closing heredoc')
File "c:\users\<user>\appdata\local\programs\python\python36-32\lib\site-packages\hcl\lexer.py", line 17, in _raise_error
raise ValueError("Line %d, column %d, index %d: %s" % (lineno, column, lexpos, message))
ValueError: Line 98, column 0, index 2138: EOF before closing heredoc
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\<user>\appdata\local\programs\python\python36-32\lib\site-packages\terrascan\checks\encryption.py", line 20, in setUp
self.v = terraform_validate.Validator(self.path)
File "c:\users\<user>\appdata\local\programs\python\python36-32\lib\site-packages\terraform_validate\terraform_validate.py", line 431, in __init__
self.terraform_config = self.parse_terraform_directory(path)
File "c:\users\<user>\appdata\local\programs\python\python36-32\lib\site-packages\terraform_validate\terraform_validate.py", line 466, in parse_terraform_directory
raise TerraformSyntaxException("Invalid terraform configuration in {0}\n{1}".format(os.path.join(directory,file),e))
terraform_validate.terraform_validate.TerraformSyntaxException: Invalid terraform configuration in C:<path>\main.tf
Line 98, column 0, index 2138: EOF before closing heredoc