@cdktf-providers/astronomer-astro 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +355 -0
- package/README.md +19 -0
- package/dist/alert/index.d.ts +566 -0
- package/dist/alert/index.js +1489 -0
- package/dist/api-token/index.d.ts +199 -0
- package/dist/api-token/index.js +503 -0
- package/dist/cluster/index.d.ts +305 -0
- package/dist/cluster/index.js +755 -0
- package/dist/data-astro-alert/index.d.ts +277 -0
- package/dist/data-astro-alert/index.js +762 -0
- package/dist/data-astro-alerts/index.d.ts +232 -0
- package/dist/data-astro-alerts/index.js +600 -0
- package/dist/data-astro-api-token/index.d.ts +135 -0
- package/dist/data-astro-api-token/index.js +353 -0
- package/dist/data-astro-api-tokens/index.d.ts +196 -0
- package/dist/data-astro-api-tokens/index.js +502 -0
- package/dist/data-astro-cluster/index.d.ts +211 -0
- package/dist/data-astro-cluster/index.js +535 -0
- package/dist/data-astro-cluster-options/index.d.ts +255 -0
- package/dist/data-astro-cluster-options/index.js +640 -0
- package/dist/data-astro-clusters/index.d.ts +263 -0
- package/dist/data-astro-clusters/index.js +661 -0
- package/dist/data-astro-deployment/index.d.ts +355 -0
- package/dist/data-astro-deployment/index.js +1009 -0
- package/dist/data-astro-deployment-options/index.d.ts +475 -0
- package/dist/data-astro-deployment-options/index.js +1274 -0
- package/dist/data-astro-deployments/index.d.ts +416 -0
- package/dist/data-astro-deployments/index.js +1158 -0
- package/dist/data-astro-notification-channel/index.d.ts +122 -0
- package/dist/data-astro-notification-channel/index.js +345 -0
- package/dist/data-astro-notification-channels/index.d.ts +201 -0
- package/dist/data-astro-notification-channels/index.js +540 -0
- package/dist/data-astro-organization/index.d.ts +87 -0
- package/dist/data-astro-organization/index.js +251 -0
- package/dist/data-astro-team/index.d.ts +204 -0
- package/dist/data-astro-team/index.js +507 -0
- package/dist/data-astro-teams/index.d.ts +247 -0
- package/dist/data-astro-teams/index.js +610 -0
- package/dist/data-astro-user/index.d.ts +122 -0
- package/dist/data-astro-user/index.js +274 -0
- package/dist/data-astro-users/index.d.ts +174 -0
- package/dist/data-astro-users/index.js +400 -0
- package/dist/data-astro-workspace/index.d.ts +94 -0
- package/dist/data-astro-workspace/index.js +250 -0
- package/dist/data-astro-workspaces/index.d.ts +146 -0
- package/dist/data-astro-workspaces/index.js +376 -0
- package/dist/deployment/index.d.ts +813 -0
- package/dist/deployment/index.js +2083 -0
- package/dist/hybrid-cluster-workspace-authorization/index.d.ts +53 -0
- package/dist/hybrid-cluster-workspace-authorization/index.js +111 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +32 -0
- package/dist/lazy-index.d.ts +0 -0
- package/dist/lazy-index.js +32 -0
- package/dist/notification-channel/index.d.ts +235 -0
- package/dist/notification-channel/index.js +608 -0
- package/dist/provider/index.d.ts +75 -0
- package/dist/provider/index.js +151 -0
- package/dist/team/index.d.ts +251 -0
- package/dist/team/index.js +622 -0
- package/dist/team-roles/index.d.ts +180 -0
- package/dist/team-roles/index.js +414 -0
- package/dist/user-invite/index.d.ts +99 -0
- package/dist/user-invite/index.js +262 -0
- package/dist/user-roles/index.d.ts +180 -0
- package/dist/user-roles/index.js +414 -0
- package/dist/workspace/index.d.ts +109 -0
- package/dist/workspace/index.js +282 -0
- package/package.json +51 -0
|
@@ -0,0 +1,755 @@
|
|
|
1
|
+
// https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/cluster
|
|
2
|
+
// generated from terraform resource schema
|
|
3
|
+
import * as cdktf from 'cdktf';
|
|
4
|
+
export function clusterHealthStatusDetailsToTerraform(struct) {
|
|
5
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
6
|
+
return struct;
|
|
7
|
+
}
|
|
8
|
+
if (cdktf.isComplexElement(struct)) {
|
|
9
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
10
|
+
}
|
|
11
|
+
return {};
|
|
12
|
+
}
|
|
13
|
+
export function clusterHealthStatusDetailsToHclTerraform(struct) {
|
|
14
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
15
|
+
return struct;
|
|
16
|
+
}
|
|
17
|
+
if (cdktf.isComplexElement(struct)) {
|
|
18
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
19
|
+
}
|
|
20
|
+
const attrs = {};
|
|
21
|
+
return attrs;
|
|
22
|
+
}
|
|
23
|
+
export class ClusterHealthStatusDetailsOutputReference extends cdktf.ComplexObject {
|
|
24
|
+
isEmptyObject = false;
|
|
25
|
+
/**
|
|
26
|
+
* @param terraformResource The parent resource
|
|
27
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
28
|
+
* @param complexObjectIndex the index of this item in the list
|
|
29
|
+
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
|
|
30
|
+
*/
|
|
31
|
+
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
|
|
32
|
+
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
|
|
33
|
+
}
|
|
34
|
+
get internalValue() {
|
|
35
|
+
let hasAnyValues = this.isEmptyObject;
|
|
36
|
+
const internalValueResult = {};
|
|
37
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
38
|
+
}
|
|
39
|
+
set internalValue(value) {
|
|
40
|
+
if (value === undefined) {
|
|
41
|
+
this.isEmptyObject = false;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// code - computed: true, optional: false, required: false
|
|
48
|
+
get code() {
|
|
49
|
+
return this.getStringAttribute('code');
|
|
50
|
+
}
|
|
51
|
+
// description - computed: true, optional: false, required: false
|
|
52
|
+
get description() {
|
|
53
|
+
return this.getStringAttribute('description');
|
|
54
|
+
}
|
|
55
|
+
// severity - computed: true, optional: false, required: false
|
|
56
|
+
get severity() {
|
|
57
|
+
return this.getStringAttribute('severity');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export class ClusterHealthStatusDetailsList extends cdktf.ComplexList {
|
|
61
|
+
terraformResource;
|
|
62
|
+
terraformAttribute;
|
|
63
|
+
wrapsSet;
|
|
64
|
+
/**
|
|
65
|
+
* @param terraformResource The parent resource
|
|
66
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
67
|
+
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
|
|
68
|
+
*/
|
|
69
|
+
constructor(terraformResource, terraformAttribute, wrapsSet) {
|
|
70
|
+
super(terraformResource, terraformAttribute, wrapsSet);
|
|
71
|
+
this.terraformResource = terraformResource;
|
|
72
|
+
this.terraformAttribute = terraformAttribute;
|
|
73
|
+
this.wrapsSet = wrapsSet;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @param index the index of the item to return
|
|
77
|
+
*/
|
|
78
|
+
get(index) {
|
|
79
|
+
return new ClusterHealthStatusDetailsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export function clusterHealthStatusToTerraform(struct) {
|
|
83
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
84
|
+
return struct;
|
|
85
|
+
}
|
|
86
|
+
if (cdktf.isComplexElement(struct)) {
|
|
87
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
88
|
+
}
|
|
89
|
+
return {};
|
|
90
|
+
}
|
|
91
|
+
export function clusterHealthStatusToHclTerraform(struct) {
|
|
92
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
93
|
+
return struct;
|
|
94
|
+
}
|
|
95
|
+
if (cdktf.isComplexElement(struct)) {
|
|
96
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
97
|
+
}
|
|
98
|
+
const attrs = {};
|
|
99
|
+
return attrs;
|
|
100
|
+
}
|
|
101
|
+
export class ClusterHealthStatusOutputReference extends cdktf.ComplexObject {
|
|
102
|
+
isEmptyObject = false;
|
|
103
|
+
/**
|
|
104
|
+
* @param terraformResource The parent resource
|
|
105
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
106
|
+
*/
|
|
107
|
+
constructor(terraformResource, terraformAttribute) {
|
|
108
|
+
super(terraformResource, terraformAttribute, false);
|
|
109
|
+
}
|
|
110
|
+
get internalValue() {
|
|
111
|
+
let hasAnyValues = this.isEmptyObject;
|
|
112
|
+
const internalValueResult = {};
|
|
113
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
114
|
+
}
|
|
115
|
+
set internalValue(value) {
|
|
116
|
+
if (value === undefined) {
|
|
117
|
+
this.isEmptyObject = false;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// details - computed: true, optional: false, required: false
|
|
124
|
+
_details = new ClusterHealthStatusDetailsList(this, "details", true);
|
|
125
|
+
get details() {
|
|
126
|
+
return this._details;
|
|
127
|
+
}
|
|
128
|
+
// value - computed: true, optional: false, required: false
|
|
129
|
+
get value() {
|
|
130
|
+
return this.getStringAttribute('value');
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
export function clusterMetadataToTerraform(struct) {
|
|
134
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
135
|
+
return struct;
|
|
136
|
+
}
|
|
137
|
+
if (cdktf.isComplexElement(struct)) {
|
|
138
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
139
|
+
}
|
|
140
|
+
return {};
|
|
141
|
+
}
|
|
142
|
+
export function clusterMetadataToHclTerraform(struct) {
|
|
143
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
144
|
+
return struct;
|
|
145
|
+
}
|
|
146
|
+
if (cdktf.isComplexElement(struct)) {
|
|
147
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
148
|
+
}
|
|
149
|
+
const attrs = {};
|
|
150
|
+
return attrs;
|
|
151
|
+
}
|
|
152
|
+
export class ClusterMetadataOutputReference extends cdktf.ComplexObject {
|
|
153
|
+
isEmptyObject = false;
|
|
154
|
+
/**
|
|
155
|
+
* @param terraformResource The parent resource
|
|
156
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
157
|
+
*/
|
|
158
|
+
constructor(terraformResource, terraformAttribute) {
|
|
159
|
+
super(terraformResource, terraformAttribute, false);
|
|
160
|
+
}
|
|
161
|
+
get internalValue() {
|
|
162
|
+
let hasAnyValues = this.isEmptyObject;
|
|
163
|
+
const internalValueResult = {};
|
|
164
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
165
|
+
}
|
|
166
|
+
set internalValue(value) {
|
|
167
|
+
if (value === undefined) {
|
|
168
|
+
this.isEmptyObject = false;
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
// external_ips - computed: true, optional: false, required: false
|
|
175
|
+
get externalIps() {
|
|
176
|
+
return cdktf.Fn.tolist(this.getListAttribute('external_ips'));
|
|
177
|
+
}
|
|
178
|
+
// kube_dns_ip - computed: true, optional: false, required: false
|
|
179
|
+
get kubeDnsIp() {
|
|
180
|
+
return this.getStringAttribute('kube_dns_ip');
|
|
181
|
+
}
|
|
182
|
+
// oidc_issuer_url - computed: true, optional: false, required: false
|
|
183
|
+
get oidcIssuerUrl() {
|
|
184
|
+
return this.getStringAttribute('oidc_issuer_url');
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
export function clusterNodePoolsToTerraform(struct) {
|
|
188
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
189
|
+
return struct;
|
|
190
|
+
}
|
|
191
|
+
if (cdktf.isComplexElement(struct)) {
|
|
192
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
193
|
+
}
|
|
194
|
+
return {};
|
|
195
|
+
}
|
|
196
|
+
export function clusterNodePoolsToHclTerraform(struct) {
|
|
197
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
198
|
+
return struct;
|
|
199
|
+
}
|
|
200
|
+
if (cdktf.isComplexElement(struct)) {
|
|
201
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
202
|
+
}
|
|
203
|
+
const attrs = {};
|
|
204
|
+
return attrs;
|
|
205
|
+
}
|
|
206
|
+
export class ClusterNodePoolsOutputReference extends cdktf.ComplexObject {
|
|
207
|
+
isEmptyObject = false;
|
|
208
|
+
/**
|
|
209
|
+
* @param terraformResource The parent resource
|
|
210
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
211
|
+
* @param complexObjectIndex the index of this item in the list
|
|
212
|
+
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
|
|
213
|
+
*/
|
|
214
|
+
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
|
|
215
|
+
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
|
|
216
|
+
}
|
|
217
|
+
get internalValue() {
|
|
218
|
+
let hasAnyValues = this.isEmptyObject;
|
|
219
|
+
const internalValueResult = {};
|
|
220
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
221
|
+
}
|
|
222
|
+
set internalValue(value) {
|
|
223
|
+
if (value === undefined) {
|
|
224
|
+
this.isEmptyObject = false;
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
// cloud_provider - computed: true, optional: false, required: false
|
|
231
|
+
get cloudProvider() {
|
|
232
|
+
return this.getStringAttribute('cloud_provider');
|
|
233
|
+
}
|
|
234
|
+
// cluster_id - computed: true, optional: false, required: false
|
|
235
|
+
get clusterId() {
|
|
236
|
+
return this.getStringAttribute('cluster_id');
|
|
237
|
+
}
|
|
238
|
+
// created_at - computed: true, optional: false, required: false
|
|
239
|
+
get createdAt() {
|
|
240
|
+
return this.getStringAttribute('created_at');
|
|
241
|
+
}
|
|
242
|
+
// id - computed: true, optional: false, required: false
|
|
243
|
+
get id() {
|
|
244
|
+
return this.getStringAttribute('id');
|
|
245
|
+
}
|
|
246
|
+
// is_default - computed: true, optional: false, required: false
|
|
247
|
+
get isDefault() {
|
|
248
|
+
return this.getBooleanAttribute('is_default');
|
|
249
|
+
}
|
|
250
|
+
// max_node_count - computed: true, optional: false, required: false
|
|
251
|
+
get maxNodeCount() {
|
|
252
|
+
return this.getNumberAttribute('max_node_count');
|
|
253
|
+
}
|
|
254
|
+
// name - computed: true, optional: false, required: false
|
|
255
|
+
get name() {
|
|
256
|
+
return this.getStringAttribute('name');
|
|
257
|
+
}
|
|
258
|
+
// node_instance_type - computed: true, optional: false, required: false
|
|
259
|
+
get nodeInstanceType() {
|
|
260
|
+
return this.getStringAttribute('node_instance_type');
|
|
261
|
+
}
|
|
262
|
+
// supported_astro_machines - computed: true, optional: false, required: false
|
|
263
|
+
get supportedAstroMachines() {
|
|
264
|
+
return cdktf.Fn.tolist(this.getListAttribute('supported_astro_machines'));
|
|
265
|
+
}
|
|
266
|
+
// updated_at - computed: true, optional: false, required: false
|
|
267
|
+
get updatedAt() {
|
|
268
|
+
return this.getStringAttribute('updated_at');
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
export class ClusterNodePoolsList extends cdktf.ComplexList {
|
|
272
|
+
terraformResource;
|
|
273
|
+
terraformAttribute;
|
|
274
|
+
wrapsSet;
|
|
275
|
+
/**
|
|
276
|
+
* @param terraformResource The parent resource
|
|
277
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
278
|
+
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
|
|
279
|
+
*/
|
|
280
|
+
constructor(terraformResource, terraformAttribute, wrapsSet) {
|
|
281
|
+
super(terraformResource, terraformAttribute, wrapsSet);
|
|
282
|
+
this.terraformResource = terraformResource;
|
|
283
|
+
this.terraformAttribute = terraformAttribute;
|
|
284
|
+
this.wrapsSet = wrapsSet;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* @param index the index of the item to return
|
|
288
|
+
*/
|
|
289
|
+
get(index) {
|
|
290
|
+
return new ClusterNodePoolsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
export function clusterTimeoutsToTerraform(struct) {
|
|
294
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
295
|
+
return struct;
|
|
296
|
+
}
|
|
297
|
+
if (cdktf.isComplexElement(struct)) {
|
|
298
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
299
|
+
}
|
|
300
|
+
return {
|
|
301
|
+
create: cdktf.stringToTerraform(struct.create),
|
|
302
|
+
delete: cdktf.stringToTerraform(struct.delete),
|
|
303
|
+
update: cdktf.stringToTerraform(struct.update),
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
export function clusterTimeoutsToHclTerraform(struct) {
|
|
307
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
308
|
+
return struct;
|
|
309
|
+
}
|
|
310
|
+
if (cdktf.isComplexElement(struct)) {
|
|
311
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
312
|
+
}
|
|
313
|
+
const attrs = {
|
|
314
|
+
create: {
|
|
315
|
+
value: cdktf.stringToHclTerraform(struct.create),
|
|
316
|
+
isBlock: false,
|
|
317
|
+
type: "simple",
|
|
318
|
+
storageClassType: "string",
|
|
319
|
+
},
|
|
320
|
+
delete: {
|
|
321
|
+
value: cdktf.stringToHclTerraform(struct.delete),
|
|
322
|
+
isBlock: false,
|
|
323
|
+
type: "simple",
|
|
324
|
+
storageClassType: "string",
|
|
325
|
+
},
|
|
326
|
+
update: {
|
|
327
|
+
value: cdktf.stringToHclTerraform(struct.update),
|
|
328
|
+
isBlock: false,
|
|
329
|
+
type: "simple",
|
|
330
|
+
storageClassType: "string",
|
|
331
|
+
},
|
|
332
|
+
};
|
|
333
|
+
// remove undefined attributes
|
|
334
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
|
|
335
|
+
}
|
|
336
|
+
export class ClusterTimeoutsOutputReference extends cdktf.ComplexObject {
|
|
337
|
+
isEmptyObject = false;
|
|
338
|
+
resolvableValue;
|
|
339
|
+
/**
|
|
340
|
+
* @param terraformResource The parent resource
|
|
341
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
342
|
+
*/
|
|
343
|
+
constructor(terraformResource, terraformAttribute) {
|
|
344
|
+
super(terraformResource, terraformAttribute, false);
|
|
345
|
+
}
|
|
346
|
+
get internalValue() {
|
|
347
|
+
if (this.resolvableValue) {
|
|
348
|
+
return this.resolvableValue;
|
|
349
|
+
}
|
|
350
|
+
let hasAnyValues = this.isEmptyObject;
|
|
351
|
+
const internalValueResult = {};
|
|
352
|
+
if (this._create !== undefined) {
|
|
353
|
+
hasAnyValues = true;
|
|
354
|
+
internalValueResult.create = this._create;
|
|
355
|
+
}
|
|
356
|
+
if (this._delete !== undefined) {
|
|
357
|
+
hasAnyValues = true;
|
|
358
|
+
internalValueResult.delete = this._delete;
|
|
359
|
+
}
|
|
360
|
+
if (this._update !== undefined) {
|
|
361
|
+
hasAnyValues = true;
|
|
362
|
+
internalValueResult.update = this._update;
|
|
363
|
+
}
|
|
364
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
365
|
+
}
|
|
366
|
+
set internalValue(value) {
|
|
367
|
+
if (value === undefined) {
|
|
368
|
+
this.isEmptyObject = false;
|
|
369
|
+
this.resolvableValue = undefined;
|
|
370
|
+
this._create = undefined;
|
|
371
|
+
this._delete = undefined;
|
|
372
|
+
this._update = undefined;
|
|
373
|
+
}
|
|
374
|
+
else if (cdktf.Tokenization.isResolvable(value)) {
|
|
375
|
+
this.isEmptyObject = false;
|
|
376
|
+
this.resolvableValue = value;
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
380
|
+
this.resolvableValue = undefined;
|
|
381
|
+
this._create = value.create;
|
|
382
|
+
this._delete = value.delete;
|
|
383
|
+
this._update = value.update;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
// create - computed: false, optional: true, required: false
|
|
387
|
+
_create;
|
|
388
|
+
get create() {
|
|
389
|
+
return this.getStringAttribute('create');
|
|
390
|
+
}
|
|
391
|
+
set create(value) {
|
|
392
|
+
this._create = value;
|
|
393
|
+
}
|
|
394
|
+
resetCreate() {
|
|
395
|
+
this._create = undefined;
|
|
396
|
+
}
|
|
397
|
+
// Temporarily expose input value. Use with caution.
|
|
398
|
+
get createInput() {
|
|
399
|
+
return this._create;
|
|
400
|
+
}
|
|
401
|
+
// delete - computed: false, optional: true, required: false
|
|
402
|
+
_delete;
|
|
403
|
+
get delete() {
|
|
404
|
+
return this.getStringAttribute('delete');
|
|
405
|
+
}
|
|
406
|
+
set delete(value) {
|
|
407
|
+
this._delete = value;
|
|
408
|
+
}
|
|
409
|
+
resetDelete() {
|
|
410
|
+
this._delete = undefined;
|
|
411
|
+
}
|
|
412
|
+
// Temporarily expose input value. Use with caution.
|
|
413
|
+
get deleteInput() {
|
|
414
|
+
return this._delete;
|
|
415
|
+
}
|
|
416
|
+
// update - computed: false, optional: true, required: false
|
|
417
|
+
_update;
|
|
418
|
+
get update() {
|
|
419
|
+
return this.getStringAttribute('update');
|
|
420
|
+
}
|
|
421
|
+
set update(value) {
|
|
422
|
+
this._update = value;
|
|
423
|
+
}
|
|
424
|
+
resetUpdate() {
|
|
425
|
+
this._update = undefined;
|
|
426
|
+
}
|
|
427
|
+
// Temporarily expose input value. Use with caution.
|
|
428
|
+
get updateInput() {
|
|
429
|
+
return this._update;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Represents a {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/cluster astro_cluster}
|
|
434
|
+
*/
|
|
435
|
+
export class Cluster extends cdktf.TerraformResource {
|
|
436
|
+
// =================
|
|
437
|
+
// STATIC PROPERTIES
|
|
438
|
+
// =================
|
|
439
|
+
static tfResourceType = "astro_cluster";
|
|
440
|
+
// ==============
|
|
441
|
+
// STATIC Methods
|
|
442
|
+
// ==============
|
|
443
|
+
/**
|
|
444
|
+
* Generates CDKTF code for importing a Cluster resource upon running "cdktf plan <stack-name>"
|
|
445
|
+
* @param scope The scope in which to define this construct
|
|
446
|
+
* @param importToId The construct id used in the generated config for the Cluster to import
|
|
447
|
+
* @param importFromId The id of the existing Cluster that should be imported. Refer to the {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/cluster#import import section} in the documentation of this resource for the id to use
|
|
448
|
+
* @param provider? Optional instance of the provider where the Cluster to import is found
|
|
449
|
+
*/
|
|
450
|
+
static generateConfigForImport(scope, importToId, importFromId, provider) {
|
|
451
|
+
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "astro_cluster", importId: importFromId, provider });
|
|
452
|
+
}
|
|
453
|
+
// ===========
|
|
454
|
+
// INITIALIZER
|
|
455
|
+
// ===========
|
|
456
|
+
/**
|
|
457
|
+
* Create a new {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/cluster astro_cluster} Resource
|
|
458
|
+
*
|
|
459
|
+
* @param scope The scope in which to define this construct
|
|
460
|
+
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
|
|
461
|
+
* @param options ClusterConfig
|
|
462
|
+
*/
|
|
463
|
+
constructor(scope, id, config) {
|
|
464
|
+
super(scope, id, {
|
|
465
|
+
terraformResourceType: 'astro_cluster',
|
|
466
|
+
terraformGeneratorMetadata: {
|
|
467
|
+
providerName: 'astro',
|
|
468
|
+
providerVersion: '1.0.8',
|
|
469
|
+
providerVersionConstraint: '1.0.8'
|
|
470
|
+
},
|
|
471
|
+
provider: config.provider,
|
|
472
|
+
dependsOn: config.dependsOn,
|
|
473
|
+
count: config.count,
|
|
474
|
+
lifecycle: config.lifecycle,
|
|
475
|
+
provisioners: config.provisioners,
|
|
476
|
+
connection: config.connection,
|
|
477
|
+
forEach: config.forEach
|
|
478
|
+
});
|
|
479
|
+
this._cloudProvider = config.cloudProvider;
|
|
480
|
+
this._name = config.name;
|
|
481
|
+
this._podSubnetRange = config.podSubnetRange;
|
|
482
|
+
this._region = config.region;
|
|
483
|
+
this._servicePeeringRange = config.servicePeeringRange;
|
|
484
|
+
this._serviceSubnetRange = config.serviceSubnetRange;
|
|
485
|
+
this._timeouts.internalValue = config.timeouts;
|
|
486
|
+
this._type = config.type;
|
|
487
|
+
this._vpcSubnetRange = config.vpcSubnetRange;
|
|
488
|
+
this._workspaceIds = config.workspaceIds;
|
|
489
|
+
}
|
|
490
|
+
// ==========
|
|
491
|
+
// ATTRIBUTES
|
|
492
|
+
// ==========
|
|
493
|
+
// cloud_provider - computed: false, optional: false, required: true
|
|
494
|
+
_cloudProvider;
|
|
495
|
+
get cloudProvider() {
|
|
496
|
+
return this.getStringAttribute('cloud_provider');
|
|
497
|
+
}
|
|
498
|
+
set cloudProvider(value) {
|
|
499
|
+
this._cloudProvider = value;
|
|
500
|
+
}
|
|
501
|
+
// Temporarily expose input value. Use with caution.
|
|
502
|
+
get cloudProviderInput() {
|
|
503
|
+
return this._cloudProvider;
|
|
504
|
+
}
|
|
505
|
+
// created_at - computed: true, optional: false, required: false
|
|
506
|
+
get createdAt() {
|
|
507
|
+
return this.getStringAttribute('created_at');
|
|
508
|
+
}
|
|
509
|
+
// db_instance_type - computed: true, optional: false, required: false
|
|
510
|
+
get dbInstanceType() {
|
|
511
|
+
return this.getStringAttribute('db_instance_type');
|
|
512
|
+
}
|
|
513
|
+
// health_status - computed: true, optional: false, required: false
|
|
514
|
+
_healthStatus = new ClusterHealthStatusOutputReference(this, "health_status");
|
|
515
|
+
get healthStatus() {
|
|
516
|
+
return this._healthStatus;
|
|
517
|
+
}
|
|
518
|
+
// id - computed: true, optional: false, required: false
|
|
519
|
+
get id() {
|
|
520
|
+
return this.getStringAttribute('id');
|
|
521
|
+
}
|
|
522
|
+
// is_limited - computed: true, optional: false, required: false
|
|
523
|
+
get isLimited() {
|
|
524
|
+
return this.getBooleanAttribute('is_limited');
|
|
525
|
+
}
|
|
526
|
+
// metadata - computed: true, optional: false, required: false
|
|
527
|
+
_metadata = new ClusterMetadataOutputReference(this, "metadata");
|
|
528
|
+
get metadata() {
|
|
529
|
+
return this._metadata;
|
|
530
|
+
}
|
|
531
|
+
// name - computed: false, optional: false, required: true
|
|
532
|
+
_name;
|
|
533
|
+
get name() {
|
|
534
|
+
return this.getStringAttribute('name');
|
|
535
|
+
}
|
|
536
|
+
set name(value) {
|
|
537
|
+
this._name = value;
|
|
538
|
+
}
|
|
539
|
+
// Temporarily expose input value. Use with caution.
|
|
540
|
+
get nameInput() {
|
|
541
|
+
return this._name;
|
|
542
|
+
}
|
|
543
|
+
// node_pools - computed: true, optional: false, required: false
|
|
544
|
+
_nodePools = new ClusterNodePoolsList(this, "node_pools", true);
|
|
545
|
+
get nodePools() {
|
|
546
|
+
return this._nodePools;
|
|
547
|
+
}
|
|
548
|
+
// pod_subnet_range - computed: false, optional: true, required: false
|
|
549
|
+
_podSubnetRange;
|
|
550
|
+
get podSubnetRange() {
|
|
551
|
+
return this.getStringAttribute('pod_subnet_range');
|
|
552
|
+
}
|
|
553
|
+
set podSubnetRange(value) {
|
|
554
|
+
this._podSubnetRange = value;
|
|
555
|
+
}
|
|
556
|
+
resetPodSubnetRange() {
|
|
557
|
+
this._podSubnetRange = undefined;
|
|
558
|
+
}
|
|
559
|
+
// Temporarily expose input value. Use with caution.
|
|
560
|
+
get podSubnetRangeInput() {
|
|
561
|
+
return this._podSubnetRange;
|
|
562
|
+
}
|
|
563
|
+
// provider_account - computed: true, optional: false, required: false
|
|
564
|
+
get providerAccount() {
|
|
565
|
+
return this.getStringAttribute('provider_account');
|
|
566
|
+
}
|
|
567
|
+
// region - computed: false, optional: false, required: true
|
|
568
|
+
_region;
|
|
569
|
+
get region() {
|
|
570
|
+
return this.getStringAttribute('region');
|
|
571
|
+
}
|
|
572
|
+
set region(value) {
|
|
573
|
+
this._region = value;
|
|
574
|
+
}
|
|
575
|
+
// Temporarily expose input value. Use with caution.
|
|
576
|
+
get regionInput() {
|
|
577
|
+
return this._region;
|
|
578
|
+
}
|
|
579
|
+
// service_peering_range - computed: false, optional: true, required: false
|
|
580
|
+
_servicePeeringRange;
|
|
581
|
+
get servicePeeringRange() {
|
|
582
|
+
return this.getStringAttribute('service_peering_range');
|
|
583
|
+
}
|
|
584
|
+
set servicePeeringRange(value) {
|
|
585
|
+
this._servicePeeringRange = value;
|
|
586
|
+
}
|
|
587
|
+
resetServicePeeringRange() {
|
|
588
|
+
this._servicePeeringRange = undefined;
|
|
589
|
+
}
|
|
590
|
+
// Temporarily expose input value. Use with caution.
|
|
591
|
+
get servicePeeringRangeInput() {
|
|
592
|
+
return this._servicePeeringRange;
|
|
593
|
+
}
|
|
594
|
+
// service_subnet_range - computed: false, optional: true, required: false
|
|
595
|
+
_serviceSubnetRange;
|
|
596
|
+
get serviceSubnetRange() {
|
|
597
|
+
return this.getStringAttribute('service_subnet_range');
|
|
598
|
+
}
|
|
599
|
+
set serviceSubnetRange(value) {
|
|
600
|
+
this._serviceSubnetRange = value;
|
|
601
|
+
}
|
|
602
|
+
resetServiceSubnetRange() {
|
|
603
|
+
this._serviceSubnetRange = undefined;
|
|
604
|
+
}
|
|
605
|
+
// Temporarily expose input value. Use with caution.
|
|
606
|
+
get serviceSubnetRangeInput() {
|
|
607
|
+
return this._serviceSubnetRange;
|
|
608
|
+
}
|
|
609
|
+
// status - computed: true, optional: false, required: false
|
|
610
|
+
get status() {
|
|
611
|
+
return this.getStringAttribute('status');
|
|
612
|
+
}
|
|
613
|
+
// tenant_id - computed: true, optional: false, required: false
|
|
614
|
+
get tenantId() {
|
|
615
|
+
return this.getStringAttribute('tenant_id');
|
|
616
|
+
}
|
|
617
|
+
// timeouts - computed: false, optional: true, required: false
|
|
618
|
+
_timeouts = new ClusterTimeoutsOutputReference(this, "timeouts");
|
|
619
|
+
get timeouts() {
|
|
620
|
+
return this._timeouts;
|
|
621
|
+
}
|
|
622
|
+
putTimeouts(value) {
|
|
623
|
+
this._timeouts.internalValue = value;
|
|
624
|
+
}
|
|
625
|
+
resetTimeouts() {
|
|
626
|
+
this._timeouts.internalValue = undefined;
|
|
627
|
+
}
|
|
628
|
+
// Temporarily expose input value. Use with caution.
|
|
629
|
+
get timeoutsInput() {
|
|
630
|
+
return this._timeouts.internalValue;
|
|
631
|
+
}
|
|
632
|
+
// type - computed: false, optional: false, required: true
|
|
633
|
+
_type;
|
|
634
|
+
get type() {
|
|
635
|
+
return this.getStringAttribute('type');
|
|
636
|
+
}
|
|
637
|
+
set type(value) {
|
|
638
|
+
this._type = value;
|
|
639
|
+
}
|
|
640
|
+
// Temporarily expose input value. Use with caution.
|
|
641
|
+
get typeInput() {
|
|
642
|
+
return this._type;
|
|
643
|
+
}
|
|
644
|
+
// updated_at - computed: true, optional: false, required: false
|
|
645
|
+
get updatedAt() {
|
|
646
|
+
return this.getStringAttribute('updated_at');
|
|
647
|
+
}
|
|
648
|
+
// vpc_subnet_range - computed: false, optional: false, required: true
|
|
649
|
+
_vpcSubnetRange;
|
|
650
|
+
get vpcSubnetRange() {
|
|
651
|
+
return this.getStringAttribute('vpc_subnet_range');
|
|
652
|
+
}
|
|
653
|
+
set vpcSubnetRange(value) {
|
|
654
|
+
this._vpcSubnetRange = value;
|
|
655
|
+
}
|
|
656
|
+
// Temporarily expose input value. Use with caution.
|
|
657
|
+
get vpcSubnetRangeInput() {
|
|
658
|
+
return this._vpcSubnetRange;
|
|
659
|
+
}
|
|
660
|
+
// workspace_ids - computed: false, optional: false, required: true
|
|
661
|
+
_workspaceIds;
|
|
662
|
+
get workspaceIds() {
|
|
663
|
+
return cdktf.Fn.tolist(this.getListAttribute('workspace_ids'));
|
|
664
|
+
}
|
|
665
|
+
set workspaceIds(value) {
|
|
666
|
+
this._workspaceIds = value;
|
|
667
|
+
}
|
|
668
|
+
// Temporarily expose input value. Use with caution.
|
|
669
|
+
get workspaceIdsInput() {
|
|
670
|
+
return this._workspaceIds;
|
|
671
|
+
}
|
|
672
|
+
// =========
|
|
673
|
+
// SYNTHESIS
|
|
674
|
+
// =========
|
|
675
|
+
synthesizeAttributes() {
|
|
676
|
+
return {
|
|
677
|
+
cloud_provider: cdktf.stringToTerraform(this._cloudProvider),
|
|
678
|
+
name: cdktf.stringToTerraform(this._name),
|
|
679
|
+
pod_subnet_range: cdktf.stringToTerraform(this._podSubnetRange),
|
|
680
|
+
region: cdktf.stringToTerraform(this._region),
|
|
681
|
+
service_peering_range: cdktf.stringToTerraform(this._servicePeeringRange),
|
|
682
|
+
service_subnet_range: cdktf.stringToTerraform(this._serviceSubnetRange),
|
|
683
|
+
timeouts: clusterTimeoutsToTerraform(this._timeouts.internalValue),
|
|
684
|
+
type: cdktf.stringToTerraform(this._type),
|
|
685
|
+
vpc_subnet_range: cdktf.stringToTerraform(this._vpcSubnetRange),
|
|
686
|
+
workspace_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(this._workspaceIds),
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
synthesizeHclAttributes() {
|
|
690
|
+
const attrs = {
|
|
691
|
+
cloud_provider: {
|
|
692
|
+
value: cdktf.stringToHclTerraform(this._cloudProvider),
|
|
693
|
+
isBlock: false,
|
|
694
|
+
type: "simple",
|
|
695
|
+
storageClassType: "string",
|
|
696
|
+
},
|
|
697
|
+
name: {
|
|
698
|
+
value: cdktf.stringToHclTerraform(this._name),
|
|
699
|
+
isBlock: false,
|
|
700
|
+
type: "simple",
|
|
701
|
+
storageClassType: "string",
|
|
702
|
+
},
|
|
703
|
+
pod_subnet_range: {
|
|
704
|
+
value: cdktf.stringToHclTerraform(this._podSubnetRange),
|
|
705
|
+
isBlock: false,
|
|
706
|
+
type: "simple",
|
|
707
|
+
storageClassType: "string",
|
|
708
|
+
},
|
|
709
|
+
region: {
|
|
710
|
+
value: cdktf.stringToHclTerraform(this._region),
|
|
711
|
+
isBlock: false,
|
|
712
|
+
type: "simple",
|
|
713
|
+
storageClassType: "string",
|
|
714
|
+
},
|
|
715
|
+
service_peering_range: {
|
|
716
|
+
value: cdktf.stringToHclTerraform(this._servicePeeringRange),
|
|
717
|
+
isBlock: false,
|
|
718
|
+
type: "simple",
|
|
719
|
+
storageClassType: "string",
|
|
720
|
+
},
|
|
721
|
+
service_subnet_range: {
|
|
722
|
+
value: cdktf.stringToHclTerraform(this._serviceSubnetRange),
|
|
723
|
+
isBlock: false,
|
|
724
|
+
type: "simple",
|
|
725
|
+
storageClassType: "string",
|
|
726
|
+
},
|
|
727
|
+
timeouts: {
|
|
728
|
+
value: clusterTimeoutsToHclTerraform(this._timeouts.internalValue),
|
|
729
|
+
isBlock: true,
|
|
730
|
+
type: "struct",
|
|
731
|
+
storageClassType: "ClusterTimeouts",
|
|
732
|
+
},
|
|
733
|
+
type: {
|
|
734
|
+
value: cdktf.stringToHclTerraform(this._type),
|
|
735
|
+
isBlock: false,
|
|
736
|
+
type: "simple",
|
|
737
|
+
storageClassType: "string",
|
|
738
|
+
},
|
|
739
|
+
vpc_subnet_range: {
|
|
740
|
+
value: cdktf.stringToHclTerraform(this._vpcSubnetRange),
|
|
741
|
+
isBlock: false,
|
|
742
|
+
type: "simple",
|
|
743
|
+
storageClassType: "string",
|
|
744
|
+
},
|
|
745
|
+
workspace_ids: {
|
|
746
|
+
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._workspaceIds),
|
|
747
|
+
isBlock: false,
|
|
748
|
+
type: "set",
|
|
749
|
+
storageClassType: "stringList",
|
|
750
|
+
},
|
|
751
|
+
};
|
|
752
|
+
// remove undefined attributes
|
|
753
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
|
|
754
|
+
}
|
|
755
|
+
}
|