https://pulumi.com logo
Title
f

future-nail-59564

02/03/2021, 8:40 PM
hey folks! 👋 I’m trying to import an existing
aws.ec2.Route
, however I can’t seem to figure the “ID” to feed into the
import:
property. For all other types of resources, the ID is always pretty obvious to figure, but routes don’t seem to have an existence of their own outside the route table, they don’t seem to have an ARN, etc… So how could I import them? 🤔
I just looked into our current Terraform state and found that routes do have IDs, they just don’t seem to be exposed in the AWS console. For instance, for some route table
rtb-XXXXXXXXXXXXXXXXX
, the ID of the routes is of the form
r-rtb-XXXXXXXXXXXXXXXXXYYYYYYYYYY
.
wow, it required a lot of investigations, analysis and deduction, but I’ve finally mapped out all our routes IDs out of the Terraform state… 😅
actually, the expected ID format for routes is
ROUTETABLEID_DESTINATION
l

little-cartoon-10569

02/04/2021, 7:40 PM
The expected ID for every resource is listed at the bottom of the resource's documentation. Vis.: https://www.pulumi.com/docs/reference/pkg/aws/ec2/route/#import