winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.73k stars 185 forks source link

Lambda versions with VPCs in Terraform for AWS #6505

Open skyrpex opened 1 month ago

skyrpex commented 1 month ago

Terraform for AWS keeps Lambda versions from previous deployments. These Lambda versions may be attached to a VPC and a Security Group, and if this VPC or Security Group is to be removed in the future, the terraform apply process will be stuck trying to delete the Security Group.

We stumbled upon this issue in Wing Cloud recently. We had to manually delete previous Lambda versions of the functions that were inside the VPC, and Pol also had to use an interesting tool to find other resources that were "hidden" dependencies of the ENI.

Maybe we should try to stick to one Lambda version for Wing deployments?

Related: