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

feat(elb): set accessLoggingPolicy property with L2 LoadBalancer #14983

Merged
merged 12 commits into from
Jun 7, 2021

Conversation

ramancloudsmartz
Copy link
Contributor

@ramancloudsmartz ramancloudsmartz commented Jun 4, 2021

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

@gitpod-io
Copy link

gitpod-io bot commented Jun 4, 2021

Copy link
Contributor

@peterwoodworth peterwoodworth left a 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 } );
Copy link
Contributor

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?

Copy link
Contributor Author

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

@peterwoodworth peterwoodworth self-assigned this Jun 4, 2021
@peterwoodworth peterwoodworth added the @aws-cdk/aws-elasticloadbalancing Related to Amazon Elastic Load Balancing label Jun 4, 2021
Copy link
Contributor

@peterwoodworth peterwoodworth 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, thank you very much for your fast contribution!

@peterwoodworth peterwoodworth added the pr-linter/exempt-readme The PR linter will not require README changes label Jun 7, 2021
@mergify
Copy link
Contributor

mergify bot commented Jun 7, 2021

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).

@mergify
Copy link
Contributor

mergify bot commented Jun 7, 2021

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: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 019b655
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit 252dfa2 into aws:master Jun 7, 2021
@mergify
Copy link
Contributor

mergify bot commented Jun 7, 2021

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).

hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
…#14983)

Using cdk we can enable access logs for elb.Loadbalancer
fixes aws#14972

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-elasticloadbalancing Related to Amazon Elastic Load Balancing pr-linter/exempt-readme The PR linter will not require README changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(elb) set accessLoggingPolicy property with L2 LoadBalancer
3 participants