```Diagnostics: aws:ec2:Vpc (rds-vpc-vpc): e...
# aws
v
Copy code
Diagnostics:
  aws:ec2:Vpc (rds-vpc-vpc):
    error: deleting urn:pulumi:dev::allrites-infrastructure::aws:ec2/vpc:Vpc::rds-vpc-vpc: 1 error occurred:
        * error deleting EC2 VPC (vpc-076d9d57f5bfecac7): DependencyViolation: The vpc 'vpc-076d9d57f5bfecac7' has dependencies and cannot be deleted.
        status code: 400, request id: 8f586580-0c6f-4134-8606-e2c3aaa0c19f

  pulumi:pulumi:Stack (allrites-infrastructure-dev):
    error: update failed
how do i solve this problem?
s
you might be able to more easily figure out what these dependencies are through the AWS console. for example, try deleting the VPC through the console and see what the popup message says
v
i mean i do not want to remove it. for some reason pulumi thought i want to delete it
now every time i run up. its trying to delete that vpc
s
You changed something in your program that's causing pulumi to think you want it deleted. It could be that you renamed it or you accidentally removed the class instantiation from your code, etc.
v
yes you are right. is there away to skip this task?
s
nope! you will need to fix your program to not delete the VPC. any other way would be breaking the declarative model of Pulumi
v
it shows up on the up. exactly same resource.

https://puu.sh/JeNvt/a32d3ec590.png

s
no, these are different resources. the first is
eks-vpc-vpc
and the second is
rds-vpc-vpc
v
You are right but
rds-vpc-vpc
exits

https://puu.sh/JeNwp/29d26a9bca.png

s
interesting, the preview doesn't say it will delete the VPC but
up
attempts to delete it? Can you try running
pulumi refresh
just to rule out weird state drift
v
exactly. I have tried
pulumi refresh
and it did'nt help
pulumi refresh
Copy code
Resources:
    43 unchanged

Duration: 4s
s
i don't know, this is weird 😐 what if you try `import`ing the VPC?
oh, so the text output shows that the VPC will be deleted. maybe the console output is buggy and didn't display it
can you verify in your typescript code that you DO have a VPC named
"rds-vpc-vpc"
v
yes i do have it
s
and you didn't change the provider?
v
thats correct
s
in your code where you're creating the VPC can you try `import`ing the VPC
v
i dont know how to import
s
v
since i am just developing it the IaC, I just removed pulumi stack and i will use this to nuke the aws account
s
💥