From 6798ad12451823ef8cc5113203249e108800f069 Mon Sep 17 00:00:00 2001 From: Guillaume Lours Date: Mon, 18 May 2020 11:36:42 +0200 Subject: [PATCH] Add security group declaration in cloudformation conversion tests Signed-off-by: Guillaume Lours Signed-off-by: Nicolas De Loof --- .../simple-cloudformation-conversion.golden | 25 +++++++++++++++++++ ...formation-with-overrides-conversion.golden | 25 +++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/ecs/pkg/amazon/testdata/simple/simple-cloudformation-conversion.golden b/ecs/pkg/amazon/testdata/simple/simple-cloudformation-conversion.golden index d0e632d9..0910aaf3 100644 --- a/ecs/pkg/amazon/testdata/simple/simple-cloudformation-conversion.golden +++ b/ecs/pkg/amazon/testdata/simple/simple-cloudformation-conversion.golden @@ -58,6 +58,26 @@ }, "Type": "AWS::Logs::LogGroup" }, + "TestSimpleConvertDefaultNetwork": { + "Properties": { + "GroupDescription": "TestSimpleConvert default Security Group", + "GroupName": "TestSimpleConvertDefaultNetwork", + "Tags": [ + { + "Key": "com.docker.compose.project", + "Value": "TestSimpleConvert" + }, + { + "Key": "com.docker.compose.network", + "Value": "default" + } + ], + "VpcId": { + "Ref": "ParameterVPCId" + } + }, + "Type": "AWS::EC2::SecurityGroup" + }, "simpleService": { "Properties": { "Cluster": { @@ -76,6 +96,11 @@ "NetworkConfiguration": { "AwsvpcConfiguration": { "AssignPublicIp": "ENABLED", + "SecurityGroups": [ + { + "Ref": "TestSimpleConvertDefaultNetwork" + } + ], "Subnets": [ { "Ref": "ParameterSubnet1Id" diff --git a/ecs/pkg/amazon/testdata/simple/simple-cloudformation-with-overrides-conversion.golden b/ecs/pkg/amazon/testdata/simple/simple-cloudformation-with-overrides-conversion.golden index 5e641af5..7c413438 100644 --- a/ecs/pkg/amazon/testdata/simple/simple-cloudformation-with-overrides-conversion.golden +++ b/ecs/pkg/amazon/testdata/simple/simple-cloudformation-with-overrides-conversion.golden @@ -58,6 +58,26 @@ }, "Type": "AWS::Logs::LogGroup" }, + "TestSimpleWithOverridesDefaultNetwork": { + "Properties": { + "GroupDescription": "TestSimpleWithOverrides default Security Group", + "GroupName": "TestSimpleWithOverridesDefaultNetwork", + "Tags": [ + { + "Key": "com.docker.compose.project", + "Value": "TestSimpleWithOverrides" + }, + { + "Key": "com.docker.compose.network", + "Value": "default" + } + ], + "VpcId": { + "Ref": "ParameterVPCId" + } + }, + "Type": "AWS::EC2::SecurityGroup" + }, "simpleService": { "Properties": { "Cluster": { @@ -76,6 +96,11 @@ "NetworkConfiguration": { "AwsvpcConfiguration": { "AssignPublicIp": "ENABLED", + "SecurityGroups": [ + { + "Ref": "TestSimpleWithOverridesDefaultNetwork" + } + ], "Subnets": [ { "Ref": "ParameterSubnet1Id"