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

FlowLog: add support for log_format parameter #19316

Closed
1 of 2 tasks
charbyzard opened this issue Mar 9, 2022 · 4 comments · Fixed by #22430
Closed
1 of 2 tasks

FlowLog: add support for log_format parameter #19316

charbyzard opened this issue Mar 9, 2022 · 4 comments · Fixed by #22430
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@charbyzard
Copy link

Description

It would be nice if passing a value for the VPC FlowLog logFormat parameter was exposed through the higher-level FlowLog construct. Currently, the only way to use this feature seems to be through the lower level CfnFlowLog construct.

It seems like the L2 construct for FlowLogs was introduced before this feature came out and simply never got updated.

Use Case

The current default is to use log only the values defined in the v2 specification, which excludes a lot of useful information (such as the tcp_flags parameter, which indicates if a given packet was SYN/ACK/SYN-ACK/RST/FIN). The only way to specify a custom log format that includes desirable information is to use the lower level CloudFormation wrapper construct, which is more cumbersome to work with.

Proposed Solution

Update the FlowLog module to support the logFormat property.

Other information

Reference documentation: Logging IP traffic with VPC Flow Logs

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@charbyzard charbyzard added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Mar 9, 2022
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Mar 9, 2022
@corymhall
Copy link
Contributor

@charbyzard we currently have an open PR to implement this functionality.

#16279

@corymhall corymhall added effort/small Small work item – less than a day of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Mar 10, 2022
@corymhall corymhall removed their assignment Mar 10, 2022
@ghost
Copy link

ghost commented Apr 12, 2022

@charbyzard I won't have time to work on #16279 for a while so don't hesitate if you want to contribute

@watany-dev
Copy link
Contributor

Yes, I will continue to work on this.

watany-dev added a commit to watany-dev/aws-cdk that referenced this issue Oct 9, 2022
watany-dev added a commit to watany-dev/aws-cdk that referenced this issue Oct 15, 2022
@mergify mergify bot closed this as completed in #22430 Nov 11, 2022
mergify bot pushed a commit that referenced this issue Nov 11, 2022
refer to #16279 and #16279 (comment).  The difference is below

- I don't think you need custom for `LogFormatField`. "custom" in the document below does not mean that the user can specify any Key. It means that you can specify any Key of "Available fields" with a space-separated string.
https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-logs-fields


fixes #19316

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
3 participants