Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified infrastructures/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ private void deployNodesOnInstance(final String instanceId, final boolean existP

private String createOrUseKeyPair(String infrastructureId, int nbInstances, AWSEC2CustomizableParameter params) {
SimpleImmutableEntry<String, String> keyPairInfo;
if (params.getVmPrivateKey().isEmpty() || params.getVmKeyPairName().isEmpty()) {
if (params.getVmKeyPairName().isEmpty()) {
// create a key pair in AWS
try {
logger.info("Creating an AWS key pair");
Expand All @@ -423,7 +423,7 @@ private String createOrUseKeyPair(String infrastructureId, int nbInstances, AWSE
keyPairInfo = handleKeyPairCreationFailure();
}
} else {
// or use the private key provided by the user
// or use the key pair provided by the user
logger.info("Using AWS key pair provided by the user");
keyPairInfo = new SimpleImmutableEntry<>(params.getVmKeyPairName(), params.getVmPrivateKey());
isUsingAutoGeneratedKeyPair = false;
Expand Down