jenkins-x / terraform-aws-eks-jx

A Terraform module for creating Jenkins X infrastructure on AWS
Apache License 2.0
63 stars 41 forks source link

Terraform trying to delete Internet gateway before deleting the load balancer and fails. #373

Open Karthikraja9 opened 5 months ago

Karthikraja9 commented 5 months ago

https://github.com/jenkins-x/terraform-aws-eks-jx/issues/54 This issue ^^^ reoccurs in Terraform 1.7.5.

Error: deleting EC2 Internet Gateway (igw-xxxxxxxxxxxxxxxxx): detaching EC2 Internet Gateway (igw-xxxxxxxxxxxxxxxxx) from VPC (vpc-xxxxxxxxxxxxxxxxx): DependencyViolation: Network vpc-xxxxxxxxxxxxxxxx has some mapped public address(es). Please unmap those public address(es) before detaching the gateway. status code: 400

The Public IP its referring to is attached to the Load balancer, still Terraform is trying to delete the Internet Gateway first and then the LB which is resulting in the above error. Note: LB termination protection is off.