From 3d4267d6dc7d10f3545fe73fe167941cd72dcea4 Mon Sep 17 00:00:00 2001 From: David Lundgren Date: Thu, 29 Oct 2020 02:27:39 +0000 Subject: [PATCH 1/2] backport of commit 0895c6b784fcd4650bcfe599a535a529a2502b84 --- builtin/aws/ecs/platform.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/aws/ecs/platform.go b/builtin/aws/ecs/platform.go index 6a2683eb2ad..dbd5baf8d86 100644 --- a/builtin/aws/ecs/platform.go +++ b/builtin/aws/ecs/platform.go @@ -1067,7 +1067,9 @@ func (p *Platform) Launch( SecurityGroups: []*string{sgecsport}, } - netCfg.AssignPublicIp = aws.String("ENABLED") + if p.config.EC2Cluster == false { + netCfg.AssignPublicIp = aws.String("ENABLED") + } s.Status("Creating ECS Service (%s, cluster-name: %s)", serviceName, clusterName) servOut, err := ecsSvc.CreateService(&ecs.CreateServiceInput{ From d7fa95c39d66a63aa60e6b6c8e67730e8efa3d1a Mon Sep 17 00:00:00 2001 From: David Lundgren Date: Thu, 29 Oct 2020 04:16:19 +0000 Subject: [PATCH 2/2] backport of commit 38f275e5b44756c4a82742804d171c0922cfc916 --- builtin/aws/ecs/platform.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/aws/ecs/platform.go b/builtin/aws/ecs/platform.go index dbd5baf8d86..f582aad87b0 100644 --- a/builtin/aws/ecs/platform.go +++ b/builtin/aws/ecs/platform.go @@ -1067,7 +1067,7 @@ func (p *Platform) Launch( SecurityGroups: []*string{sgecsport}, } - if p.config.EC2Cluster == false { + if !p.config.EC2Cluster { netCfg.AssignPublicIp = aws.String("ENABLED") }