|
| 1 | +import * as ec2 from '@aws-cdk/aws-ec2'; |
1 | 2 | import { FargatePlatformVersion, FargateService, FargateTaskDefinition } from '@aws-cdk/aws-ecs'; |
2 | 3 | import { Construct } from 'constructs'; |
3 | 4 | import { QueueProcessingServiceBase, QueueProcessingServiceBaseProps } from '../base/queue-processing-service-base'; |
@@ -66,6 +67,20 @@ export interface QueueProcessingFargateServiceProps extends QueueProcessingServi |
66 | 67 | * @default - QueueProcessingContainer |
67 | 68 | */ |
68 | 69 | readonly containerName?: string; |
| 70 | + |
| 71 | + /** |
| 72 | + * The subnets to associate with the service. |
| 73 | + * |
| 74 | + * @default - Public subnets if `assignPublicIp` is set, otherwise the first available one of Private, Isolated, Public, in that order. |
| 75 | + */ |
| 76 | + readonly taskSubnets?: ec2.SubnetSelection; |
| 77 | + |
| 78 | + /** |
| 79 | + * The security groups to associate with the service. If you do not specify a security group, the default security group for the VPC is used. |
| 80 | + * |
| 81 | + * @default - A new security group is created. |
| 82 | + */ |
| 83 | + readonly securityGroups?: ec2.ISecurityGroup[]; |
69 | 84 | } |
70 | 85 |
|
71 | 86 | /** |
@@ -117,6 +132,8 @@ export class QueueProcessingFargateService extends QueueProcessingServiceBase { |
117 | 132 | enableECSManagedTags: props.enableECSManagedTags, |
118 | 133 | platformVersion: props.platformVersion, |
119 | 134 | deploymentController: props.deploymentController, |
| 135 | + securityGroups: props.securityGroups, |
| 136 | + vpcSubnets: props.taskSubnets, |
120 | 137 | }); |
121 | 138 | this.configureAutoscalingForService(this.service); |
122 | 139 | this.grantPermissionsToService(this.service); |
|
0 commit comments