Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AWS node_group module add TG length parameter
The way in which we use the 'lb' and 'node_group' modules, the `instance_target_group_arns` value is the output of the lb module. We tried using the length of the value in a count parameter which is not supported by Terraform (because it's computed). There are some issues in the Terraform project regarding this limitation, for instance: hashicorp/terraform#12570 In some cases it's recommended to use `-target` when applying Terraform changes to create the LB resources before the node_group, but this is quite difficult to integrate in our solution because we don't have a proper CD pipeline yet. At this point, our way of getting around this issue is by creating a `_length` variable with the expected length of instance_target_group_arns, that we calculate outside the module. This is aligned with the solution used with private networks and NAT instances in `terraform/modules/aws/network/private_subnet/main.tf`.
- Loading branch information