Skip to content

Commit 67545f7

Browse files
authored
late init VPCEndpoint.PolicyDocument field (#47)
Issue #, if available: aws-controllers-k8s/community#1205 Description of changes: * Late initializes `PolicyDocument` field so VPCEndpoint can achieve Synced state if `PolicyDocument` is not provided in the Spec. This is necessary because the API [defaults PolicyDocument](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVpcEndpoint.html), if not provided. * Updates related test By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 8c53852 commit 67545f7

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2022-03-29T17:33:11Z"
3-
build_hash: 6f659f796434e8fd6443c0b3a5b495daae910035
4-
go_version: go1.17.8
5-
version: v0.18.0
2+
build_date: "2022-03-30T20:36:15Z"
3+
build_hash: c6b852a8017aa73cfc5a882b1ba60c88d820e967
4+
go_version: go1.17
5+
version: v0.18.1
66
api_directory_checksum: e5bf2003f6be051fdeda5059df47eb7fff0a9c86
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.42.0
99
generator_config_info:
10-
file_checksum: c041dcc9493bdd9baed2e0599d8bc4401b5f2d25
10+
file_checksum: e017fb539a06710c6713157e5f61e2a0c20e70ba
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ resources:
281281
template_path: hooks/vpc/sdk_read_many_post_set_output.go.tpl
282282
VpcEndpoint:
283283
fields:
284+
PolicyDocument:
285+
late_initialize: {}
284286
VpcId:
285287
references:
286288
resource: VPC

generator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ resources:
281281
template_path: hooks/vpc/sdk_read_many_post_set_output.go.tpl
282282
VpcEndpoint:
283283
fields:
284+
PolicyDocument:
285+
late_initialize: {}
284286
VpcId:
285287
references:
286288
resource: VPC

pkg/resource/vpc_endpoint/manager.go

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

test/e2e/tests/test_references.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def test_references(self, ec2_client):
118118
assert k8s.wait_on_condition(vpc_ref, "ACK.ResourceSynced", "True", wait_periods=5)
119119
assert k8s.wait_on_condition(sg_ref, "ACK.ResourceSynced", "True", wait_periods=5)
120120
assert k8s.wait_on_condition(subnet_ref, "ACK.ResourceSynced", "True", wait_periods=5)
121+
assert k8s.wait_on_condition(vpc_endpoint_ref, "ACK.ResourceSynced", "True", wait_periods=5)
121122

122123
assert k8s.wait_on_condition(sg_ref, "ACK.ReferencesResolved", "True", wait_periods=5)
123124
assert k8s.wait_on_condition(subnet_ref, "ACK.ReferencesResolved", "True", wait_periods=5)

0 commit comments

Comments
 (0)