Skip to content

terraform 0.12 panics when calling distinct with empty list #21403

@alex-goncharov

Description

@alex-goncharov

Terraform Version

$ terraform -v
Terraform v0.12.0

Terraform Configuration Files

locals {
  d = distinct([])
}

Debug Output

https://gist.github.com/alex-goncharov/d51af9a2b88a089cb32154abb031081a

Crash Output

https://gist.github.com/alex-goncharov/66f756fc609371862200e69a97b5f6f2

Expected Behavior

distinct returned empty list

Actual Behavior

terraform panics

Steps to Reproduce

create file with about hcl
terraform init && terraform plan

Additional Context

References

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions