AWS ECS IPv6 Support
This commit is contained in:
parent
d6598f370c
commit
c50216919a
1 changed files with 7 additions and 1 deletions
|
|
@ -317,8 +317,14 @@ func (p *Provider) listInstances(ctx context.Context, client *awsClient) ([]ecsI
|
|||
protocol: mapping.Protocol,
|
||||
})
|
||||
}
|
||||
|
||||
privateIP := aws.ToString(container.NetworkInterfaces[0].PrivateIpv4Address)
|
||||
if privateIP == "" {
|
||||
privateIP = aws.ToString(container.NetworkInterfaces[0].Ipv6Address)
|
||||
}
|
||||
|
||||
mach = &machine{
|
||||
privateIP: aws.ToString(container.NetworkInterfaces[0].PrivateIpv4Address),
|
||||
privateIP: privateIP,
|
||||
ports: ports,
|
||||
state: ec2types.InstanceStateName(strings.ToLower(aws.ToString(task.LastStatus))),
|
||||
healthStatus: task.HealthStatus,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue