Skip to content

Panic with setunion() on variable input #25318

@bondsbw

Description

@bondsbw

Terraform Version

Terraform v0.13.0-beta2

Terraform Configuration Files

variable "x" {
  default = []
}

locals {
  a = setunion(var.x, [])
}

Debug Output

https://gist.github.com/bondsbw/8526cd1ed6ff1df0f4aadc2532b45bf2

Expected Behavior

No error.

Actual Behavior

Error: Error in function call

  on main.tf line 6, in locals:
   6:   a = setunion(var.x, [])

Call to function "setunion" failed: panic in function implementation: value is
not known
goroutine 84 [running]:
runtime/debug.Stack(0xc000223b08, 0x225ee00, 0x2c7ff20)
        /usr/local/go/src/runtime/debug/stack.go:24 +0xa4
github.com/zclconf/go-cty/cty/function.errorForPanic(...)
        /home/circleci/project/project/vendor/github.com/zclconf/go-cty/cty/function/error.go:44

...

Steps to Reproduce

  1. terraform init
  2. terraform plan

Additional Context

Running on Windows 10 version 10.0.17763.0.

Metadata

Metadata

Assignees

Labels

bugconfigconfirmeda Terraform Core team member has reproduced this issuecrash

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions