Skip to content

Commit

Permalink
Adjust ECS network interface detection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
amaxine committed Apr 10, 2024
1 parent 1a266c6 commit 4e11bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/provider/ecs/ecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e11bf3

Please sign in to comment.