Skip to content

(aws-eks-v2-alpha): kubectl provider function cannot be placed outside of VPC #34877

Open
@msessa

Description

@msessa

Describe the bug

When a Cluster is provisioned with endpointAccess: eks.EndpointAccess.PUBLIC, the kubectl handler function is provisioned outside of a VPC but not its associated Provider function

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Library Version

No response

Expected Behavior

When a cluster is provisioned with endpointAccess: eks.EndpointAccess.PUBLIC both kubectl handler and kubectl provider functions should not have a VpcConfig associated

Current Behavior

The Handler lambda function doesn't receive a VpcConfig but its associated Provider function does.

Reproduction Steps

The following test fails

test('public non restricted', () => {
      new eks.Cluster(stack, 'Cluster', {
        version: CLUSTER_VERSION,
        endpointAccess: eks.EndpointAccess.PUBLIC,
        kubectlProviderOptions: {
          kubectlLayer: new KubectlV32Layer(stack, 'kubectlLayer'),
        },
      });


      Template.fromStack(stack).allResourcesProperties('AWS::Lambda::Function', {
        VpcConfig: Match.absent(),
      });
    });

Possible Solution

No response

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

2.203.0

AWS CDK CLI version

latest

Node.js Version

20

OS

Max

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-lambdaRelated to AWS LambdabugThis issue is a bug.effort/mediumMedium work item – several days of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions