Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(terraform): allow nullable value for default values of vars #1370

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

nikpivkin
Copy link
Collaborator

Evaluating an expression like attr = var.some_var != null ? var.some_var : "default" fails: The true and false result expression must have consistent types.
Terraform supports null values that have no type. But defsec converts null with type DynamicPseudoTypes to city.NilVal, which cannot be used in conditional expressions.

See aquasecurity/trivy#4736

Copy link
Member

@simar7 simar7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@simar7 simar7 merged commit e87deb0 into aquasecurity:master Jul 6, 2023
@nikpivkin nikpivkin deleted the nik-allow-null branch July 20, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants