I followed the reply in
https://groups.google.com/forum/#!searchin/cloudtools-dev/endpoint/cloudtools-dev/zGGRR09jugE/N8EPwa6jw6sJ to create an VPCEndpoint using Troposphere.
I now need to add a route entry which points to this End Point.
The problem is that ec2.Route class requires a DestinationCidrBlock but I don't know what should I put in it.
The existing route table (which was created manually through the AWS Console) contains an entry which uses the ARN "pl-6ca54005" as the Destination.
Googling around I found that resources identified by "pl-" are "Prefix Lists":
$ aws ec2 describe-prefix-lists --region ap-southeast-2
{
"PrefixLists": [
{
"PrefixListName": "com.amazonaws.ap-southeast-2.s3",
"Cidrs": [
],
"PrefixListId": "pl-6ca54005"
}
]
}
But there is no mention of such strings in the Troposphere code.
For now, I manually copied the string "pl-6ca54005" to the DestinationCidrBlock field and the generated template passes validation (I haven't tried to bring up the stack yet) but I wonder if there is a better way to achieve this using Troposphere. I have to support any AWS region.
For now I suppose that I'll fetch the Prefix List for the relevant region using Boto.