Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GYRO-378: ELBV2 Authenticate Cognito Action, primary key will show null if referenced User Pool Client and User Pool Domain not created. #139

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
15 changes: 14 additions & 1 deletion src/main/java/gyro/aws/elbv2/AuthenticateCognitoAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,20 @@ public void setUserPoolDomain(UserPoolDomainResource userPoolDomain) {
}

public String primaryKey() {
return String.format("%s/%s/%s", getUserPoolArn(), getUserPoolClient().getId(), getUserPoolDomain().getDomain());
StringBuilder sb = new StringBuilder();
if (getUserPoolArn() != null) {
sb.append(getUserPoolArn()).append(" ");
}

if (getUserPoolClient().getId() != null) {
sb.append(getUserPoolClient().getId());
} else {
sb.append(getUserPoolClient().getName());
}

sb.append(" ").append(getUserPoolDomain().getDomain());

return sb.toString();
}

@Override
Expand Down