Add security group parameters to ecs_patterns.LoadBalancedFargateService
Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.
-
I'm submitting a ...
- [ ] :beetle: bug report
- [x] :rocket: feature request
- [ ] :books: construct library gap
- [ ] :phone: security issue or vulnerability => Please see policy
- [ ] :question: support request => Please see note at the top of this template.
-
What is the current behavior? Default
ecs_patterns.LoadBalancedFargateServicewill create IAM roles and SGs but only IAM can be able to choose from its parameters, please add SGs parameters toLoadBalancedFargateService -
What is the expected behavior (or behavior of feature suggested)?
-
What is the motivation / use case for changing the behavior or adding this feature?
-
Please tell us about your environment:
- CDK CLI Version: 0.39.0 (build c3a3c88)
- Module Version: xx.xx.xx
- OS: Archlinux
- Language: Python
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)
Related: https://github.com/aws/aws-cdk/pull/3985, https://github.com/aws/aws-cdk/issues/2540
seems like this still a problem and no fix yet .
@vjain16 @tmpm697 I assume you mean specifying the security groups on the load balancer, or do you mean specifying SGs on the FargateService?
If its on the load-balancer, both NetworkLoadBalancedFargateService and ApplicationLoadBalancedFargateService allow passing your own load balancer construct as a prop.
On the service itself, you can access the connections object to add new security groups.
const fargateService = new ApplicationLoadBalancedFargateService(...);
fargateService.service.connections.addSecurityGroup(someSecurityGroup);
Closing for now since there hasn't been a response in a while. Feel free to reopen.