From 5f683035049d2b790bdce5e2b80153bdb66cfc6e Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 30 Apr 2020 06:51:17 -0400 Subject: [PATCH] Remove no longer needed port check The communicator code base will default to the correct port settings for valid communicators and fail the build for non valid communicators. --- builder/amazon/common/run_config.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/builder/amazon/common/run_config.go b/builder/amazon/common/run_config.go index 9bf3a5c69..705510949 100644 --- a/builder/amazon/common/run_config.go +++ b/builder/amazon/common/run_config.go @@ -427,13 +427,6 @@ func (c *RunConfig) Prepare(ctx *interpolate.Context) []error { // Validation errs := c.Comm.Prepare(ctx) - if port := c.Comm.Port(); port == 0 { - if c.Comm.Type != "none" { - err := fmt.Errorf("port must be set to a non-zero value for a communicator of type %s", c.Comm.Type) - errs = append(errs, err) - } - } - // Copy singular tag maps errs = append(errs, c.RunTag.CopyOn(&c.RunTags)...) errs = append(errs, c.SpotTag.CopyOn(&c.SpotTags)...)