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(cloudfront): Add RealtimeLogConfig to Distribution #26808

Merged
merged 22 commits into from
Aug 24, 2023

Conversation

jamiepmullan
Copy link
Contributor

@jamiepmullan jamiepmullan commented Aug 18, 2023

Pull request to implement RealtimeLogConfig on CloudFront Distribution.
As well as being able to use RealtimeLogConfigArn on Distribution, I also added RealtimeLogConfig as a Construct so that the Cfn is abstracted too.

The reason this is needed so that we can add realtime log config to a Distribution without reverting to using CfnDistribution.

Closes #.


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

@jamiepmullan jamiepmullan changed the title feat(aws-cloudformation): Add RealtimeLogConfig to Distribution feat(aws-cloudfront): Add RealtimeLogConfig to Distribution Aug 18, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team August 18, 2023 15:27
@github-actions github-actions bot added p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Aug 18, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@jamiepmullan jamiepmullan changed the title feat(aws-cloudfront): Add RealtimeLogConfig to Distribution feat(cloudfront): Add RealtimeLogConfig to Distribution Aug 18, 2023
add snapshot
@aws-cdk-automation aws-cdk-automation dismissed their stale review August 18, 2023 16:01

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

Copy link
Contributor

@colifran colifran left a comment

Choose a reason for hiding this comment

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

@jamiepmullan Thanks for getting this started! I left some initial comments for you to review.

@mergify mergify bot dismissed colifran’s stale review August 18, 2023 17:13

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Aug 19, 2023
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Aug 21, 2023
add iam tests
make name optional
Copy link
Contributor

@jogold jogold left a comment

Choose a reason for hiding this comment

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

Look great! A few more minor things...

@jamiepmullan
Copy link
Contributor Author

@jogold thanks for the reviews! I really appreciate it

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Aug 22, 2023

constructor(scope: Construct, id: string, props: RealtimeLogConfigProps) {
super(scope, id, {
physicalName: props.realtimeLogConfigName ?? Lazy.string({ produce: () => Names.uniqueId(this) }),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we prefer Names.uniqueResourceName for this. Also I don't think this needs to be Lazy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will revert this change...

Copy link
Contributor

Choose a reason for hiding this comment

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

You need Lazy here otherwise you cannot call this because super() has not been called yet...

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh yeah you're right!

Copy link
Contributor Author

@jamiepmullan jamiepmullan Aug 23, 2023

Choose a reason for hiding this comment

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

in that case - do we want Names.uniqueId or Names.uniqueResourceName? (i assume the latter based on your previous comment)

Copy link
Contributor

@colifran colifran left a comment

Choose a reason for hiding this comment

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

@jamiepmullan Looking good! I added some comments. Thanks for your continued work on this :)

@mergify mergify bot dismissed colifran’s stale review August 22, 2023 19:22

Pull request has been modified.

colifran
colifran previously approved these changes Aug 24, 2023
Copy link
Contributor

@colifran colifran left a comment

Choose a reason for hiding this comment

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

@jamiepmullan Great work! Thanks for your contribution.

@mergify
Copy link
Contributor

mergify bot commented Aug 24, 2023

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

@mergify mergify bot dismissed colifran’s stale review August 24, 2023 17:51

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 7f70738
  • 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 Aug 24, 2023

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

@mergify mergify bot merged commit b1f4e27 into aws:main Aug 24, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants