-
Notifications
You must be signed in to change notification settings - Fork 59
/
zz_regionperinstanceconfig_types.go
executable file
·257 lines (201 loc) · 12.3 KB
/
zz_regionperinstanceconfig_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
/*
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 RegionPerInstanceConfigObservation struct {
// an identifier for the resource with format {{project}}/{{region}}/{{region_instance_group_manager}}/{{name}}
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// The minimal action to perform on the instance during an update.
// Default is NONE. Possible values are:
MinimalAction *string `json:"minimalAction,omitempty" tf:"minimal_action,omitempty"`
// The most disruptive action to perform on the instance during an update.
// Default is REPLACE. Possible values are:
MostDisruptiveAllowedAction *string `json:"mostDisruptiveAllowedAction,omitempty" tf:"most_disruptive_allowed_action,omitempty"`
// The name for this per-instance config and its corresponding instance.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The preserved state for this instance.
// Structure is documented below.
PreservedState []RegionPerInstanceConfigPreservedStateObservation `json:"preservedState,omitempty" tf:"preserved_state,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"`
// Region where the containing instance group manager is located
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The region instance group manager this instance config is part of.
RegionInstanceGroupManager *string `json:"regionInstanceGroupManager,omitempty" tf:"region_instance_group_manager,omitempty"`
// When true, deleting this config will immediately remove any specified state from the underlying instance.
// When false, deleting this config will not immediately remove any state from the underlying instance.
// State will be removed on the next instance recreation or update.
RemoveInstanceStateOnDestroy *bool `json:"removeInstanceStateOnDestroy,omitempty" tf:"remove_instance_state_on_destroy,omitempty"`
}
type RegionPerInstanceConfigParameters struct {
// The minimal action to perform on the instance during an update.
// Default is NONE. Possible values are:
// +kubebuilder:validation:Optional
MinimalAction *string `json:"minimalAction,omitempty" tf:"minimal_action,omitempty"`
// The most disruptive action to perform on the instance during an update.
// Default is REPLACE. Possible values are:
// +kubebuilder:validation:Optional
MostDisruptiveAllowedAction *string `json:"mostDisruptiveAllowedAction,omitempty" tf:"most_disruptive_allowed_action,omitempty"`
// The name for this per-instance config and its corresponding instance.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The preserved state for this instance.
// Structure is documented below.
// +kubebuilder:validation:Optional
PreservedState []RegionPerInstanceConfigPreservedStateParameters `json:"preservedState,omitempty" tf:"preserved_state,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"`
// Region where the containing instance group manager is located
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.RegionInstanceGroupManager
// +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractParamPath("region",false)
// +kubebuilder:validation:Optional
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The region instance group manager this instance config is part of.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.RegionInstanceGroupManager
// +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractParamPath("name",false)
// +kubebuilder:validation:Optional
RegionInstanceGroupManager *string `json:"regionInstanceGroupManager,omitempty" tf:"region_instance_group_manager,omitempty"`
// Reference to a RegionInstanceGroupManager in compute to populate regionInstanceGroupManager.
// +kubebuilder:validation:Optional
RegionInstanceGroupManagerRef *v1.Reference `json:"regionInstanceGroupManagerRef,omitempty" tf:"-"`
// Selector for a RegionInstanceGroupManager in compute to populate regionInstanceGroupManager.
// +kubebuilder:validation:Optional
RegionInstanceGroupManagerSelector *v1.Selector `json:"regionInstanceGroupManagerSelector,omitempty" tf:"-"`
// Reference to a RegionInstanceGroupManager in compute to populate region.
// +kubebuilder:validation:Optional
RegionRef *v1.Reference `json:"regionRef,omitempty" tf:"-"`
// Selector for a RegionInstanceGroupManager in compute to populate region.
// +kubebuilder:validation:Optional
RegionSelector *v1.Selector `json:"regionSelector,omitempty" tf:"-"`
// When true, deleting this config will immediately remove any specified state from the underlying instance.
// When false, deleting this config will not immediately remove any state from the underlying instance.
// State will be removed on the next instance recreation or update.
// +kubebuilder:validation:Optional
RemoveInstanceStateOnDestroy *bool `json:"removeInstanceStateOnDestroy,omitempty" tf:"remove_instance_state_on_destroy,omitempty"`
}
type RegionPerInstanceConfigPreservedStateDiskObservation struct {
// A value that prescribes what should happen to the stateful disk when the VM instance is deleted.
// The available options are NEVER and ON_PERMANENT_INSTANCE_DELETION.
// NEVER - detach the disk when the VM is deleted, but do not delete the disk.
// ON_PERMANENT_INSTANCE_DELETION will delete the stateful disk when the VM is permanently
// deleted from the instance group.
// Default value is NEVER.
// Possible values are NEVER and ON_PERMANENT_INSTANCE_DELETION.
DeleteRule *string `json:"deleteRule,omitempty" tf:"delete_rule,omitempty"`
// A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.
DeviceName *string `json:"deviceName,omitempty" tf:"device_name,omitempty"`
// The mode of the disk.
// Default value is READ_WRITE.
// Possible values are READ_ONLY and READ_WRITE.
Mode *string `json:"mode,omitempty" tf:"mode,omitempty"`
// The URI of an existing persistent disk to attach under the specified device-name in the format
// projects/project-id/zones/zone/disks/disk-name.
Source *string `json:"source,omitempty" tf:"source,omitempty"`
}
type RegionPerInstanceConfigPreservedStateDiskParameters struct {
// A value that prescribes what should happen to the stateful disk when the VM instance is deleted.
// The available options are NEVER and ON_PERMANENT_INSTANCE_DELETION.
// NEVER - detach the disk when the VM is deleted, but do not delete the disk.
// ON_PERMANENT_INSTANCE_DELETION will delete the stateful disk when the VM is permanently
// deleted from the instance group.
// Default value is NEVER.
// Possible values are NEVER and ON_PERMANENT_INSTANCE_DELETION.
// +kubebuilder:validation:Optional
DeleteRule *string `json:"deleteRule,omitempty" tf:"delete_rule,omitempty"`
// A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.
// +kubebuilder:validation:Required
DeviceName *string `json:"deviceName" tf:"device_name,omitempty"`
// The mode of the disk.
// Default value is READ_WRITE.
// Possible values are READ_ONLY and READ_WRITE.
// +kubebuilder:validation:Optional
Mode *string `json:"mode,omitempty" tf:"mode,omitempty"`
// The URI of an existing persistent disk to attach under the specified device-name in the format
// projects/project-id/zones/zone/disks/disk-name.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Disk
// +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractResourceID()
// +kubebuilder:validation:Optional
Source *string `json:"source,omitempty" tf:"source,omitempty"`
// Reference to a Disk in compute to populate source.
// +kubebuilder:validation:Optional
SourceRef *v1.Reference `json:"sourceRef,omitempty" tf:"-"`
// Selector for a Disk in compute to populate source.
// +kubebuilder:validation:Optional
SourceSelector *v1.Selector `json:"sourceSelector,omitempty" tf:"-"`
}
type RegionPerInstanceConfigPreservedStateObservation struct {
// Stateful disks for the instance.
// Structure is documented below.
Disk []RegionPerInstanceConfigPreservedStateDiskObservation `json:"disk,omitempty" tf:"disk,omitempty"`
// Preserved metadata defined for this instance. This is a list of key->value pairs.
Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"`
}
type RegionPerInstanceConfigPreservedStateParameters struct {
// Stateful disks for the instance.
// Structure is documented below.
// +kubebuilder:validation:Optional
Disk []RegionPerInstanceConfigPreservedStateDiskParameters `json:"disk,omitempty" tf:"disk,omitempty"`
// Preserved metadata defined for this instance. This is a list of key->value pairs.
// +kubebuilder:validation:Optional
Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"`
}
// RegionPerInstanceConfigSpec defines the desired state of RegionPerInstanceConfig
type RegionPerInstanceConfigSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider RegionPerInstanceConfigParameters `json:"forProvider"`
}
// RegionPerInstanceConfigStatus defines the observed state of RegionPerInstanceConfig.
type RegionPerInstanceConfigStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider RegionPerInstanceConfigObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// RegionPerInstanceConfig is the Schema for the RegionPerInstanceConfigs API. A config defined for a single managed instance that belongs to an instance group manager.
// +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 RegionPerInstanceConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.name)",message="name is a required parameter"
Spec RegionPerInstanceConfigSpec `json:"spec"`
Status RegionPerInstanceConfigStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// RegionPerInstanceConfigList contains a list of RegionPerInstanceConfigs
type RegionPerInstanceConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []RegionPerInstanceConfig `json:"items"`
}
// Repository type metadata.
var (
RegionPerInstanceConfig_Kind = "RegionPerInstanceConfig"
RegionPerInstanceConfig_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: RegionPerInstanceConfig_Kind}.String()
RegionPerInstanceConfig_KindAPIVersion = RegionPerInstanceConfig_Kind + "." + CRDGroupVersion.String()
RegionPerInstanceConfig_GroupVersionKind = CRDGroupVersion.WithKind(RegionPerInstanceConfig_Kind)
)
func init() {
SchemeBuilder.Register(&RegionPerInstanceConfig{}, &RegionPerInstanceConfigList{})
}