aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

Add security group parameters to ecs_patterns.LoadBalancedFargateService

Open tmpm697 opened this issue 7 years ago • 4 comments

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.LoadBalancedFargateService will create IAM roles and SGs but only IAM can be able to choose from its parameters, please add SGs parameters to LoadBalancedFargateService

  • 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)

tmpm697 avatar Jul 11 '19 03:07 tmpm697

Related: https://github.com/aws/aws-cdk/pull/3985, https://github.com/aws/aws-cdk/issues/2540

SoManyHs avatar Oct 03 '19 19:10 SoManyHs

seems like this still a problem and no fix yet .

vjain16 avatar Dec 19 '19 14:12 vjain16

@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);

Connections Docs

MrArnoldPalmer avatar Mar 14 '20 01:03 MrArnoldPalmer

Closing for now since there hasn't been a response in a while. Feel free to reopen.

SomayaB avatar Mar 25 '20 02:03 SomayaB