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(ec2): flowLogName property for FlowLog construct does not work #26371

Merged
merged 4 commits into from
Aug 3, 2023

Conversation

tam0ri
Copy link
Contributor

@tam0ri tam0ri commented Jul 14, 2023

Currently, flowLogName property for FlowLog L2 is never referred in generated CloudFormation template. This PR solves the issue by adding Name tag with the value of flowLogName property.

Closes #26370


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

@aws-cdk-automation aws-cdk-automation requested a review from a team July 14, 2023 16:18
@github-actions github-actions bot added repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK bug This issue is a bug. p2 labels Jul 14, 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.

@tam0ri tam0ri changed the title fix:(ec2): flowLogName property for FlowLog construct does not work fix(ec2): flowLogName property for FlowLog construct does not work Jul 14, 2023
@tam0ri
Copy link
Contributor Author

tam0ri commented Jul 14, 2023

I'll do integ test and add snapshots later.

@watany-dev
Copy link
Contributor

Are you saying that originally this resource did not have a property to attach a first place identifier, but L2Constructs had an interface? The method of assigning a Name tag makes sense, but I thought that as a user of CDK constructs, I should be able to determine in advance whether it is a standard Nameid or tag support. Otherwise, users may use this property and Nametag at the same time.

@tam0ri
Copy link
Contributor Author

tam0ri commented Jul 15, 2023

@watany-dev Thank you for your comment. The physical ID (identifier) for AWS::EC2::FlowLog resource is flow log id. It's automatically generated by EC2 CreateFlowLogs API, and users can't define this id. Also, VPC flow log itself does not have a property like name in the API model. So, we can't specify the resource name in neither EC2 API and CloudFormation.

From the above technical background, currently flowLogName property for FlowLog construct is never used in generated CloudFormation template. This fix will utilize this property as the tag value for this resource. If Name tag is attached to flow log, VPC console shows the value as Name. Does it makes sense?

@aws-cdk-automation aws-cdk-automation dismissed their stale review July 18, 2023 08:44

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

@watany-dev
Copy link
Contributor

  1. disable flowLogName specification following CFn
  2. treat it as a Tag like this commit, and emphasize that it should be expressed as a Nametag so that users understand it.
    I personally think 2 is the way to go, but I'm waiting to see what the owners of CDK think.

@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 Jul 18, 2023
@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

Copy link
Contributor

@lpizzinidev lpizzinidev 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 to me 👍
Thanks for the contribution!

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Aug 3, 2023
@rix0rrr
Copy link
Contributor

rix0rrr commented Aug 3, 2023

Thanks!

@mergify
Copy link
Contributor

mergify bot commented Aug 3, 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).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Aug 3, 2023
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: f19e8c9
  • 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 f910f78 into aws:main Aug 3, 2023
13 checks passed
@mergify
Copy link
Contributor

mergify bot commented Aug 3, 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 bot pushed a commit that referenced this pull request Aug 29, 2023
Currently, networkAclName property for NetworkAcl L2 is never referred in generated CloudFormation template. This PR solves the issue by adding Name tag with the value of networkAclName property. This fix is similar to #26371

Closes #26897

----

*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
bug This issue is a bug. p2 repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ec2: flowLogName property in FlowLog construct does not work
5 participants