stale-lamp-8682
11/28/2024, 8:39 AMtgw_peering = aws.ec2transitgateway.PeeringAttachment(
“tgw-peering”,
peer_region=“us-east-1",
peer_transit_gateway_id=tgw_ids[0],
transit_gateway_id=tgw_ids[1],
)But you need to accept this peering:
peering = aws.ec2transitgateway.get_peering_attachment(filters=[{
“name”: “transit-gateway-id”,
“values”: [tgw_peering.peer_transit_gateway_id],
},{
“name”: “state”,
“values”: [“pendingAcceptance”],
}
]
)
aws.ec2transitgateway.PeeringAttachmentAccepter(“accepter”,
transit_gateway_attachment_id=peering.id,
)in terraform you can wait the end of creation of tgw_peering before launching get_peering_attachment but in pulumi i don’t know how to do that
little-cartoon-10569
11/28/2024, 5:55 PM