Skip to content

Commit f144775

Browse files
author
Nishant Burte
committed
VPC Flowlogs feature implementation
This change implements flowlogs in ec2 operator. It adds e2e tests for the flowlogs feature.
1 parent 5d460db commit f144775

40 files changed

+2940
-28
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2023-05-15T23:06:36Z"
3-
build_hash: 8f3ba427974fd6e769926778d54834eaee3b81a3
4-
go_version: go1.19
5-
version: v0.26.1
6-
api_directory_checksum: 6e86aa4f26729ce014485b1096286db654459af7
2+
build_date: "2023-06-14T17:05:27Z"
3+
build_hash: e04fca8e1fa32e988ff4dd9425d758ecc8a2a178
4+
go_version: go1.20.3
5+
version: v0.26.1-6-ge04fca8
6+
api_directory_checksum: a930caa16911411d04c5e7c14b27e077993d93a1
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.93
99
generator_config_info:
10-
file_checksum: cc2c6590c6e77a6125d5eec82ff5f693109d4f99
10+
file_checksum: dbba229402fe462b5d6b0b57027b3cfafd6bad61
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/flow_log.go

Lines changed: 146 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1alpha1/generator.yaml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ ignore:
77
- AllocateAddressInput.TagSpecifications
88
- CreateDhcpOptionsInput.DryRun
99
- CreateDhcpOptionsInput.TagSpecifications
10+
- CreateFlowLogsInput.DryRun
11+
- CreateFlowLogsInput.ClientToken
12+
- CreateFlowLogsInput.TagSpecifications
13+
- CreateFlowLogsInput.ResourceIds
14+
- CreateFlowLogsOutput.FlowLogIds
1015
- CreateInternetGatewayInput.DryRun
1116
- CreateInternetGatewayInput.TagSpecifications
1217
- CreateNatGatewayInput.ClientToken
@@ -141,6 +146,14 @@ operations:
141146
operation_type:
142147
- Delete
143148
resource_name: VpcEndpoint
149+
CreateFlowLogs:
150+
operation_type:
151+
- Create
152+
resource_name: FlowLog
153+
DeleteFlowLogs:
154+
operation_type:
155+
- Delete
156+
resource_name: FlowLog
144157
RunInstances:
145158
#ouput shape: Reservation
146159
output_wrapper_field_path: Instances
@@ -268,6 +281,42 @@ resources:
268281
template_path: hooks/elastic_ip_address/sdk_file_end.go.tpl
269282
update_operation:
270283
custom_method_name: customUpdateElasticIP
284+
FlowLog:
285+
exceptions:
286+
terminal_codes:
287+
- InvalidParameter
288+
- InvalidParameterValue
289+
fields:
290+
ResourceID:
291+
type: string
292+
is_required: true
293+
FlowLogID:
294+
type: string
295+
is_read_only: true
296+
is_primary_key: true
297+
Tags:
298+
from:
299+
operation: CreateTags
300+
path: Tags
301+
compare:
302+
is_ignored: True
303+
hooks:
304+
delta_pre_compare:
305+
code: compareTags(delta, a, b)
306+
sdk_create_post_build_request:
307+
template_path: hooks/flow_log/sdk_create_post_build_request.go.tpl
308+
sdk_create_post_set_output:
309+
template_path: hooks/flow_log/sdk_create_post_set_output.go.tpl
310+
sdk_delete_post_build_request:
311+
template_path: hooks/flow_log/sdk_delete_post_build_request.go.tpl
312+
sdk_read_many_pre_build_request:
313+
template_path: hooks/flow_log/sdk_read_many_pre_build_request.go.tpl
314+
sdk_read_many_post_build_request:
315+
template_path: hooks/flow_log/sdk_read_many_post_build_request.go.tpl
316+
sdk_file_end:
317+
template_path: hooks/flow_log/sdk_file_end.go.tpl
318+
update_operation:
319+
custom_method_name: customUpdateFlowLog
271320
InternetGateway:
272321
fields:
273322
Tags:
@@ -649,4 +698,4 @@ resources:
649698
template_path: hooks/vpc_endpoint/sdk_file_end.go.tpl
650699
update_operation:
651700
custom_method_name: customUpdateVPCEndpoint
652-
701+

apis/v1alpha1/types.go

Lines changed: 19 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)