Hello, I'm trying to import existing AWS resources...
# aws
g
Hello, I'm trying to import existing AWS resources related to EKS cluster that was created with eksctl initially. My question is about route tables and routes: Pulumi docs state that there are two ways to define a route - in "routes" argument of aws.ec2.RouteTable constructor and as a separate aws.ec2.Route object. Which should I choose? 1)
Copy code
public_route_table = aws.ec2.RouteTable("PublicRouteTable",
    routes=[{
        "cidr_block": "0.0.0.0/0",
        "gateway_id": internet_gateway.id,
    }],
    tags={
        "Name": "eksctl-test-cluster/PublicRouteTable"
    },
    vpc_id=vpc.id)
2)
Copy code
public_route_table = aws.ec2.RouteTable("PublicRouteTable",
    tags={
        "Name": "eksctl-test-cluster/PublicRouteTable"
    },
    vpc_id=vpc.id)
public_subnet_route = aws.ec2.Route("PublicSubnetRoute",
    destination_cidr_block="0.0.0.0/0",
    gateway_id=internet_gateway.id,
    route_table_id=public_route_table.id)
pulumi import
generates code like in the first case, but the second should be better for further management I guess...
l
I always use the separate resource option as it's more configurable. But there's no effective difference, and routes are one thing I've almost never needed to tweak, so it hasn't actually given me any benefit.
👀 1