Skip to content

Commit 9b8a789

Browse files
Add resource references (#40)
Description of changes: Adds every possible resource reference to each of the resources in the group By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent d96d056 commit 9b8a789

24 files changed

+884
-34
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-02T19:07:54Z"
3-
build_hash: ade2429bb444ab635916395ea5773d141ba135e1
4-
go_version: go1.17.5
2+
build_date: "2022-03-14T23:35:32Z"
3+
build_hash: 00cd850c16117752abe18558326a508436565b1a
4+
go_version: go1.17.8
55
version: v0.17.2
6-
api_directory_checksum: ad688fd5a2b395bf5f01413c99ac635e7670ba75
6+
api_directory_checksum: 45311575b1cf56326ccad9a2caea143fc104b630
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.42.0
99
generator_config_info:
10-
file_checksum: cdc6db8f7b924d8b14a4926f0bb937b7952b102f
10+
file_checksum: b588c7e44229d7db3737b17b76a68708c71e5b68
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ resources:
118118
Routes:
119119
custom_field:
120120
list_of: CreateRouteInput
121+
VpcId:
122+
references:
123+
resource: VPC
124+
path: Status.VPCID
121125
hooks:
122126
sdk_create_post_set_output:
123127
template_path: hooks/route_table/sdk_create_post_set_output.go.tpl
@@ -134,6 +138,9 @@ resources:
134138
is_primary_key: true
135139
VpcId:
136140
is_required: true
141+
references:
142+
resource: VPC
143+
path: Status.VPCID
137144
renames:
138145
operations:
139146
CreateSecurityGroup:
@@ -155,11 +162,33 @@ resources:
155162
- InvalidVpcID.NotFound
156163
- VPCIdNotSpecified
157164
Subnet:
165+
fields:
166+
VpcId:
167+
references:
168+
resource: VPC
169+
path: Status.VPCID
158170
exceptions:
159171
terminal_codes:
160172
- InvalidVpcID.Malformed
161173
- InvalidVpcID.NotFound
162174
VpcEndpoint:
175+
fields:
176+
VpcId:
177+
references:
178+
resource: VPC
179+
path: Status.VPCID
180+
RouteTableIds:
181+
references:
182+
resource: RouteTable
183+
path: Status.RouteTableID
184+
SecurityGroupIds:
185+
references:
186+
resource: SecurityGroup
187+
path: Status.ID
188+
SubnetIds:
189+
references:
190+
resource: Subnet
191+
path: Status.SubnetID
163192
exceptions:
164193
terminal_codes:
165194
- InvalidVpcId.Malformed

apis/v1alpha1/route_table.go

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

apis/v1alpha1/security_group.go

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

apis/v1alpha1/subnet.go

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

apis/v1alpha1/vpc_endpoint.go

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

apis/v1alpha1/zz_generated.deepcopy.go

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

config/crd/bases/ec2.services.k8s.aws_routetables.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,20 @@ spec:
9191
vpcID:
9292
description: The ID of the VPC.
9393
type: string
94-
required:
95-
- vpcID
94+
vpcRef:
95+
description: 'AWSResourceReferenceWrapper provides a wrapper around
96+
*AWSResourceReference type to provide more user friendly syntax
97+
for references using ''from'' field Ex: APIIDRef: from: name:
98+
my-api'
99+
properties:
100+
from:
101+
description: AWSResourceReference provides all the values necessary
102+
to reference another k8s resource for finding the identifier(Id/ARN/Name)
103+
properties:
104+
name:
105+
type: string
106+
type: object
107+
type: object
96108
type: object
97109
status:
98110
description: RouteTableStatus defines the observed state of RouteTable

config/crd/bases/ec2.services.k8s.aws_securitygroups.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,23 @@ spec:
7272
vpcID:
7373
description: '[EC2-VPC] The ID of the VPC. Required for EC2-VPC.'
7474
type: string
75+
vpcRef:
76+
description: 'AWSResourceReferenceWrapper provides a wrapper around
77+
*AWSResourceReference type to provide more user friendly syntax
78+
for references using ''from'' field Ex: APIIDRef: from: name:
79+
my-api'
80+
properties:
81+
from:
82+
description: AWSResourceReference provides all the values necessary
83+
to reference another k8s resource for finding the identifier(Id/ARN/Name)
84+
properties:
85+
name:
86+
type: string
87+
type: object
88+
type: object
7589
required:
7690
- description
7791
- name
78-
- vpcID
7992
type: object
8093
status:
8194
description: SecurityGroupStatus defines the observed state of SecurityGroup

config/crd/bases/ec2.services.k8s.aws_subnets.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,22 @@ spec:
9090
vpcID:
9191
description: The ID of the VPC.
9292
type: string
93+
vpcRef:
94+
description: 'AWSResourceReferenceWrapper provides a wrapper around
95+
*AWSResourceReference type to provide more user friendly syntax
96+
for references using ''from'' field Ex: APIIDRef: from: name:
97+
my-api'
98+
properties:
99+
from:
100+
description: AWSResourceReference provides all the values necessary
101+
to reference another k8s resource for finding the identifier(Id/ARN/Name)
102+
properties:
103+
name:
104+
type: string
105+
type: object
106+
type: object
93107
required:
94108
- cidrBlock
95-
- vpcID
96109
type: object
97110
status:
98111
description: SubnetStatus defines the observed state of Subnet

0 commit comments

Comments
 (0)