Closed codygreen closed 4 years ago
I've examined the error but I cannot pinpoint what is failing. The vpc module is creating two public subnets. Also, 2-nic and 3-nic examples are not experiencing this error but they use the same public subnets created by the vpc module.
Also, 0.12 removed the terraform output --module option... so I'll have to find another way to view the module output versus the module state.
Hey Cody, I am getting the same error as below, not sure what's missing:
Error: Invalid index
on main.tf line 76, in resource "aws_instance" "f5_bigip": 76: for_each = toset([aws_network_interface.mgmt[count.index].id]) |---------------- | aws_network_interface.mgmt is empty tuple | count.index is 0
The given key does not identify an element in this collection value.
@javedw Can you include the reference you're using to invoke the module?
Hey Cody, I am getting the same error as below, not sure what's missing:
Error: Invalid index
on main.tf line 76, in resource "aws_instance" "f5_bigip": 76: for_each = toset([aws_network_interface.mgmt[count.index].id]) |---------------- | aws_network_interface.mgmt is empty tuple | count.index is 0
The given key does not identify an element in this collection value.
Error: Invalid index
on ../../main.tf line 75, in resource "aws_instance" "f5_bigip": 75: for_each = toset([aws_network_interface.mgmt[count.index].id]) |---------------- | aws_network_interface.mgmt is empty tuple | count.index is 1
The given key does not identify an element in this collection value.
Error: Invalid index
on ../../main.tf line 75, in resource "aws_instance" "f5_bigip": 75: for_each = toset([aws_network_interface.mgmt[count.index].id]) |---------------- | aws_network_interface.mgmt is empty tuple | count.index is 0
The given key does not identify an element in this collection value.