builder/amazon/common: panic if SSHPot is 0

This commit is contained in:
Mitchell Hashimoto 2013-07-20 19:51:25 -07:00
parent 4f568f4998
commit 30ab70388b
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()))