Is there a way to import resources like this? ```...
# typescript
g
Is there a way to import resources like this?
Copy code
org:infrastructure:aws:vpc                                proj-shared-shared-vpc                                                                        
 +   │  ├─ aws:ec2:Vpc                                              proj-shared-shared-vpc-vpc                                                         create     
 +   │  │  ├─ aws:ec2:DefaultRouteTable                             proj-shared-shared-vpc-public-rt                                                   create     
 +   │  │  │  ├─ aws:ec2:Route                                      proj-shared-shared-vpc-route-public-subnets-default-route                          create     
 +   │  │  │  ├─ aws:ec2:RouteTableAssociation                      proj-shared-shared-vpc-public-rta-eu-central-1b                                    create     
 +   │  │  │  ├─ aws:ec2:RouteTableAssociation                      proj-shared-shared-vpc-public-rta-eu-central-1c                                    create     
 +   │  │  │  └─ aws:ec2:RouteTableAssociation                      proj-shared-shared-vpc-public-rta-eu-central-1a
Or is this blocked by missing functionality here: https://github.com/pulumi/pulumi/issues/9146 because I tried to make a bulk import but got this error
error: the parent 'proj-shared-shared-vpc-public-rt' for resource 'proj-shared-shared-vpc-route-public-subnets-default-route' of type 'aws:ec2/route:Route' has no name
because
DefaultRouteTable
has not been imported yet does that mean I have to import parents first and only then I can start importing children? Is there any workaround for that? I'm afraid this is going to take an unpleasant stack surgery
c
Yeah I think you'll have to import the parent first before importing the child resources. If it's an option for you, maybe try to comment out the child resources while you work on importing the parent resource into your state? Unfortunately, that means uncommenting one resource at a time since it looks like you have them deeply nested.