Skip to content

Commit

Permalink
ec2machine: do not attempt to use a private dns address (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosnicolaou authored and mariusae committed Oct 21, 2019
1 parent af840fd commit 078f177
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ec2system/ec2machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,9 @@ func getAddress(instance *ec2.Instance) string {
for _, ptr := range []*string{
instance.PublicDnsName,
instance.PublicIpAddress,
instance.PrivateDnsName,
instance.PrivateIpAddress,
// NOTE: do not return a private DNS name since in it is not guaranteed to
// be resolvable externally.
} {
if val := aws.StringValue(ptr); len(val) > 0 {
return val
Expand Down

0 comments on commit 078f177

Please sign in to comment.