Merge pull request #4080 from rickard-von-essen/issue-4057

Properly cleanup AWS temporary key pairs
This commit is contained in:
Chris Bednarski 2016-10-28 13:25:44 -07:00 committed by GitHub
commit 999a0968f5
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ func (s *StepKeyPair) Cleanup(state multistep.StateBag) {
// If no key name is set, then we never created it, so just return
// If we used an SSH private key file, do not go about deleting
// keypairs
if s.PrivateKeyFile != "" || s.KeyPairName == "" {
if s.PrivateKeyFile != "" || s.KeyPairName != "" {
return
}