You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was my bad.
After replacing cidr "0.0.0.0/0" with ["0.0.0.0/0"], terrascan detected the violation.
If I set variables default value in sg/variables.tf (cidrs default = ["0.0.0.0/0"]) and run terrascan in modules directory, then it fails with panic: not a string which is already reported.
$ cd sg
$ cat variables.tf
variable "vpc_id" {
type = string
description = "VPC ID in which to deploy RDS"
default = "vpc-123"
}
variable "company" {
description = "Name of the Company"
default = "test"
}
variable "environment" {
description = "The aws environment"
default = "test"
}
variable "application" {
description = "Application purpose of resource"
default = "test"
}
variable "cidrs" {
description = "[List] IP CIDRs to whitelist in the passwork's security group"
type = list(string)
default = ["0.0.0.0/0"]
}
$ terrascan scan .
panic: not a string
goroutine 1 [running]:
github.com/zclconf/go-cty/cty.Value.AsString(0x61dd120, 0xc000643cf0, 0x5e56d00, 0xc004952510, 0xc004952510, 0x61dd120)
github.com/zclconf/go-cty@v1.2.1/cty/value_ops.go:1173 +0x1a5
Description
and module content:
It can't find any violation.
tfsec and checkov can find the issue with ssh allow from all.
and
The text was updated successfully, but these errors were encountered: