Skip to content

panic on passing non-string key to map() #23043

@alxrem

Description

@alxrem

Terraform Version

Terraform v0.12.10
+ provider.local v1.3.0

Terraform Configuration Files

locals {
	a = map(1, 1)
}

Debug Output

https://gist.github.com/alxrem/16972d40bbfe8df2fbecac6720a9b5a8

Crash Output

https://gist.github.com/alxrem/af55977e452fbd3c6be0c192c05bc3bd

Expected Behavior

Error message from syntax parser.

Actual Behavior

Panic

Steps to Reproduce

cat <<EOF >bug.tf
locals {
	a = map(1, 1)
}
EOF
terraform init
terraform plan

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions