Skip to content

Commit

Permalink
test(ecs-patterns): update l3 fargate integ tests
Browse files Browse the repository at this point in the history
Previously, there were duplicate ALB fargate services being spun up.
This adds integ tests for NLB fargate services. Also gives integ test
stacks unique names.
  • Loading branch information
SoManyHs committed May 13, 2021
1 parent 0df9f9b commit 98fe157
Show file tree
Hide file tree
Showing 8 changed files with 531 additions and 1,133 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc"
"Value": "aws-ecs-integ-alb-fg-https/Vpc"
}
]
}
Expand All @@ -35,7 +35,7 @@
},
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet1"
"Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet1"
}
]
}
Expand All @@ -49,7 +49,7 @@
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet1"
"Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet1"
}
]
}
Expand Down Expand Up @@ -87,7 +87,7 @@
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet1"
"Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet1"
}
]
}
Expand All @@ -107,7 +107,7 @@
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet1"
"Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet1"
}
]
}
Expand All @@ -132,7 +132,7 @@
},
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet2"
"Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet2"
}
]
}
Expand All @@ -146,7 +146,7 @@
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet2"
"Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet2"
}
]
}
Expand Down Expand Up @@ -184,7 +184,7 @@
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet2"
"Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet2"
}
]
}
Expand All @@ -204,7 +204,7 @@
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet2"
"Value": "aws-ecs-integ-alb-fg-https/Vpc/PublicSubnet2"
}
]
}
Expand All @@ -229,7 +229,7 @@
},
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PrivateSubnet1"
"Value": "aws-ecs-integ-alb-fg-https/Vpc/PrivateSubnet1"
}
]
}
Expand All @@ -243,7 +243,7 @@
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PrivateSubnet1"
"Value": "aws-ecs-integ-alb-fg-https/Vpc/PrivateSubnet1"
}
]
}
Expand Down Expand Up @@ -291,7 +291,7 @@
},
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PrivateSubnet2"
"Value": "aws-ecs-integ-alb-fg-https/Vpc/PrivateSubnet2"
}
]
}
Expand All @@ -305,7 +305,7 @@
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PrivateSubnet2"
"Value": "aws-ecs-integ-alb-fg-https/Vpc/PrivateSubnet2"
}
]
}
Expand Down Expand Up @@ -339,7 +339,7 @@
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc"
"Value": "aws-ecs-integ-alb-fg-https/Vpc"
}
]
}
Expand Down Expand Up @@ -394,7 +394,7 @@
"myServiceLBSecurityGroupFE0ED608": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "Automatically created Security Group for ELB awsecsintegmyServiceLB1F7A535D",
"GroupDescription": "Automatically created Security Group for ELB awsecsintegalbfghttpsmyServiceLB8BEE3C49",
"SecurityGroupIngress": [
{
"CidrIp": "0.0.0.0/0",
Expand All @@ -416,7 +416,7 @@
}
}
},
"myServiceLBSecurityGrouptoawsecsintegmyServiceSecurityGroup8DAB521180B6703B07": {
"myServiceLBSecurityGrouptoawsecsintegalbfghttpsmyServiceSecurityGroup49C558AD803FB613FF": {
"Type": "AWS::EC2::SecurityGroupEgress",
"Properties": {
"GroupId": {
Expand Down Expand Up @@ -451,15 +451,15 @@
"LoadBalancerArn": {
"Ref": "myServiceLB168895E1"
},
"Port": 443,
"Protocol": "HTTPS",
"Certificates": [
{
"CertificateArn": {
"Ref": "myServiceCertificate152F9DDA"
}
}
]
],
"Port": 443,
"Protocol": "HTTPS"
}
},
"myServiceLBPublicListenerECSGroup17E9BBC1": {
Expand Down Expand Up @@ -513,8 +513,7 @@
"Type": "A",
"AliasTarget": {
"DNSName": {
"Fn::Join":
[
"Fn::Join": [
"",
[
"dualstack.",
Expand Down Expand Up @@ -589,7 +588,7 @@
"Arn"
]
},
"Family": "awsecsintegmyServiceTaskDefA3A33D18",
"Family": "awsecsintegalbfghttpsmyServiceTaskDef07C7D6BD",
"Memory": "512",
"NetworkMode": "awsvpc",
"RequiresCompatibilities": [
Expand Down Expand Up @@ -709,7 +708,7 @@
"myServiceSecurityGroupC3B9D4E0": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "aws-ecs-integ/myService/Service/SecurityGroup",
"GroupDescription": "aws-ecs-integ-alb-fg-https/myService/Service/SecurityGroup",
"SecurityGroupEgress": [
{
"CidrIp": "0.0.0.0/0",
Expand All @@ -722,7 +721,7 @@
}
}
},
"myServiceSecurityGroupfromawsecsintegmyServiceLBSecurityGroupFA544FE5800A81885C": {
"myServiceSecurityGroupfromawsecsintegalbfghttpsmyServiceLBSecurityGroupA934AF89808E9FB7A3": {
"Type": "AWS::EC2::SecurityGroupIngress",
"Properties": {
"IpProtocol": "tcp",
Expand Down Expand Up @@ -767,4 +766,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { App, Stack } from '@aws-cdk/core';
import { ApplicationLoadBalancedFargateService } from '../../lib';

const app = new App();
const stack = new Stack(app, 'aws-ecs-integ');
const stack = new Stack(app, 'aws-ecs-integ-alb-fg-https');
const vpc = new Vpc(stack, 'Vpc', { maxAzs: 2 });
const cluster = new Cluster(stack, 'Cluster', { vpc });

Expand Down
Loading

0 comments on commit 98fe157

Please sign in to comment.