Skip to content

replacing + adding a sg to lb causes an error #645

@vburckhardt

Description

@vburckhardt

Steps to reproduce:

  1. set additional_lb_security_group_ids to an array with one sg
  2. apply
  3. set additional_lb_security_group_ids to an array with an additional sg (ensure you append the additional sg as element 0 of the array)
  4. apply

Error:

╷
│ Error: Invalid index
│ 
│   on ../../main.tf line 615, in resource "null_resource" "confirm_lb_active":
│  615:     command     = "${path.module}/scripts/confirm_lb_active.sh ${var.region} ${local.lbs_associated_with_cluster[count.index]} ${var.use_private_endpoint}"
│     ├────────────────
│     │ count.index is 1
│     │ local.lbs_associated_with_cluster is list of string with 1 element
│ 
│ The given key does not identify an element in this collection value: the given index is greater than or equal to the length of the collection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions