terraform_validate
terraform_validate copied to clipboard
Doesn't Support Terraform 0.12 Syntax
If I have something like this in my .tf file then terraform_validate will error out:
resource "aws_iam_role_policy_attachment" "service-policy-attachment-default" {
role = aws_iam_role.service-role-default.name
policy_arn = aws_iam_policy.service-policy-default.arn
}
If I change the tf to this, then it works great:
resource "aws_iam_role_policy_attachment" "service-policy-attachment-default" {
role = "${aws_iam_role.service-role-default.name}"
policy_arn = "${aws_iam_policy.service-policy-default.arn}"
}
Error message:
Traceback (most recent call last):
File "/Users/jeff.wenzbauer/git/cicd-iam-service-roles/test/tests.py", line 10, in setUp
self.v = terraform_validate.Validator(self.path)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/terraform_validate/terraform_validate.py", line 431, in __init__
self.terraform_config = self.parse_terraform_directory(path)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/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 /Users/jeff.wenzbauer/git/cicd-iam-service-roles/test/../test/service-role-default.tf
Line 45, column 1215: unexpected IDENTIFIER
From this, I am guessing that terraform 0.12 syntax is not supported? Are there any plans to add support for this?