jenkins-x/terraform-aws-eks-jx

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

Opened this issue · 0 comments

#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.