Skip to content

Lambda adds listener for TargetGroup that's being deleted #8

@lionello

Description

@lionello

2026-03-16T23:14:57.219Z cd - aws:lb:TargetGroup acme-tg-defang-apib4d036 deleting (121s) error: sdk-v2/provider2.go:572: sdk.helper_schema: deleting ELBv2 Target Group (arn:aws:elasticloadbalancing:us-east-2:735910966912:targetgroup/acme-tg-defang-apib4d036-6276abc/713464a043e44d27): operation error Elastic Load Balancing v2: DeleteTargetGroup, https response error StatusCode: 400, RequestID: c5cfbced-6110-4c62-a2c6-94e5cfe413f1, ResourceInUse: Target group 'arn:aws:elasticloadbalancing:us-east-2:735910966912:targetgroup/acme-tg-defang-apib4d036-6276abc/713464a043e44d27' is currently in use by a listener or a rule: provider=aws@6.83.2

A new ACME lambda added a new listerner but reused a TargetGroup that was about to be deleted. The delete failed, because the TargetGroup is now in use. Current TG selection logic is at

return *tg.TargetGroupArn, nil

Note that this bug is subtly different from the other issue where a listener is created by default, and a stack can be deleted only after successful issuance of a cert.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions