From 4e11bf3c38abdaeec25496cbc63e69ab9f4de467 Mon Sep 17 00:00:00 2001 From: Maxine Aubrey <35892750+amaxine@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:42:04 +0200 Subject: [PATCH] Adjust ECS network interface detection logic --- pkg/provider/ecs/ecs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/provider/ecs/ecs.go b/pkg/provider/ecs/ecs.go index e2edfbbc7..2a970f81c 100644 --- a/pkg/provider/ecs/ecs.go +++ b/pkg/provider/ecs/ecs.go @@ -314,7 +314,7 @@ func (p *Provider) listInstances(ctx context.Context, client *awsClient) ([]ecsI } var mach *machine - if len(task.Attachments) != 0 { + if aws.StringValue(taskDef.NetworkMode) == "awsvpc" && len(task.Attachments) != 0 { if len(container.NetworkInterfaces) == 0 { logger.Errorf("Skip container %s: no network interfaces", aws.StringValue(container.Name)) continue