cdk-eks-blueprints icon indicating copy to clipboard operation
cdk-eks-blueprints copied to clipboard

Support custom subnets for EKS cluster creation

Open starchx opened this issue 3 years ago • 1 comments

As a consumer, I would like to create the EKS cluster with custom subnets using SSP, so I do not need to rely on CDK subnet types.

The idea is to follow the current VPC resource provider implementation, and add subnets as a new resource provider.

export declare interface ResourceProvider<T extends IResource = IResource> {
    provide(context: ResourceContext): T | T[];
}
SubnetSelectionResourceProvider implements ResourceProvider {

    constructor(private vpcResoureName, private readonly SubnetSelection) {}

    provide(...) {
        const vpc = getVpcResource(stack);
        const selection = vpc.selectSubnets({
           subnetType: ec2.SubnetType.PRIVATE_WITH_NAT
         });

        return selection.subnets; 
    }
}

starchx avatar Feb 14 '22 01:02 starchx

@anjanaviyer is working on this.

starchx avatar Feb 14 '22 01:02 starchx

The public subnets created by blueprints got Security Hub failed check.

This control checks if the assignment of public IPs in Amazon Virtual Private Cloud (VPC) subnets have the MapPublicIpOnLaunch set to FALSE. The control will pass if the flag is set to FALSE

@starchx @shapirov103 can you please help support this?

vumdao avatar Jan 28 '23 15:01 vumdao

This issue has been automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] avatar Jul 20 '23 00:07 github-actions[bot]

Issue closed due to inactivity.

github-actions[bot] avatar Sep 18 '23 00:09 github-actions[bot]