Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditionals with unknown conditions and marked branches are erroring. #629

Closed
cube2222 opened this issue Oct 5, 2023 · 0 comments · Fixed by #630
Closed

Conditionals with unknown conditions and marked branches are erroring. #629

cube2222 opened this issue Oct 5, 2023 · 0 comments · Fixed by #630

Comments

@cube2222
Copy link
Contributor

cube2222 commented Oct 5, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant