getmoto / moto

A library that allows you to easily mock out tests based on AWS infrastructure.
http://docs.getmoto.org/en/latest/
Apache License 2.0
7.49k stars 2k forks source link

Proposal: Support for FlowLogs #3332

Closed ljakimczuk closed 3 years ago

ljakimczuk commented 3 years ago

Hello,

moto does not seem to support the VPC Flow Logs, would you be interested in adding that? I've initially started to work on implementing a mock here, but before proceeding it would be good to know your position on this.

bblommers commented 3 years ago

Hi @ljakimczuk, that would definitely be a useful enhancement. PR's are always welcome!

Let me know if you need any assistence.

ljakimczuk commented 3 years ago

Glad to hear that @bblommers! If that's not too much to ask, would you like to take a quick look at the compare above? Maybe there is already something in there that you will find to be pointless, wrong or not fitting the rest of the library. It could be very helpful.

In short, the basic trio - create/describe/delete - seem to work. For now, I do not perform any checks against the DeliverLogPermissionArn or the LogGroupName as it seems the AWS does not do it either at the creation time. It does however later on indicate there is something wrong with them, by updating the Flow Logs status when delivery to CloudWatch fails. So I could optionally make some checks and create FLs with a failed status. Ah, and the tests look poor now, I will take care of them soon :)

Thank you @bblommers !

bblommers commented 3 years ago

This was implemented as part of #3337, and now part of moto >= 1.3.16.dev37