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
module "FPX-NLB" {
source = "terraform-aws-modules/alb/aws"
version = "~> 6.5"
So according to semver, we should be good with all updated above 6.5. But our terraform pipeline recently failed for unknown reasons (we didn't update any versions). So by comparing the last run which worked to the failed run, we found that the AWS ALB module was the only one that was updated by a minor version (from 6.10.0 to 6.11.0). Normally this shouldn't be an issue when properly adhering to semver. But version 6.11.0 gave this error in our pipeline:
Error: Iteration over null value
on .terraform/modules/FPX-NLB/main.tf line 140, in locals:
139: target_group_attachments_lambda = {
140: for k, v in local.target_group_attachments :
141: (k) => merge(v, { lambda_function_name = split(":", v.target_id)[6] })
142: if try(v.attach_lambda_permission, false)
143: }
|----------------
| local.target_group_attachments is null
A null value cannot be used as the collection in a 'for' expression.
So apparently something was added in a non backwards compatible way.
Versions
Module version [Required]: 6.11.0
Reproduction Code [Required]
Steps to reproduce the behavior:
Expected behavior
Because of a minor update, the existing terraform code should keep working without changes.
Actual behavior
producing this error:
Error: Iteration over null value
on .terraform/modules/FPX-NLB/main.tf line 140, in locals:
139: target_group_attachments_lambda = {
140: for k, v in local.target_group_attachments :
141: (k) => merge(v, { lambda_function_name = split(":", v.target_id)[6] })
142: if try(v.attach_lambda_permission, false)
143: }
|----------------
| local.target_group_attachments is null
A null value cannot be used as the collection in a 'for' expression.
Should we add some code to terraform to fix this? Is this documented somewhere?
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.
Description
In our terraform code we have this defined:
So according to semver, we should be good with all updated above 6.5. But our terraform pipeline recently failed for unknown reasons (we didn't update any versions). So by comparing the last run which worked to the failed run, we found that the AWS ALB module was the only one that was updated by a minor version (from 6.10.0 to 6.11.0). Normally this shouldn't be an issue when properly adhering to semver. But version 6.11.0 gave this error in our pipeline:
So apparently something was added in a non backwards compatible way.
Versions
Reproduction Code [Required]
Steps to reproduce the behavior:
Expected behavior
Because of a minor update, the existing terraform code should keep working without changes.
Actual behavior
producing this error:
Should we add some code to terraform to fix this? Is this documented somewhere?
The text was updated successfully, but these errors were encountered: