Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: simplify props for GuClassicLoadBalancer #362

Merged
merged 1 commit into from
Mar 30, 2021
Merged

Conversation

akash1810
Copy link
Member

What does this change?

Removes the propertiesToRemove prop. It looks like we were using this to set the scheme on the load balancer, however this is already being driven by the internetFacing prop provided by AWS.

For a scheme of "internal", set internetFacing to false. For a scheme of "internet-facing", set internetFacing to true.

See:

Does this change require changes to existing projects or CDK CLI?

Yes - the props to GuClassicLoadBalancer is changing, with propertiesToRemove disappearing, so stacks would need to migrate. The migration is just setting a boolean however, so not too bad.

How to test

n/a

How can we measure success?

A simpler API to the construct.

Have we considered potential risks?

n/a

Removes the `propertiesToRemove` prop. It looks like we were using this to set the scheme on the load balancer, however this is already being driven by the `internetFacing` prop provided by AWS.

For a scheme of "internal", set `internetFacing` to `false`. For a scheme of "internet-facing", set `internetFacing` to `true`.

See:
- https://github.com/aws/aws-cdk/blob/fb6512314db1b11fc608cd62753090684ad0d3c4/packages/%40aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts#L249
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb.html#cfn-ec2-elb-scheme
@akash1810 akash1810 requested a review from a team March 30, 2021 07:14
Copy link
Contributor

@jacobwinch jacobwinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems sensible to me 👍

If @aws/cdk adds this property by default, perhaps we should mention it here (I think it's optional in CFN, so many stacks may not have this value explicitly set).

@akash1810
Copy link
Member Author

akash1810 commented Mar 30, 2021

If @aws/cdk adds this property by default, perhaps we should mention it here (I think it's optional in CFN, so many stacks may not have this value explicitly set).

This change is part of my bigger plans to simplify the load balancing constructs. That is, 👍🏽 to documentation, however I'd be tempted to delay it once the other load balancing changes have shipped too.

The theme of the wider changes is to create a set of custom props, rather than extending AWS's. This should make it easier to set defaults and also to understand what those defaults are.

@akash1810 akash1810 merged commit 2ea989d into main Mar 30, 2021
@akash1810 akash1810 deleted the aa-elb-scheme branch March 30, 2021 09:55
@github-actions
Copy link
Contributor

🎉 This PR is included in version 6.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants