Skip to content

Commit 55cbd30

Browse files
authored
Add Network ACL support in EC2 controller (#140)
Issue (aws-controllers-k8s/community#1559) Description of changes: Added support in EC2 controller for adding/updating/creating NACL. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 5d501f4 commit 55cbd30

32 files changed

+3883
-60
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2023-06-17T15:45:55Z"
2+
build_date: "2023-07-07T07:03:45Z"
33
build_hash: e9b68590da73ce9143ba1e4361cebdc1d876c81e
44
go_version: go1.19
55
version: v0.26.1-7-ge9b6859
6-
api_directory_checksum: 9452be5c34acba71fcd740b2acf4d053f2eb221b
6+
api_directory_checksum: 9af0bb4ef3924278a9490af8b0b6956a41cda601
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.93
99
generator_config_info:
10-
file_checksum: dbba229402fe462b5d6b0b57027b3cfafd6bad61
10+
file_checksum: 2630331c335136e1f45c564750f1d20b61a51b12
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ ignore:
1717
- CreateNatGatewayInput.ClientToken
1818
- CreateNatGatewayInput.DryRun
1919
- CreateNatGatewayInput.TagSpecifications
20+
- CreateNetworkAclInput.DryRun
21+
- CreateNetworkAclInput.TagSpecifications
2022
- CreateRouteInput.DryRun
2123
- CreateRouteInput.RouteTableId
2224
- CreateRouteTableInput.DryRun
@@ -81,7 +83,7 @@ ignore:
8183
- ManagedPrefixList
8284
#- NatGateway
8385
- NetworkAclEntry
84-
- NetworkAcl
86+
#- NetworkAcl
8587
- NetworkInsightsAccessScope
8688
- NetworkInsightsPath
8789
- NetworkInterfacePermission
@@ -140,6 +142,8 @@ operations:
140142
resource_name: ElasticIPAddress
141143
CreateNatGateway:
142144
output_wrapper_field_path: NatGateway
145+
CreateNetworkAcl:
146+
output_wrapper_field_path: NetworkAcl
143147
CreateVpcEndpoint:
144148
output_wrapper_field_path: VpcEndpoint
145149
DeleteVpcEndpoints:
@@ -514,6 +518,63 @@ resources:
514518
template_path: hooks/security_group/sdk_read_many_post_set_output.go.tpl
515519
update_operation:
516520
custom_method_name: customUpdateSecurityGroup
521+
NetworkAcl:
522+
fields:
523+
# support EC2-VPC only
524+
Id:
525+
is_primary_key: true
526+
print:
527+
path: Status.Id
528+
name: ID
529+
Associations:
530+
custom_field:
531+
list_of: NetworkAclAssociation
532+
Entries:
533+
custom_field:
534+
list_of: NetworkAclEntry
535+
Tags:
536+
from:
537+
operation: CreateTags
538+
path: Tags
539+
compare:
540+
is_ignored: True
541+
VpcId:
542+
is_required: true
543+
references:
544+
resource: VPC
545+
path: Status.VPCID
546+
Associations.SubnetID:
547+
references:
548+
resource: Subnet
549+
path: Status.SubnetID
550+
renames:
551+
operations:
552+
CreateNetworkAcl:
553+
output_fields:
554+
NetworkAclId: Id
555+
DeleteNetworkAcl:
556+
input_fields:
557+
NetworkAclId: Id
558+
DescribeNetworkAcls:
559+
input_fields:
560+
NetworkAclIds: Ids
561+
CreateNetworkAclEntry:
562+
input_fields:
563+
NetworkAclId: Id
564+
ReplaceNetworkAclEntry:
565+
input_fields:
566+
NetworkAclId: Id
567+
hooks:
568+
delta_pre_compare:
569+
code: compareTags(delta, a, b)
570+
sdk_create_post_build_request:
571+
template_path: hooks/network_acl/sdk_create_post_build_request.go.tpl
572+
sdk_file_end:
573+
template_path: hooks/network_acl/sdk_file_end.go.tpl
574+
sdk_create_post_set_output:
575+
template_path: hooks/network_acl/sdk_create_post_set_output.go.tpl
576+
update_operation:
577+
custom_method_name: customUpdateNetworkAcl
517578
Subnet:
518579
fields:
519580
# code-generator infers fields into

apis/v1alpha1/network_acl.go

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

apis/v1alpha1/types.go

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

0 commit comments

Comments
 (0)