Skip to content

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

@Karthikraja9

Description

@Karthikraja9

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions