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
bugconfirmeda Terraform Core team member has reproduced this issueduplicateissue closed because another issue already tracks this problemexplaineda Terraform Core team member has described the root cause of this issue in codev1.3Issues (primarily bugs) reported against v1.3 releases
Hi @Nuru, thanks for this and I can confirm that I can replicate it.
Having looked at this closer, I think it's the same root cause as in #32157. As such I will close this as a duplicate, but I do appreciate you filing it, and I will include your specific reproduction in my tests to make sure it is properly fixed. I wouldn't have been able to track down the root cause without your reproduction config.
For more context it's the default value on the tags field within filter_and that is causing the crash. I'll include a smaller reproduction at the end of this comment that highlights this. Depending on your use case you could workaround this by setting an empty object as the default for filter_and, or removing the default value for tags. You might be relying on a difference between empty and null somewhere else though, so the workaround may not be possible.
I'll get this fixed for v1.3.5.
Smaller reproduction
main.tf
variable"lifecycle_configuration_rules" {
type=list(object({
id =string
filter_and =optional(object({
object_size_greater_than =optional(number) # integer >= 0
tags =optional(map(string), {})
}))
}))
default=[]
description="A list of lifecycle V2 rules"
}
output"lifecycle_configuration_rules" {
value=var.lifecycle_configuration_rules
}
test.auto.tfvars
lifecycle_configuration_rules=[
{
id ="nofilter"
},
{
id ="big"
filter_and = {
object_size_greater_than =256*1024
}
}
]
liamcervante
added
confirmed
a Terraform Core team member has reproduced this issue
duplicate
issue closed because another issue already tracks this problem
explained
a Terraform Core team member has described the root cause of this issue in code
v1.3
Issues (primarily bugs) reported against v1.3 releases
and removed
new
new issue not yet triaged
labels
Nov 4, 2022
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.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugconfirmeda Terraform Core team member has reproduced this issueduplicateissue closed because another issue already tracks this problemexplaineda Terraform Core team member has described the root cause of this issue in codev1.3Issues (primarily bugs) reported against v1.3 releases
Terraform Version
Terraform Configuration Files
Click to reveal
File
bug.auto.tfvars
File
bug.tf
Debug Output
Stack trace
Expected Behavior
Output should have been normalized input
Actual Behavior
Terraform crash
Steps to Reproduce
terraform plan
Additional Context
Issue created at the request of @liamcervante with minimal reproduction requiring no providers.
References
The text was updated successfully, but these errors were encountered: