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
Error: Invalid index
on main.tf line 70, in resource "aws_ec2_transit_gateway_vpc_attachment" "this":
70: transit_gateway_id = lookup(each.value, "tgw_id", aws_ec2_transit_gateway.this[0].id)
|----------------
| aws_ec2_transit_gateway.this is empty tuple
The given key does not identify an element in this collection value.
Releasing state lock. This may take a few moments...
[terragrunt] 2020/04/21 17:21:31 Hit multiple errors:
exit status 1
My solution here was to simply change line 70 to transit_gateway_id = lookup(each.value, "tgw_id", try(aws_ec2_transit_gateway.this[0].id, null)), which I'm going to PR.
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.
My simple use case is:
Account 1 (networking) hosts TGW
Account 2 (shared services) hosts a VPC with resources that will be connected to TGW
VPC:
TGW:
Error
My solution here was to simply change line 70 to
transit_gateway_id = lookup(each.value, "tgw_id", try(aws_ec2_transit_gateway.this[0].id, null))
, which I'm going to PR.The text was updated successfully, but these errors were encountered: