// standard convention from aws-ec2, which might not be re-used outside.
if (instance.getPrivateDnsName() != null)
builder.hostname(instance.getPrivateDnsName().replaceAll("\\..*", ""));
addCredentialsForInstance(builder, instance);
builder.status(instanceToNodeStatus.get(instance.getInstanceState()));
builder.backendStatus(instance.getRawState());
// collect all ip addresses into one bundle in case the api mistakenly put a private address
// into the public address field
Builder<String> addressesBuilder = ImmutableSet.builder();
if (emptyToNull(instance.getIpAddress()) != null)