-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(elb): set accessLoggingPolicy property with L2 LoadBalancer #14983
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from the comment I left it looks good. However because you are adding a new property, I'll need you to include tests
@@ -262,6 +273,10 @@ export class LoadBalancer extends Resource implements IConnectable { | |||
this.elb.node.addDependency(selectedSubnets.internetConnectivityEstablished); | |||
} | |||
|
|||
if (props?.accessLogPolicy?.enabled) { | |||
this.elb.accessLoggingPolicy = Object.assign(props.accessLogPolicy, { enabled: true } ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you using Object.assign()
here to make sure enabled is set to true? Isn't that redundant with the if (enabled)
statement the line above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes . Object.assign not required at all as enabled already checked. I'll update and add test as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you very much for your fast contribution!
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). |
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 CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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). |
Using cdk we can enable access logs for elb.Loadbalancer
fixes #14972
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license