pulumi / pulumi-awsx

AWS infrastructure best practices in component form!
https://www.pulumi.com/docs/guides/crosswalk/aws/
Apache License 2.0
227 stars 104 forks source link

cannot delete a vpc with vpcendpoints #1366

Closed omercnet closed 1 month ago

omercnet commented 2 months ago

What happened?

trying to pulumi down a vpc with endpoints hangs on deleting subnets, because the subnet cannot be deleted before removing the vpc endpoint

https://github.com/pulumi/pulumi-awsx/blob/01d90b4caeae96dc95449fffc59dce7a3b53d685/awsx/ec2/vpc.ts#L155-L156

Example

new awsx.ec2.Vpc(
    args.name,
    {
      enableDnsHostnames: true,
      enableDnsSupport: true,
      vpcEndpointSpecs: [{ serviceName: `com.amazonaws.${region}.ecr.dkr`, vpcEndpointType: "Interface" }],
    },
    opts,
  );

Output of pulumi about

CLI
Version 3.119.0 Go Version go1.22.4 Go Compiler gc

Plugins KIND NAME VERSION language nodejs unknown

Host
OS darwin Version 14.5 Arch arm64

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

flostadler commented 2 months ago

Hey @omercnet, I'm sorry you're running into this issue!

I tried reproducing it with your example program, but I don't seem to run into this issue. The VPC deletes successfully for me.

What version of the awsx provider are you using? Can you please run pulumi about in the projects directory so I can double check the versions with mine? I was trying it with pulumi-awsx 2.14.0.

You mentioned it's hanging at deleting the subnets. Is the VPC endpoint deleting successfully or is that also hanging?