For internal reasons we're locked into CDK 1.32 which has a lot of missing features such as adding a security group to an application load balancer
This is what I'm trying to accomplish
const sg_port_80 = ec2.SecurityGroup.fromSecurityGroupId(this, 'SG', props.sg_port_80, {
mutable: false
})
this.fargateService = new ecs_patterns.ApplicationLoadBalancedFargateService(this, 'MyFargateService', {
cluster: props.ecsCluster,
cpu: 256,
desiredCount: 1,
taskImageOptions: {image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample')},
memoryLimitMiB: 512,
publicLoadBalancer: true,
securityGroups: [sg_port_80]
})
The problem with this is that it doesn't work with CDK 1.32. What I'm trying to do is add an existing security group to the application load balanced fargate service. Is anyone familiar with how I would be able to accomplish this in CDK 1.32?