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(aws-ec2): add dependency on gateway attachment for public routes #1142

Merged
merged 5 commits into from
Nov 13, 2018

Conversation

clareliguori
Copy link
Member

@clareliguori clareliguori commented Nov 10, 2018

Fixes #1140. Currently there is a race condition when creating the public subnet routes for the ec2.VpcNetwork construct. CloudFormation can attempt to create the public subnet routes to the IGW before the IGW is attached to the VPC. This change adds a dependency to the public routes on the IGW attachment,

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

BREAKING CHANGE: Method signature of VpcPublicSubnet.addDefaultIGWRouteEntry changed in order to add a dependency on gateway attachment completing before creating the public route to the gateway. Instead of passing a gateway ID string, pass in a cloudformation.InternetGatewayResource object and a cloudformation.VPCGatewayAttachmentResource object.

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

Looks good. A couple of notes on PR description:

  • Use lower-case letters for the title
  • Describe the motivation for the change (why is the explicit dependency needed)
  • The "BREAKING CHANGE" section should be more detailed, so that someone how reads it will know exactly what broke and how they are supposed to continue to use this API.

packages/@aws-cdk/aws-ec2/lib/vpc.ts Show resolved Hide resolved
@clareliguori clareliguori changed the title fix(aws-ec2): Add dependency on gateway attachment for public routes fix(aws-ec2): add dependency on gateway attachment for public routes Nov 11, 2018
@eladb
Copy link
Contributor

eladb commented Nov 12, 2018

Please switch the order of paragraphs in the commit description so that the BREAKING CHANGE paragraph is last (as per conventionalcommits.

The reason we are particular about this is because we generate our changelogs from these, and if there’s a breaking change, everything below it will be taken.

@clareliguori
Copy link
Member Author

Done

@rix0rrr rix0rrr merged commit 15b255c into aws:master Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants