Skip to content

Question: Get underlying Load Balancer from HttpLoadBalancerExtensionΒ #413

@expertcoder

Description

@expertcoder

Hi, I have the following CDK

const httpLoadBalancerExtension = new HttpLoadBalancerExtension();
serviceDescription.add(httpLoadBalancerExtension);

new cloudfront.Distribution(this, id + 'Distribution', {
    defaultBehavior: {
        origin: new origins.LoadBalancerV2Origin(httpLoadBalancerExtension.loadBalancer),
        .....

I want to create a CloudFront distrubution using the Load Balancer as an origin, however the loadBalancer property of HttpLoadBalancerExtension is private, and I cant see any other methods which would allow access to loadBalancer.

Woundn't the CDK code above be a legitimate reason to need access to the underlying Load Balancer?

How would I acheive what I am trying to do?

Thanks for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions