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
{{ message }}
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
Describe the bug
When evaluating Terraform source code I am running into a panic panic: can't use ElementIterator on null value. Based on some testing I've done this seems to be caused when values in a locals block reference variables AND then another value in the locals block references the first value. You can see this in the IaC snippet I provided below. default_tags referencing variables is OK on it's own but when tags = concat(local.default_tags, ["test"]) is added then the panic occurs.
Hi @szesch, thanks for the bug report -- it is highly detailed and clearly written, which allowed me to reproduce this within minutes.
I am working to fix the root cause (it's a combination of two bugs, one is us assuming that variables have a default in certain cases, which they don't here, and the other is that we're accidentally treating locals as a resource in another place). As a temporary workaround, specifying defaults for the variables should work. I expect to have the fix out later today though.
@jaspervdj-luminal Thank you for the quick turnaround on this. I tested the latest release and ran into a similar error but it looks like a different cause. I created #397
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
When evaluating Terraform source code I am running into a panic
panic: can't use ElementIterator on null value
. Based on some testing I've done this seems to be caused when values in alocals
block reference variables AND then another value in thelocals
block references the first value. You can see this in the IaC snippet I provided below.default_tags
referencing variables is OK on it's own but whentags = concat(local.default_tags, ["test"])
is added then the panic occurs.How you're running Regula
Operating System
Ubuntu 22.04
IaC Configuration
The text was updated successfully, but these errors were encountered: