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-elasticloadbalancingv2): fix load balancer deletion protection to properly update when set to false #9986

Merged
merged 2 commits into from
Sep 3, 2020

Conversation

jericht
Copy link
Contributor

@jericht jericht commented Aug 26, 2020

Fixes #9975

Notes

  • Changed load balancer deletion protection to also set the attribute to false, instead of omitting the attribute when deletionProtection is false.
  • Added unit test to verify the attribute is set with false in this case
  • Fixed other load balancer unit tests that were broken due to adding this attribute when deletionProtection is false
  • Updated expected.json files for integ tests to include this attribute when deletionProtection is false

Main changes

  • packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts
  • packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts
  • packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/load-balancer.test.ts

Changes for expected.json files

  • Everything else

Testing

  • Ran unit tests and ensured they succeeded
  • Deploy a load balancer with deletion protection on, set it to false in CDK code, then redeploy and ensure it gets turned off

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

@jericht
Copy link
Contributor Author

jericht commented Aug 26, 2020

Looks like multiple integration tests are affected. Will take some time to update all the snapshots.

@jericht jericht force-pushed the lb_deletion_protection branch 3 times, most recently from d424001 to 910eeb5 Compare September 2, 2020 20:07
@jericht jericht marked this pull request as ready for review September 2, 2020 22:12
@jericht
Copy link
Contributor Author

jericht commented Sep 2, 2020

@njlynch This is ready for review now

Copy link
Contributor

@njlynch njlynch left a comment

Choose a reason for hiding this comment

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

Thanks for the this PR! 1 line change, 239 lines of test updates! :D

@mergify
Copy link
Contributor

mergify bot commented Sep 3, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: e296817
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Sep 3, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

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.

[aws-elasticloadbalancingv2] Load Balancer deletion protection is not disabled when set to false
3 participants