hashicorp / hashicorp/hil

Passing an Empty List Confuses Configuration

Open
#54 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
405
Forks
32
Avg merge
23h 7m
Merged PRs (30d)
1

Description

Not sure if this is the right spot. I think this is a HIL issue and not a Terraform issue.

Consider this snippet of TF code used in a module:
```
variable security_groups {
type = "list"
default = []
}

resource "aws_network_interface" "nic" {
# ...
security_groups = ["${var.security_groups}"]
}
```

When creating the module with explicit `security_groups` everything works fine. However the default case will complain about `The security group '' does not exist`

Contributor guide

Open the contributing guide

Research direction

No file or test is named in the issue. Start by reproducing the empty-list module case and trace whether the behavior belongs to HIL interpolation or Terraform configuration handling. Done means identifying the responsible component and documenting or testing the expected empty-list behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, terraform
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.