Loading...
Loading...
### Terraform Version ```shell 1.10.0-dev (0a266c88c49a9486898faaf53e9ee9b2615a81de) ``` ### Terraform Configuration Files ```terraform terraform { required_providers { random = { source = "hashicorp/random" } } } locals { foo = "bar" } ephemeral "random_password" "example" { length = 12 lifecycle { precondition { condition = local.foo == "bar" error_message = "noot noot" } # postcondition { # condition = self.result != "foo" # error_message = "password is not foo but" # } } } ``` ### Debug Output https://gist.github.com/radeksimko/5de91d24856bb12f4379f16f3727fc26 ### Expected Behavior `terraform apply` to not crash ### Actual Behavior `terraform apply` crashed with the following output whenever there's `precondition` or `postcondition` in the configuration ``` No changes. Your infrastructure matches the configuration. Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed. !!!!!!!!!!!!!!!!!!!!!!!!!!! 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 !!!!!!!!!!!!!!!!!!!!!!!!!!!! panic: duplicate checkable objects report for ephemeral.random_password.example goroutine 161 [running]: runtime/debug.Stack() /opt/homebrew/Cellar/go/1.23.2/libexec/src/runtime/debug/stack.go:26 +0x64 github.com/hashicorp/terraform/internal/logging.PanicHandler() /Users/radeksimko/gopath/src/github.com/hashicorp/terraform/internal/logging/panic.go:84 +0x184 panic({0x1036cd400?, 0x14000cc7030?}) /opt/homebrew/Cellar/go/1.23.2/libexec/src/runtime/panic.go:785 +0x124 github.com/hashicorp/terraform/internal/terraform.(*Graph).walk.func1.1() /Users/radeksimko/gopath/src/github.com/hashicorp/terraform/internal/terraform/graph.go:59 +0x36c panic({0x1036cd400?, 0x14000cc7030?}) /opt/homebrew/Cellar/go/1.23.2/libexec/src/runtime/panic.go:785 +0x124 github.com/hashicorp/terraform/internal/checks.(*State).ReportCheckableObjects(0x103c6aa20?, {0x103e15070, 0x1400052de00}, 0x14000ccabd0) /Users/radeksimko/gopath/src/github.com/hashicorp/terraform/internal/checks/state_report.go:33 +0x4c8 github.com/hashicorp/terraform/internal/terraform.(*nodeExpandPlannableResource).dynamicExpandPartial(0x14000cb64b0, {0x103e38958, 0x14000991e00}, {0x1059ad2a0, 0x1, 0x1}, 0x0, {0x14000b7b5b0?}, {0x14000b7b548?}) /Users/radeksimko/gopath/src/github.com/hashicorp/terraform/internal/terraform/node_resource_partial_plan.go:210 +0x105c github.com/hashicorp/terraform/internal/terraform.(*nodeExpandPlannableResource).DynamicExpand(0x14000cb64b0, {0x103e38958, 0x14000991e00}) /Users/radeksimko/gopath/src/github.com/hashicorp/terraform/internal/terraform/node_resource_plan.go:128 +0x378 github.com/hashicorp/terraform/internal/terraform.(*nodeExpandApplyableResource).DynamicExpand(0x14000ca1100, {0x103e38958, 0x14000991e00}) /Users/radeksimko/gopath/src/github.com/hashicorp/terraform/internal/terraform/node_resource_apply.go:61 +0xc0 github.com/hashicorp/terraform/internal/terraform.(*Graph).walk.func1({0x103cfd060, 0x14000ca1100}) /Users/radeksimko/gopath/src/github.com/hashicorp/terraform/internal/terraform/graph.go:153 +0x77c github.com/hashicorp/terraform/internal/dag.(*Walker).walkVertex(0x14000a5b800, {0x103cfd060, 0x14000ca1100}, 0x1400052d540) /Users/radeksimko/gopath/src/github.com/hashicorp/terraform/internal/dag/walk.go:384 +0x2a0 created by github.com/hashicorp/terraform/internal/dag.(*Walker).Update in goroutine 155 /Users/radeksimko/gopath/src/github.com/hashicorp/terraform/internal/dag/walk.go:307 +0xc18 ``` ### Steps to Reproduce 1. `terraform init` 2. `terraform apply` ### Additional Context For `hashicorp/random` provider I used a custom build from [this branch](https://github.com/hashicorp/terraform-provider-random/compare/main...av/ephemeral-password). ### References _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.