Conditionals with unknown conditions and marked branches are erroring.
cube2222 opened this issue · 0 comments
cube2222 commented
Hey!
Conditionals that have an unknown condition and one of its branches is marked (sensitive) break with an error because the new refinement handling code in the conditional doesn't handle this case (and v.Range() doesn't handle the case of being a marked unknown).
This has been submitted to OpenTofu as an issue and was later also raised in the HashiCorp Terraform issue tracker.
Here's a brief reproduction:
output "test" {
value = var.test != "papaya" ? var.test : ""
}
variable "test" {
type = string
default = "papaya"
sensitive = true
}
PR to fix this coming in a moment.