terrascan icon indicating copy to clipboard operation
terrascan copied to clipboard

Terraform Enterprise modules & resource based exception

Open ArMyBoT opened this issue 2 years ago • 0 comments

Dear all, I tried as specified here https://github.com/tenable/terrascan#How_to_exclude_a_policy_while_scanning_a_resource It seems to not working on resource based exception within a module hosted in a terraform enterprise platform.

module "ec2" {
  source  = "my-tfe-here.net/ec2-instance/aws"
  version = "1.0.0"
 #ts:skip=AC_AWS_0479 skipped for testing purposes
  ...
}

It detects correctly the failed check but not the resource based exception (i.e. obliged to proceed with global)

Instead, within a resource block

resource "aws_instance" "terrascan" {
  #ts:skip=AC_AWS_0479 skipped for testing purposes
  #ts:skip=AC_AWS_0153 skipped for testing purposes
...
}

is correcly parsed and treated.

terrascan version: v1.15.0

Any suggestion?

Thanks

ArMyBoT avatar Jul 05 '22 14:07 ArMyBoT