Using cdk I'm trying to make a route table entry. The target I'm trying to add is a transit gateway. I'm using the Subnet construct and the add_route() method.
https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_ec2/Subnet.html
There is a mandatory parameter to add_route() called router_type (of type RouterType).
Problem is there doesn't seem to be one for transit gateways! How do I make a route table entry for transit gateways?
The following worked for me