terrascan icon indicating copy to clipboard operation
terrascan copied to clipboard

Nullable as a supported argument

Open nbjohnson opened this issue 2 years ago • 6 comments

  • terrascan version: v1.15.0
  • Operating System: centos7

Description

A variable Nullable setting doesn't seem to be recognized as a valid setting in terraform by terrascan.

What I Did

When trying to run terrascan scan against my terraform codebase I continually get Unsupported argument; An argument named "nullable" is not expected here.

Nullable is a valid variable setting in terraform, can terrascan either support this option to make this warning go away, or is there some way I can completely ignore it throwing a fit about a nullable setting?

nbjohnson avatar May 19 '22 13:05 nbjohnson

I can reproduce the issue with v1.15.2

b4nst avatar Jul 05 '22 21:07 b4nst

I am also seeing this (still version v1.15.2) at this point in time.

whitelancer avatar Aug 17 '22 17:08 whitelancer

See this issue when running terrascan on a MacOS (12.6)

$ terrascan version
version: v1.16.0
variables.tf:5,3-11: Unsupported argument; An argument named "nullable" is not expected here.

extract variables.tf

variable "slack_url" {
  type        = string
  sensitive   = true
  description = "Slack Web Hook URL"
  nullable    = false
}

pcanham avatar Nov 15 '22 13:11 pcanham

Sadly seeing this error as well.

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
david:$ terrascan version
version: v1.17.1
david:$ terrascan scan --iac-type terraform --non-recursive
2023-01-03T15:44:21.480+0100    warn    commons/load-dir.go:312 failed to build unified config. errors:
/tmp/jbmd8j/moved.tf:7,1-6: Unsupported block type; Blocks of type "moved" are not expected here.
/tmp/jbmd8j/moved.tf:11,1-6: Unsupported block type; Blocks of type "moved" are not expected here.
/tmp/jbmd8j/moved.tf:15,1-6: Unsupported block type; Blocks of type "moved" are not expected here.
/tmp/jbmd8j/moved.tf:19,1-6: Unsupported block type; Blocks of type "moved" are not expected here.
/tmp/jbmd8j/moved.tf:23,1-6: Unsupported block type; Blocks of type "moved" are not expected here.
/tmp/jbmd8j/variables.tf:8,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:15,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:26,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:33,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:44,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:51,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:58,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:65,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:76,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:83,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:90,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:97,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:104,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:111,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:118,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:125,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:132,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:139,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:146,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:153,3-11: Unsupported argument; An argument named "nullable" is not expected here.
/tmp/jbmd8j/variables.tf:178,3-11: Unsupported argument; An argument named "nullable" is not expected here.

2023-01-03T15:44:21.562+0100    error   cli/run.go:138  scan run failed{error 26 0  1 error occurred:
        * failed to build terraform allResourcesConfig

}```

davidjeddy avatar Jan 03 '23 14:01 davidjeddy

Issue continues on MacOS using terraform 1.6 and terrascan 1.18.

davidjeddy avatar Dec 25 '23 00:12 davidjeddy

+1 this issue is a blocker. Duplicate: https://github.com/tenable/terrascan/issues/1547

mjnowen avatar Dec 29 '23 21:12 mjnowen