diff --git a/packages/@aws-cdk/aws-eks/test/pinger/pinger.ts b/packages/@aws-cdk/aws-eks/test/pinger/pinger.ts index 1165da1ca90df..3702484a68339 100644 --- a/packages/@aws-cdk/aws-eks/test/pinger/pinger.ts +++ b/packages/@aws-cdk/aws-eks/test/pinger/pinger.ts @@ -12,6 +12,7 @@ export interface PingerProps { readonly url: string; readonly securityGroup?: ec2.SecurityGroup; readonly vpc?: ec2.IVpc; + readonly subnets?: ec2.ISubnet[]; } export class Pinger extends CoreConstruct { @@ -25,6 +26,7 @@ export class Pinger extends CoreConstruct { handler: 'index.handler', runtime: lambda.Runtime.PYTHON_3_6, vpc: props.vpc, + vpcSubnets: props.subnets ? { subnets: props.subnets } : undefined, securityGroups: props.securityGroup ? [props.securityGroup] : undefined, timeout: Duration.minutes(10), });