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

feat(ecs-patterns): Add support for assignPublicIp for QueueProcessingFargateService #13122

Merged
merged 4 commits into from
Feb 18, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion packages/@aws-cdk/aws-ecs-patterns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ const queueProcessingFargateService = new QueueProcessingFargateService(stack, '
});
```

### Set taskSubnets and securityGroups on QueueProcessingFargateService
### Set taskSubnets and securityGroups for QueueProcessingFargateService

```ts
const queueProcessingFargateService = new QueueProcessingFargateService(stack, 'Service', {
Expand All @@ -425,6 +425,17 @@ const queueProcessingFargateService = new QueueProcessingFargateService(stack, '
});
```

### Define tasks with public IPs for QueueProcessingFargateService

```ts
const queueProcessingFargateService = new QueueProcessingFargateService(stack, 'Service', {
vpc,
memoryLimitMiB: 512,
image: ecs.ContainerImage.fromRegistry('test'),
assignPublicIp: true,
});
```

### Select specific vpc subnets for ApplicationLoadBalancedFargateService

```ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ export interface QueueProcessingFargateServiceProps extends QueueProcessingServi
* @default - A new security group is created.
*/
readonly securityGroups?: ec2.ISecurityGroup[];

/**
* Specifies whether the task's elastic network interface receives a public IP address.
*
* If true, each task will receive a public IP address.
*
* @default false
*/
readonly assignPublicIp?: boolean;
}

/**
Expand Down Expand Up @@ -134,6 +143,7 @@ export class QueueProcessingFargateService extends QueueProcessingServiceBase {
deploymentController: props.deploymentController,
securityGroups: props.securityGroups,
vpcSubnets: props.taskSubnets,
assignPublicIp: props.assignPublicIp,
});
this.configureAutoscalingForService(this.service);
this.grantPermissionsToService(this.service);
Expand Down
Loading