-
Notifications
You must be signed in to change notification settings - Fork 61
/
zz_subnetwork_types.go
executable file
·374 lines (304 loc) · 18.1 KB
/
zz_subnetwork_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
/*
Copyright 2021 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by upjet. DO NOT EDIT.
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
type SecondaryIPRangeObservation struct {
// The range of IP addresses belonging to this subnetwork secondary
// range. Provide this property when you create the subnetwork.
// Ranges must be unique and non-overlapping with all primary and
// secondary IP ranges within a network. Only IPv4 is supported.
IPCidrRange *string `json:"ipCidrRange,omitempty" tf:"ip_cidr_range,omitempty"`
// The name associated with this subnetwork secondary range, used
// when adding an alias IP range to a VM instance. The name must
// be 1-63 characters long, and comply with RFC1035. The name
// must be unique within the subnetwork.
RangeName *string `json:"rangeName,omitempty" tf:"range_name,omitempty"`
}
type SecondaryIPRangeParameters struct {
// The range of IP addresses belonging to this subnetwork secondary
// range. Provide this property when you create the subnetwork.
// Ranges must be unique and non-overlapping with all primary and
// secondary IP ranges within a network. Only IPv4 is supported.
// +kubebuilder:validation:Optional
IPCidrRange *string `json:"ipCidrRange,omitempty" tf:"ip_cidr_range"`
// The name associated with this subnetwork secondary range, used
// when adding an alias IP range to a VM instance. The name must
// be 1-63 characters long, and comply with RFC1035. The name
// must be unique within the subnetwork.
// +kubebuilder:validation:Optional
RangeName *string `json:"rangeName,omitempty" tf:"range_name"`
}
type SubnetworkLogConfigObservation struct {
// Can only be specified if VPC flow logging for this subnetwork is enabled.
// Toggles the aggregation interval for collecting flow logs. Increasing the
// interval time will reduce the amount of generated flow logs for long
// lasting connections. Default is an interval of 5 seconds per connection.
// Default value is INTERVAL_5_SEC.
// Possible values are INTERVAL_5_SEC, INTERVAL_30_SEC, INTERVAL_1_MIN, INTERVAL_5_MIN, INTERVAL_10_MIN, and INTERVAL_15_MIN.
AggregationInterval *string `json:"aggregationInterval,omitempty" tf:"aggregation_interval,omitempty"`
// Export filter used to define which VPC flow logs should be logged, as as CEL expression. See
// https://cloud.google.com/vpc/docs/flow-logs#filtering for details on how to format this field.
// The default value is 'true', which evaluates to include everything.
FilterExpr *string `json:"filterExpr,omitempty" tf:"filter_expr,omitempty"`
// Can only be specified if VPC flow logging for this subnetwork is enabled.
// The value of the field must be in [0, 1]. Set the sampling rate of VPC
// flow logs within the subnetwork where 1.0 means all collected logs are
// reported and 0.0 means no logs are reported. Default is 0.5 which means
// half of all collected logs are reported.
FlowSampling *float64 `json:"flowSampling,omitempty" tf:"flow_sampling,omitempty"`
// Can only be specified if VPC flow logging for this subnetwork is enabled.
// Configures whether metadata fields should be added to the reported VPC
// flow logs.
// Default value is INCLUDE_ALL_METADATA.
// Possible values are EXCLUDE_ALL_METADATA, INCLUDE_ALL_METADATA, and CUSTOM_METADATA.
Metadata *string `json:"metadata,omitempty" tf:"metadata,omitempty"`
// List of metadata fields that should be added to reported logs.
// Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" is set to CUSTOM_METADATA.
MetadataFields []*string `json:"metadataFields,omitempty" tf:"metadata_fields,omitempty"`
}
type SubnetworkLogConfigParameters struct {
// Can only be specified if VPC flow logging for this subnetwork is enabled.
// Toggles the aggregation interval for collecting flow logs. Increasing the
// interval time will reduce the amount of generated flow logs for long
// lasting connections. Default is an interval of 5 seconds per connection.
// Default value is INTERVAL_5_SEC.
// Possible values are INTERVAL_5_SEC, INTERVAL_30_SEC, INTERVAL_1_MIN, INTERVAL_5_MIN, INTERVAL_10_MIN, and INTERVAL_15_MIN.
// +kubebuilder:validation:Optional
AggregationInterval *string `json:"aggregationInterval,omitempty" tf:"aggregation_interval,omitempty"`
// Export filter used to define which VPC flow logs should be logged, as as CEL expression. See
// https://cloud.google.com/vpc/docs/flow-logs#filtering for details on how to format this field.
// The default value is 'true', which evaluates to include everything.
// +kubebuilder:validation:Optional
FilterExpr *string `json:"filterExpr,omitempty" tf:"filter_expr,omitempty"`
// Can only be specified if VPC flow logging for this subnetwork is enabled.
// The value of the field must be in [0, 1]. Set the sampling rate of VPC
// flow logs within the subnetwork where 1.0 means all collected logs are
// reported and 0.0 means no logs are reported. Default is 0.5 which means
// half of all collected logs are reported.
// +kubebuilder:validation:Optional
FlowSampling *float64 `json:"flowSampling,omitempty" tf:"flow_sampling,omitempty"`
// Can only be specified if VPC flow logging for this subnetwork is enabled.
// Configures whether metadata fields should be added to the reported VPC
// flow logs.
// Default value is INCLUDE_ALL_METADATA.
// Possible values are EXCLUDE_ALL_METADATA, INCLUDE_ALL_METADATA, and CUSTOM_METADATA.
// +kubebuilder:validation:Optional
Metadata *string `json:"metadata,omitempty" tf:"metadata,omitempty"`
// List of metadata fields that should be added to reported logs.
// Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" is set to CUSTOM_METADATA.
// +kubebuilder:validation:Optional
MetadataFields []*string `json:"metadataFields,omitempty" tf:"metadata_fields,omitempty"`
}
type SubnetworkObservation_2 struct {
// Creation timestamp in RFC3339 text format.
CreationTimestamp *string `json:"creationTimestamp,omitempty" tf:"creation_timestamp,omitempty"`
// An optional description of this resource. Provide this property when
// you create the resource. This field can be set only at resource
// creation time.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// The range of external IPv6 addresses that are owned by this subnetwork.
ExternalIPv6Prefix *string `json:"externalIpv6Prefix,omitempty" tf:"external_ipv6_prefix,omitempty"`
Fingerprint *string `json:"fingerprint,omitempty" tf:"fingerprint,omitempty"`
// The gateway address for default routes to reach destination addresses
// outside this subnetwork.
GatewayAddress *string `json:"gatewayAddress,omitempty" tf:"gateway_address,omitempty"`
// an identifier for the resource with format projects/{{project}}/regions/{{region}}/subnetworks/{{name}}
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// The range of internal addresses that are owned by this subnetwork.
// Provide this property when you create the subnetwork. For example,
// 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
// non-overlapping within a network. Only IPv4 is supported.
IPCidrRange *string `json:"ipCidrRange,omitempty" tf:"ip_cidr_range,omitempty"`
// The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation
// or the first time the subnet is updated into IPV4_IPV6 dual stack. If the ipv6_type is EXTERNAL then this subnet
// cannot enable direct path.
// Possible values are EXTERNAL and INTERNAL.
IPv6AccessType *string `json:"ipv6AccessType,omitempty" tf:"ipv6_access_type,omitempty"`
// The range of internal IPv6 addresses that are owned by this subnetwork.
IPv6CidrRange *string `json:"ipv6CidrRange,omitempty" tf:"ipv6_cidr_range,omitempty"`
// Denotes the logging options for the subnetwork flow logs. If logging is enabled
// logs will be exported to Stackdriver. This field cannot be set if the purpose of this
// subnetwork is INTERNAL_HTTPS_LOAD_BALANCER
// Structure is documented below.
LogConfig []SubnetworkLogConfigObservation `json:"logConfig,omitempty" tf:"log_config,omitempty"`
// The network this subnet belongs to.
// Only networks that are in the distributed mode can have subnetworks.
Network *string `json:"network,omitempty" tf:"network,omitempty"`
// When enabled, VMs in this subnetwork without external IP addresses can
// access Google APIs and services by using Private Google Access.
PrivateIPGoogleAccess *bool `json:"privateIpGoogleAccess,omitempty" tf:"private_ip_google_access,omitempty"`
// The private IPv6 google access type for the VMs in this subnet.
PrivateIPv6GoogleAccess *string `json:"privateIpv6GoogleAccess,omitempty" tf:"private_ipv6_google_access,omitempty"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `json:"project,omitempty" tf:"project,omitempty"`
// The purpose of the resource. A subnetwork with purpose set to
// INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is
// reserved for Internal HTTP(S) Load Balancing.
// If set to INTERNAL_HTTPS_LOAD_BALANCER you must also set the role field.
Purpose *string `json:"purpose,omitempty" tf:"purpose,omitempty"`
// The GCP region for this subnetwork.
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The role of subnetwork. Currently, this field is only used when
// purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE
// or BACKUP. An ACTIVE subnetwork is one that is currently being used
// for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that
// is ready to be promoted to ACTIVE or is currently draining.
// Possible values are ACTIVE and BACKUP.
Role *string `json:"role,omitempty" tf:"role,omitempty"`
// An array of configurations for secondary IP ranges for VM instances
// contained in this subnetwork. The primary IP of such VM must belong
// to the primary ipCidrRange of the subnetwork. The alias IPs may belong
// to either primary or secondary ranges.
// Note: This field uses attr-as-block mode to avoid
// breaking users during the 0.12 upgrade. To explicitly send a list
// of zero objects you must use the following syntax:
// example=[]
// For more details about this behavior, see this section.
// Structure is documented below.
SecondaryIPRange []SecondaryIPRangeObservation `json:"secondaryIpRange,omitempty" tf:"secondary_ip_range,omitempty"`
// The URI of the created resource.
SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"`
// The stack type for this subnet to identify whether the IPv6 feature is enabled or not.
// If not specified IPV4_ONLY will be used.
// Possible values are IPV4_ONLY and IPV4_IPV6.
StackType *string `json:"stackType,omitempty" tf:"stack_type,omitempty"`
}
type SubnetworkParameters_2 struct {
// An optional description of this resource. Provide this property when
// you create the resource. This field can be set only at resource
// creation time.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// The range of internal addresses that are owned by this subnetwork.
// Provide this property when you create the subnetwork. For example,
// 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
// non-overlapping within a network. Only IPv4 is supported.
// +kubebuilder:validation:Optional
IPCidrRange *string `json:"ipCidrRange,omitempty" tf:"ip_cidr_range,omitempty"`
// The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation
// or the first time the subnet is updated into IPV4_IPV6 dual stack. If the ipv6_type is EXTERNAL then this subnet
// cannot enable direct path.
// Possible values are EXTERNAL and INTERNAL.
// +kubebuilder:validation:Optional
IPv6AccessType *string `json:"ipv6AccessType,omitempty" tf:"ipv6_access_type,omitempty"`
// Denotes the logging options for the subnetwork flow logs. If logging is enabled
// logs will be exported to Stackdriver. This field cannot be set if the purpose of this
// subnetwork is INTERNAL_HTTPS_LOAD_BALANCER
// Structure is documented below.
// +kubebuilder:validation:Optional
LogConfig []SubnetworkLogConfigParameters `json:"logConfig,omitempty" tf:"log_config,omitempty"`
// The network this subnet belongs to.
// Only networks that are in the distributed mode can have subnetworks.
// +crossplane:generate:reference:type=Network
// +kubebuilder:validation:Optional
Network *string `json:"network,omitempty" tf:"network,omitempty"`
// Reference to a Network to populate network.
// +kubebuilder:validation:Optional
NetworkRef *v1.Reference `json:"networkRef,omitempty" tf:"-"`
// Selector for a Network to populate network.
// +kubebuilder:validation:Optional
NetworkSelector *v1.Selector `json:"networkSelector,omitempty" tf:"-"`
// When enabled, VMs in this subnetwork without external IP addresses can
// access Google APIs and services by using Private Google Access.
// +kubebuilder:validation:Optional
PrivateIPGoogleAccess *bool `json:"privateIpGoogleAccess,omitempty" tf:"private_ip_google_access,omitempty"`
// The private IPv6 google access type for the VMs in this subnet.
// +kubebuilder:validation:Optional
PrivateIPv6GoogleAccess *string `json:"privateIpv6GoogleAccess,omitempty" tf:"private_ipv6_google_access,omitempty"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
// +kubebuilder:validation:Optional
Project *string `json:"project,omitempty" tf:"project,omitempty"`
// The purpose of the resource. A subnetwork with purpose set to
// INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is
// reserved for Internal HTTP(S) Load Balancing.
// If set to INTERNAL_HTTPS_LOAD_BALANCER you must also set the role field.
// +kubebuilder:validation:Optional
Purpose *string `json:"purpose,omitempty" tf:"purpose,omitempty"`
// The GCP region for this subnetwork.
// +kubebuilder:validation:Required
Region *string `json:"region" tf:"region,omitempty"`
// The role of subnetwork. Currently, this field is only used when
// purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE
// or BACKUP. An ACTIVE subnetwork is one that is currently being used
// for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that
// is ready to be promoted to ACTIVE or is currently draining.
// Possible values are ACTIVE and BACKUP.
// +kubebuilder:validation:Optional
Role *string `json:"role,omitempty" tf:"role,omitempty"`
// An array of configurations for secondary IP ranges for VM instances
// contained in this subnetwork. The primary IP of such VM must belong
// to the primary ipCidrRange of the subnetwork. The alias IPs may belong
// to either primary or secondary ranges.
// Note: This field uses attr-as-block mode to avoid
// breaking users during the 0.12 upgrade. To explicitly send a list
// of zero objects you must use the following syntax:
// example=[]
// For more details about this behavior, see this section.
// Structure is documented below.
// +kubebuilder:validation:Optional
SecondaryIPRange []SecondaryIPRangeParameters `json:"secondaryIpRange,omitempty" tf:"secondary_ip_range,omitempty"`
// The stack type for this subnet to identify whether the IPv6 feature is enabled or not.
// If not specified IPV4_ONLY will be used.
// Possible values are IPV4_ONLY and IPV4_IPV6.
// +kubebuilder:validation:Optional
StackType *string `json:"stackType,omitempty" tf:"stack_type,omitempty"`
}
// SubnetworkSpec defines the desired state of Subnetwork
type SubnetworkSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider SubnetworkParameters_2 `json:"forProvider"`
}
// SubnetworkStatus defines the observed state of Subnetwork.
type SubnetworkStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider SubnetworkObservation_2 `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// Subnetwork is the Schema for the Subnetworks API. A VPC network is a virtual version of the traditional physical networks that exist within and between physical data centers.
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,gcp}
type Subnetwork struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.ipCidrRange)",message="ipCidrRange is a required parameter"
Spec SubnetworkSpec `json:"spec"`
Status SubnetworkStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// SubnetworkList contains a list of Subnetworks
type SubnetworkList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Subnetwork `json:"items"`
}
// Repository type metadata.
var (
Subnetwork_Kind = "Subnetwork"
Subnetwork_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Subnetwork_Kind}.String()
Subnetwork_KindAPIVersion = Subnetwork_Kind + "." + CRDGroupVersion.String()
Subnetwork_GroupVersionKind = CRDGroupVersion.WithKind(Subnetwork_Kind)
)
func init() {
SchemeBuilder.Register(&Subnetwork{}, &SubnetworkList{})
}