builder/amazon/common: panic if SSHPot is 0

This commit is contained in:
Mitchell Hashimoto 2013-07-20 19:51:25 -07:00
parent f8319f8881
commit 579eaaabc5
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,10 @@ func (s *StepSecurityGroup) Run(state map[string]interface{}) multistep.StepActi
return multistep.ActionContinue
}
if s.SSHPort == 0 {
panic("SSHPort must be set to a non-zero value.")
}
// Create the group
ui.Say("Creating temporary security group for this instance...")
groupName := fmt.Sprintf("packer %s", hex.EncodeToString(identifier.NewUUID().Raw()))