adds terrascan tests

This commit is contained in:
Cesar Rodriguez 2020-07-22 22:36:59 -04:00
parent ea9ad2c3fb
commit 3f6a75e9ac
4 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,9 @@
resource "aws_instance" "bad" {
ami = "ami-0ff8a91507f77f867"
instance_type = "t2.small"
associate_public_ip_address = true
ebs_block_device {
encrypted = false
}
}

View file

@ -0,0 +1,9 @@
resource "aws_instance" "good" {
ami = "ami-0ff8a91507f77f867"
instance_type = "t2.small"
associate_public_ip_address = false
ebs_block_device {
encrypted = true
}
}

View file

@ -0,0 +1,7 @@
TAP version 13
1..2
not ok 1 - terraform_bad_1.tf
---
message: Failed to load configurations. 1 error(s) occurred \n\nError Invalid expression\n\n on /tmp/lint/.automation/test/terraform/bad/terraform_bad_1.tf line 3, in resource "aws_instance" "bad" \n 3 instance_type = # invalid type!\n 4 }\n\nExpected the start of an expression, but found an invalid expression token.\n
...
ok 2 - terraform_good_1.tf