// TODO: parameterize
Predicate<String> passwordReadyRetryable = retry(passwordReady, 600, 10, SECONDS);
logger.debug(">> awaiting password data for instance(%s/%s)", instance.getRegion(), instance.getId());
if (passwordReadyRetryable.apply(instance.getId())) {
credentials = pwDataToLoginCredentials.apply(new PasswordDataAndPrivateKey(data.get(), privateKey));
logger.debug("<< obtained password data for instance(%s/%s)", instance.getRegion(), instance.getId());
} else {
logger.debug("<< unable to get password data for instance(%s/%s)", instance.getRegion(), instance.getId());
}
return credentials;