Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ecs-patterns): Add support to define specific subnets and security groups on QueueProcessingFargateService construct #12603

Closed
1 of 2 tasks
lgvo opened this issue Jan 19, 2021 · 1 comment · Fixed by #12604
Assignees
Labels
@aws-cdk/aws-ecs-patterns Related to ecs-patterns library feature-request A feature should be added or improved.

Comments

@lgvo
Copy link
Contributor

lgvo commented Jan 19, 2021

Add support to define specific subnets and security groups on QueueProcessingFargateService.

Use Case

I want to be able to specific subnets and security groups for my Fargate service on QueueProcessingFargateService construct.

Example: Allow better security posture with isolated subnets and specific security groups.

Proposed Solution

  const queueProcessingService = new QueueProcessingFargateService(stack, 'queue-processing', {
        vpc,
        image: ContainerImage.fromDockerImageAsset(dockerImage),
        taskSubnets: { subnetType: ec2.SubnetType.ISOLATED },
        securityGroups: [securityGroup]
    });

Other

Current work around:

  const queueProcessingService = new QueueProcessingFargateService(stack, 'queue-processing', {
        vpc,
        image: ContainerImage.fromDockerImageAsset(dockerImage),
    });
    const cfnService = queueProcessingService.service.node.children[0] as ecs.CfnService;
    cfnService.networkConfiguration = {
        awsvpcConfiguration: {
            assignPublicIp: 'DISABLED',
            subnets: vpc.isolatedSubnets.map(s => s.subnetId),
            securityGroups: [securityGroup.securityGroupId]
        }
    };
  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@lgvo lgvo added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 19, 2021
@SoManyHs SoManyHs added the @aws-cdk/aws-ecs-patterns Related to ecs-patterns library label Jan 20, 2021
@SoManyHs SoManyHs removed the needs-triage This issue or PR still needs to be triaged. label Jan 20, 2021
@mergify mergify bot closed this as completed in #12604 Feb 17, 2021
mergify bot pushed a commit that referenced this issue Feb 17, 2021
… QueueProcessingFagateService (#12604)

Fixes #12603 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

NovakGu pushed a commit to NovakGu/aws-cdk that referenced this issue Feb 18, 2021
… QueueProcessingFagateService (aws#12604)

Fixes aws#12603 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
eladb pushed a commit that referenced this issue Feb 22, 2021
… QueueProcessingFagateService (#12604)

Fixes #12603 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs-patterns Related to ecs-patterns library feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants