You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Terraform crashed! This is always indicative of a bug within Terraform.
Please report the crash with Terraform[1] so that we can fix this.
When reporting bugs, please include your terraform version, the stack trace
shown below, and any additional information which may help replicate the issue.
[1]: https://github.com/hashicorp/terraform/issues
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
inconsistent list element types (cty.Object(map[string]cty.Type{"ack_deadline_seconds":cty.String, "enable_exactly_once_delivery":cty.Bool, "enable_message_ordering":cty.Bool, "expiration_days":cty.Number, "message_retention_duratio
n":cty.Number, "name":cty.String, "push_endpoint":cty.String, "retain_acked_messages":cty.Bool}) then cty.Object(map[string]cty.Type{"ack_deadline_seconds":cty.String, "enable_exactly_once_delivery":cty.Bool, "enable_message_orderin
g":cty.Bool, "expiration_days":cty.String, "message_retention_duration":cty.Number, "name":cty.String, "push_endpoint":cty.String, "retain_acked_messages":cty.Bool}))
module.server.google_cloud_run_domain_mapping.server["doots"]: Refreshing state... [id=locations/us-central1/namespaces/earthone-dev/domainmappings/doots.earthone.dev]
goroutine 3633 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x19
github.com/hashicorp/terraform/internal/logging.PanicHandler()
/home/circleci/project/project/internal/logging/panic.go:55 +0x153
panic({0x21e01a0, 0xc004962c30})
/usr/local/go/src/runtime/panic.go:884 +0x212
github.com/zclconf/go-cty/cty.ListVal({0xc004cd1200, 0x2, 0x1?})
/home/circleci/go/pkg/mod/github.com/zclconf/go-cty@v1.11.1/cty/value_init.go:166 +0x42e
github.com/zclconf/go-cty/cty.transform({0x0?, 0x0, 0x0}, {{{0x2b669d0?, 0xc0049627e0?}}, {0x20ef040?, 0xc004948888?}}, {0x2b4dda0, 0xc0008d43d0})
/home/circleci/go/pkg/mod/github.com/zclconf/go-cty@v1.11.1/cty/walk.go:175 +0xf4a
github.com/zclconf/go-cty/cty.TransformWithTransformer(...)
/home/circleci/go/pkg/mod/github.com/zclconf/go-cty@v1.11.1/cty/walk.go:130
github.com/hashicorp/hcl/v2/ext/typeexpr.(*Defaults).Apply(0xc001061ae0?, {{{0x2b669d0?, 0xc0049627e0?}}, {0x20ef040?, 0xc004948888?}})
/home/circleci/go/pkg/mod/github.com/hashicorp/hcl/v2@v2.14.1/ext/typeexpr/defaults.go:38 +0xa7
github.com/hashicorp/terraform/internal/terraform.prepareFinalInputVariableValue({{0xc0065980e0, 0x1, 0x1}, {{}, {0xc000ccbb60, 0xb}}}, 0xc000fe1a58, 0xc00067e1a0)
/home/circleci/project/project/internal/terraform/eval_variable.go:98 +0xacd
github.com/hashicorp/terraform/internal/terraform.(*nodeModuleVariable).evalModuleVariable(0xc0008946c0?, {0x2b7ceb8?, 0xc0063be0e0?}, 0x1d?)
/home/circleci/project/project/internal/terraform/node_module_variable.go:239 +0x545
github.com/hashicorp/terraform/internal/terraform.(*nodeModuleVariable).Execute(0xc0008946c0, {0x2b7ceb8, 0xc0063be0e0}, 0x2)
/home/circleci/project/project/internal/terraform/node_module_variable.go:155 +0x172
github.com/hashicorp/terraform/internal/terraform.(*ContextGraphWalker).Execute(0xc001ac34a0, {0x2b7ceb8, 0xc0063be0e0}, {0x7f44e759b888, 0xc0008946c0})
/home/circleci/project/project/internal/terraform/graph_walk_context.go:136 +0xc2
github.com/hashicorp/terraform/internal/terraform.(*Graph).walk.func1({0x23aebe0, 0xc0008946c0})
/home/circleci/project/project/internal/terraform/graph.go:74 +0x2f0
github.com/hashicorp/terraform/internal/dag.(*Walker).walkVertex(0xc000894780, {0x23aebe0, 0xc0008946c0}, 0xc004cd0ec0)
/home/circleci/project/project/internal/dag/walk.go:381 +0x2f6
created by github.com/hashicorp/terraform/internal/dag.(*Walker).Update
/home/circleci/project/project/internal/dag/walk.go:304 +0xf65
Expected Behavior
No crash with any optional attribute
Actual Behavior
Additional context provided in code sample below.
Using a list of object with optional attributes will cause a crash if the optional attribute isn't a string or bool and is missing from any element of the list.
What is currently causing the crash is expiration_days since it is an optional attribute of type number and isn't present on all elements of the list of objects. If I was to turn it into a string (optional(string, "31")) and re-run apply then it wouldn't crash.
A crash also happened when I tried to turn the type to any.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Terraform Version
Debug Output
Expected Behavior
No crash with any optional attribute
Actual Behavior
Additional context provided in code sample below.
Using a list of object with optional attributes will cause a crash if the optional attribute isn't a
string
orbool
and is missing from any element of the list.What is currently causing the crash is
expiration_days
since it is an optional attribute of typenumber
and isn't present on all elements of the list of objects. If I was to turn it into astring
(optional(string, "31")
) and re-run apply then it wouldn't crash.A crash also happened when I tried to turn the type to
any
.Additional Context
main.tf
pubsub variables.tf
Steps to Reproduce
terraform init
terraform apply
References
#31978
This might be related? #32033
The text was updated successfully, but these errors were encountered: