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
$ terraform destroy
...
Do you really want to destroy all resources?
Terraform will destroy all your managed infrastructure, as shown above.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value: yes
Error: Error in function call
on .terraform/modules/terraform_state_backend/output.tf line 30, in output "dynamodb_table_id":
30: coalescelist(
31:
32:
33:
|----------------
| aws_dynamodb_table.with_server_side_encryption is empty tuple
| aws_dynamodb_table.without_server_side_encryption is empty tuple
Call to function "coalescelist" failed: no non-null arguments.
Expected Behavior
It should have finished properly. Looks like the coalesce is incorrect.
Fix
This is likely due to the new behavior of coalescelist() in terraform 0.12.
Add [""] to the coalesclist() call. I will try to submit a PR.
The text was updated successfully, but these errors were encountered:
So upon further thought, adding the empty string list is a hack for backwards compat with terraform 0.11, because the 0.12 coalescelist behavior is correct: the function returns the first non-empty list so if they are all empty, it does not make sense to return anything and it should raise an exception.
that coalescelist() is defined that way; probably the function should be "returns the first non-empty list, or an list list if they are all empty". Problem there is this will cause outer code to break (eg the element(coalesced-list, 0) to break in 0.12, so it doesnt' really solve the problem.
Describe the Bug
Using terraform 0.12:
eventually the following happens:
Expected Behavior
It should have finished properly. Looks like the coalesce is incorrect.
Fix
This is likely due to the new behavior of coalescelist() in terraform 0.12.
Add
[""]
to the coalesclist() call. I will try to submit a PR.The text was updated successfully, but these errors were encountered: