Merge pull request #5217 from hashicorp/5213_port_related_null_communicator_crash

don't panic if the communicator is none and the port is 0
This commit is contained in:
Matthew Hooker 2017-08-04 14:00:17 -07:00 committed by GitHub
commit b0774546b8
1 changed files with 3 additions and 1 deletions

View File

@ -45,7 +45,9 @@ func (s *StepSecurityGroup) Run(state multistep.StateBag) multistep.StepAction {
port := s.CommConfig.Port()
if port == 0 {
panic("port must be set to a non-zero value.")
if s.CommConfig.Type != "none" {
panic("port must be set to a non-zero value.")
}
}
// Create the group