Skip to content

Commit 43f37ec

Browse files
Merge branch 'main' into vpc-attributes
2 parents 1ccb4f0 + 9b8a789 commit 43f37ec

23 files changed

+879
-29
lines changed

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,6 +162,11 @@ 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
@@ -180,6 +192,23 @@ resources:
180192
sdk_read_many_post_set_output:
181193
template_path: hooks/vpc/sdk_read_many_post_set_output.go.tpl
182194
VpcEndpoint:
195+
fields:
196+
VpcId:
197+
references:
198+
resource: VPC
199+
path: Status.VPCID
200+
RouteTableIds:
201+
references:
202+
resource: RouteTable
203+
path: Status.RouteTableID
204+
SecurityGroupIds:
205+
references:
206+
resource: SecurityGroup
207+
path: Status.ID
208+
SubnetIds:
209+
references:
210+
resource: Subnet
211+
path: Status.SubnetID
183212
exceptions:
184213
terminal_codes:
185214
- 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

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

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,44 @@ spec:
6666
items:
6767
type: string
6868
type: array
69+
routeTableRefs:
70+
items:
71+
description: 'AWSResourceReferenceWrapper provides a wrapper around
72+
*AWSResourceReference type to provide more user friendly syntax
73+
for references using ''from'' field Ex: APIIDRef: from: name:
74+
my-api'
75+
properties:
76+
from:
77+
description: AWSResourceReference provides all the values necessary
78+
to reference another k8s resource for finding the identifier(Id/ARN/Name)
79+
properties:
80+
name:
81+
type: string
82+
type: object
83+
type: object
84+
type: array
6985
securityGroupIDs:
7086
description: (Interface endpoint) The ID of one or more security groups
7187
to associate with the endpoint network interface.
7288
items:
7389
type: string
7490
type: array
91+
securityGroupRefs:
92+
items:
93+
description: 'AWSResourceReferenceWrapper provides a wrapper around
94+
*AWSResourceReference type to provide more user friendly syntax
95+
for references using ''from'' field Ex: APIIDRef: from: name:
96+
my-api'
97+
properties:
98+
from:
99+
description: AWSResourceReference provides all the values necessary
100+
to reference another k8s resource for finding the identifier(Id/ARN/Name)
101+
properties:
102+
name:
103+
type: string
104+
type: object
105+
type: object
106+
type: array
75107
serviceName:
76108
description: The service name. To get a list of available services,
77109
use the DescribeVpcEndpointServices request, or get the name from
@@ -85,6 +117,22 @@ spec:
85117
items:
86118
type: string
87119
type: array
120+
subnetRefs:
121+
items:
122+
description: 'AWSResourceReferenceWrapper provides a wrapper around
123+
*AWSResourceReference type to provide more user friendly syntax
124+
for references using ''from'' field Ex: APIIDRef: from: name:
125+
my-api'
126+
properties:
127+
from:
128+
description: AWSResourceReference provides all the values necessary
129+
to reference another k8s resource for finding the identifier(Id/ARN/Name)
130+
properties:
131+
name:
132+
type: string
133+
type: object
134+
type: object
135+
type: array
88136
tagSpecifications:
89137
description: The tags to associate with the endpoint.
90138
items:
@@ -111,9 +159,22 @@ spec:
111159
vpcID:
112160
description: The ID of the VPC in which the endpoint will be used.
113161
type: string
162+
vpcRef:
163+
description: 'AWSResourceReferenceWrapper provides a wrapper around
164+
*AWSResourceReference type to provide more user friendly syntax
165+
for references using ''from'' field Ex: APIIDRef: from: name:
166+
my-api'
167+
properties:
168+
from:
169+
description: AWSResourceReference provides all the values necessary
170+
to reference another k8s resource for finding the identifier(Id/ARN/Name)
171+
properties:
172+
name:
173+
type: string
174+
type: object
175+
type: object
114176
required:
115177
- serviceName
116-
- vpcID
117178
type: object
118179
status:
119180
description: VPCEndpointStatus defines the observed state of VPCEndpoint

0 commit comments

Comments
 (0)