From dcc97ab0b96f9cf045ea52da8b7e5407028945e3 Mon Sep 17 00:00:00 2001 From: Cesar Rodriguez Date: Thu, 23 Jul 2020 23:33:17 -0400 Subject: [PATCH] Simplify test --- .../bad/terraform_bad_1.tf | 2 +- .../reports/expected-TERRAFORM.tap | 21 ++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.automation/test/terraform_terrascan/bad/terraform_bad_1.tf b/.automation/test/terraform_terrascan/bad/terraform_bad_1.tf index f2f87778..57b891dc 100644 --- a/.automation/test/terraform_terrascan/bad/terraform_bad_1.tf +++ b/.automation/test/terraform_terrascan/bad/terraform_bad_1.tf @@ -4,6 +4,6 @@ resource "aws_instance" "bad" { associate_public_ip_address = true ebs_block_device { - encrypted = false + encrypted = true } } diff --git a/.automation/test/terraform_terrascan/reports/expected-TERRAFORM.tap b/.automation/test/terraform_terrascan/reports/expected-TERRAFORM.tap index 3434675d..6fcc7cb9 100644 --- a/.automation/test/terraform_terrascan/reports/expected-TERRAFORM.tap +++ b/.automation/test/terraform_terrascan/reports/expected-TERRAFORM.tap @@ -1,7 +1,22 @@ 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 - ... + terrascan version 0.2.3 + Logging level set to error. + ........................................................................ + ---------------------------------------------------------------------- + Ran 72 tests in 0.008s + + OK + + Processed 1 files in /tmp/lint/.terrascan + + + Processed on 07/24/2020 at 03:22 + Results (took 0.42 seconds): + + Failures: (1) + [high] [aws_instance.bad.associate_public_ip_address] should not be 'True'. Is: 'True' in module .terrascan, file /tmp/lint/.terrascan/terraform_bad_1.tf + + Errors: (0) ok 2 - terraform_good_1.tf