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
formatlist(string, list) should be able to take an empty list. The functionality in this case should be obvious, it outputs an empty list.
Instead, it prints this error:
template = "${join(",", formatlist("example%s", list()))}"
* formatlist: no lists in arguments to formatlist in:
${join(",", formatlist("example%s", list()))}
This really shouldn't be an error, there is no reason why it shouldn't be able to cope with this just fine. I've worked up this example for you, but the real usecase is using aws_instance.example.*.private_ip, as the list parameter to a formatlist when the count of the example aws_instance is 0. Terraform should cope with this just fine, and doesnt >.<
The text was updated successfully, but these errors were encountered:
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.
ghost
locked and limited conversation to collaborators
Apr 20, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
terraform 0.7.5
formatlist(string, list)
should be able to take an empty list. The functionality in this case should be obvious, it outputs an empty list.Instead, it prints this error:
This really shouldn't be an error, there is no reason why it shouldn't be able to cope with this just fine. I've worked up this example for you, but the real usecase is using
aws_instance.example.*.private_ip
, as the list parameter to aformatlist
when the count of the example aws_instance is 0. Terraform should cope with this just fine, and doesnt >.<The text was updated successfully, but these errors were encountered: