Difference between revisions of "Error: Invalid index"

From wikieduonline
Jump to navigation Jump to search
Line 3: Line 3:
 
  │
 
  │
 
  │  on variables.tf line 91, in resource "[[aws_lb_target_group]]" "this":
 
  │  on variables.tf line 91, in resource "[[aws_lb_target_group]]" "this":
  │  91:    [[for_each]] = [[lookup]](var.lb_target_group[[[count]].index], "[[health_check]]", null)
+
  │  91:    [[for_each]] = [[lookup]](var.lb_target_group[count.index], "[[health_check]]", null)
 
  │    ├────────────────
 
  │    ├────────────────
 
  │    │ count.index is 14
 
  │    │ count.index is 14

Revision as of 13:48, 20 October 2021

╷
│ Error: Invalid index
│
│   on variables.tf line 91, in resource "aws_lb_target_group" "this":
│   91:     for_each = lookup(var.lb_target_group[count.index], "health_check", null)
│     ├────────────────
│     │ count.index is 14
│     │ var.lb_target_group is "lb_target_group_your_name"
│
│ This value does not have any indices.
╵


See also

Advertising: