@cdktf-providers/siderolabs-talos 0.9.0

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.
Files changed (37) hide show
  1. package/LICENSE +355 -0
  2. package/README.md +19 -0
  3. package/dist/cluster-kubeconfig/index.d.ts +187 -0
  4. package/dist/cluster-kubeconfig/index.js +489 -0
  5. package/dist/data-talos-client-configuration/index.d.ts +121 -0
  6. package/dist/data-talos-client-configuration/index.js +292 -0
  7. package/dist/data-talos-cluster-health/index.d.ts +165 -0
  8. package/dist/data-talos-cluster-health/index.js +414 -0
  9. package/dist/data-talos-cluster-kubeconfig/index.d.ts +176 -0
  10. package/dist/data-talos-cluster-kubeconfig/index.js +461 -0
  11. package/dist/data-talos-image-factory-extensions-versions/index.d.ts +118 -0
  12. package/dist/data-talos-image-factory-extensions-versions/index.js +289 -0
  13. package/dist/data-talos-image-factory-overlays-versions/index.d.ts +117 -0
  14. package/dist/data-talos-image-factory-overlays-versions/index.js +285 -0
  15. package/dist/data-talos-image-factory-urls/index.d.ts +163 -0
  16. package/dist/data-talos-image-factory-urls/index.js +272 -0
  17. package/dist/data-talos-image-factory-versions/index.d.ts +71 -0
  18. package/dist/data-talos-image-factory-versions/index.js +182 -0
  19. package/dist/data-talos-machine-configuration/index.d.ts +521 -0
  20. package/dist/data-talos-machine-configuration/index.js +1424 -0
  21. package/dist/data-talos-machine-disks/index.d.ts +208 -0
  22. package/dist/data-talos-machine-disks/index.js +537 -0
  23. package/dist/image-factory-schematic/index.d.ts +50 -0
  24. package/dist/image-factory-schematic/index.js +95 -0
  25. package/dist/index.d.ts +15 -0
  26. package/dist/index.js +16 -0
  27. package/dist/lazy-index.d.ts +0 -0
  28. package/dist/lazy-index.js +16 -0
  29. package/dist/machine-bootstrap/index.d.ts +144 -0
  30. package/dist/machine-bootstrap/index.js +371 -0
  31. package/dist/machine-configuration-apply/index.d.ts +262 -0
  32. package/dist/machine-configuration-apply/index.js +659 -0
  33. package/dist/machine-secrets/index.d.ts +238 -0
  34. package/dist/machine-secrets/index.js +684 -0
  35. package/dist/provider/index.d.ts +54 -0
  36. package/dist/provider/index.js +108 -0
  37. package/package.json +51 -0
@@ -0,0 +1,684 @@
1
+ // https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_secrets
2
+ // generated from terraform resource schema
3
+ import * as cdktf from 'cdktf';
4
+ export function machineSecretsClientConfigurationToTerraform(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 machineSecretsClientConfigurationToHclTerraform(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 MachineSecretsClientConfigurationOutputReference 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
+ */
29
+ constructor(terraformResource, terraformAttribute) {
30
+ super(terraformResource, terraformAttribute, false);
31
+ }
32
+ get internalValue() {
33
+ let hasAnyValues = this.isEmptyObject;
34
+ const internalValueResult = {};
35
+ return hasAnyValues ? internalValueResult : undefined;
36
+ }
37
+ set internalValue(value) {
38
+ if (value === undefined) {
39
+ this.isEmptyObject = false;
40
+ }
41
+ else {
42
+ this.isEmptyObject = Object.keys(value).length === 0;
43
+ }
44
+ }
45
+ // ca_certificate - computed: true, optional: false, required: false
46
+ get caCertificate() {
47
+ return this.getStringAttribute('ca_certificate');
48
+ }
49
+ // client_certificate - computed: true, optional: false, required: false
50
+ get clientCertificate() {
51
+ return this.getStringAttribute('client_certificate');
52
+ }
53
+ // client_key - computed: true, optional: false, required: false
54
+ get clientKey() {
55
+ return this.getStringAttribute('client_key');
56
+ }
57
+ }
58
+ export function machineSecretsMachineSecretsCertsEtcdToTerraform(struct) {
59
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
60
+ return struct;
61
+ }
62
+ if (cdktf.isComplexElement(struct)) {
63
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
64
+ }
65
+ return {};
66
+ }
67
+ export function machineSecretsMachineSecretsCertsEtcdToHclTerraform(struct) {
68
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
69
+ return struct;
70
+ }
71
+ if (cdktf.isComplexElement(struct)) {
72
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
73
+ }
74
+ const attrs = {};
75
+ return attrs;
76
+ }
77
+ export class MachineSecretsMachineSecretsCertsEtcdOutputReference extends cdktf.ComplexObject {
78
+ isEmptyObject = false;
79
+ /**
80
+ * @param terraformResource The parent resource
81
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
82
+ */
83
+ constructor(terraformResource, terraformAttribute) {
84
+ super(terraformResource, terraformAttribute, false);
85
+ }
86
+ get internalValue() {
87
+ let hasAnyValues = this.isEmptyObject;
88
+ const internalValueResult = {};
89
+ return hasAnyValues ? internalValueResult : undefined;
90
+ }
91
+ set internalValue(value) {
92
+ if (value === undefined) {
93
+ this.isEmptyObject = false;
94
+ }
95
+ else {
96
+ this.isEmptyObject = Object.keys(value).length === 0;
97
+ }
98
+ }
99
+ // cert - computed: true, optional: false, required: false
100
+ get cert() {
101
+ return this.getStringAttribute('cert');
102
+ }
103
+ // key - computed: true, optional: false, required: false
104
+ get key() {
105
+ return this.getStringAttribute('key');
106
+ }
107
+ }
108
+ export function machineSecretsMachineSecretsCertsK8SToTerraform(struct) {
109
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
110
+ return struct;
111
+ }
112
+ if (cdktf.isComplexElement(struct)) {
113
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
114
+ }
115
+ return {};
116
+ }
117
+ export function machineSecretsMachineSecretsCertsK8SToHclTerraform(struct) {
118
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
119
+ return struct;
120
+ }
121
+ if (cdktf.isComplexElement(struct)) {
122
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
123
+ }
124
+ const attrs = {};
125
+ return attrs;
126
+ }
127
+ export class MachineSecretsMachineSecretsCertsK8SOutputReference extends cdktf.ComplexObject {
128
+ isEmptyObject = false;
129
+ /**
130
+ * @param terraformResource The parent resource
131
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
132
+ */
133
+ constructor(terraformResource, terraformAttribute) {
134
+ super(terraformResource, terraformAttribute, false);
135
+ }
136
+ get internalValue() {
137
+ let hasAnyValues = this.isEmptyObject;
138
+ const internalValueResult = {};
139
+ return hasAnyValues ? internalValueResult : undefined;
140
+ }
141
+ set internalValue(value) {
142
+ if (value === undefined) {
143
+ this.isEmptyObject = false;
144
+ }
145
+ else {
146
+ this.isEmptyObject = Object.keys(value).length === 0;
147
+ }
148
+ }
149
+ // cert - computed: true, optional: false, required: false
150
+ get cert() {
151
+ return this.getStringAttribute('cert');
152
+ }
153
+ // key - computed: true, optional: false, required: false
154
+ get key() {
155
+ return this.getStringAttribute('key');
156
+ }
157
+ }
158
+ export function machineSecretsMachineSecretsCertsK8SAggregatorToTerraform(struct) {
159
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
160
+ return struct;
161
+ }
162
+ if (cdktf.isComplexElement(struct)) {
163
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
164
+ }
165
+ return {};
166
+ }
167
+ export function machineSecretsMachineSecretsCertsK8SAggregatorToHclTerraform(struct) {
168
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
169
+ return struct;
170
+ }
171
+ if (cdktf.isComplexElement(struct)) {
172
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
173
+ }
174
+ const attrs = {};
175
+ return attrs;
176
+ }
177
+ export class MachineSecretsMachineSecretsCertsK8SAggregatorOutputReference extends cdktf.ComplexObject {
178
+ isEmptyObject = false;
179
+ /**
180
+ * @param terraformResource The parent resource
181
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
182
+ */
183
+ constructor(terraformResource, terraformAttribute) {
184
+ super(terraformResource, terraformAttribute, false);
185
+ }
186
+ get internalValue() {
187
+ let hasAnyValues = this.isEmptyObject;
188
+ const internalValueResult = {};
189
+ return hasAnyValues ? internalValueResult : undefined;
190
+ }
191
+ set internalValue(value) {
192
+ if (value === undefined) {
193
+ this.isEmptyObject = false;
194
+ }
195
+ else {
196
+ this.isEmptyObject = Object.keys(value).length === 0;
197
+ }
198
+ }
199
+ // cert - computed: true, optional: false, required: false
200
+ get cert() {
201
+ return this.getStringAttribute('cert');
202
+ }
203
+ // key - computed: true, optional: false, required: false
204
+ get key() {
205
+ return this.getStringAttribute('key');
206
+ }
207
+ }
208
+ export function machineSecretsMachineSecretsCertsK8SServiceaccountToTerraform(struct) {
209
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
210
+ return struct;
211
+ }
212
+ if (cdktf.isComplexElement(struct)) {
213
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
214
+ }
215
+ return {};
216
+ }
217
+ export function machineSecretsMachineSecretsCertsK8SServiceaccountToHclTerraform(struct) {
218
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
219
+ return struct;
220
+ }
221
+ if (cdktf.isComplexElement(struct)) {
222
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
223
+ }
224
+ const attrs = {};
225
+ return attrs;
226
+ }
227
+ export class MachineSecretsMachineSecretsCertsK8SServiceaccountOutputReference extends cdktf.ComplexObject {
228
+ isEmptyObject = false;
229
+ /**
230
+ * @param terraformResource The parent resource
231
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
232
+ */
233
+ constructor(terraformResource, terraformAttribute) {
234
+ super(terraformResource, terraformAttribute, false);
235
+ }
236
+ get internalValue() {
237
+ let hasAnyValues = this.isEmptyObject;
238
+ const internalValueResult = {};
239
+ return hasAnyValues ? internalValueResult : undefined;
240
+ }
241
+ set internalValue(value) {
242
+ if (value === undefined) {
243
+ this.isEmptyObject = false;
244
+ }
245
+ else {
246
+ this.isEmptyObject = Object.keys(value).length === 0;
247
+ }
248
+ }
249
+ // key - computed: true, optional: false, required: false
250
+ get key() {
251
+ return this.getStringAttribute('key');
252
+ }
253
+ }
254
+ export function machineSecretsMachineSecretsCertsOsToTerraform(struct) {
255
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
256
+ return struct;
257
+ }
258
+ if (cdktf.isComplexElement(struct)) {
259
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
260
+ }
261
+ return {};
262
+ }
263
+ export function machineSecretsMachineSecretsCertsOsToHclTerraform(struct) {
264
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
265
+ return struct;
266
+ }
267
+ if (cdktf.isComplexElement(struct)) {
268
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
269
+ }
270
+ const attrs = {};
271
+ return attrs;
272
+ }
273
+ export class MachineSecretsMachineSecretsCertsOsOutputReference extends cdktf.ComplexObject {
274
+ isEmptyObject = false;
275
+ /**
276
+ * @param terraformResource The parent resource
277
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
278
+ */
279
+ constructor(terraformResource, terraformAttribute) {
280
+ super(terraformResource, terraformAttribute, false);
281
+ }
282
+ get internalValue() {
283
+ let hasAnyValues = this.isEmptyObject;
284
+ const internalValueResult = {};
285
+ return hasAnyValues ? internalValueResult : undefined;
286
+ }
287
+ set internalValue(value) {
288
+ if (value === undefined) {
289
+ this.isEmptyObject = false;
290
+ }
291
+ else {
292
+ this.isEmptyObject = Object.keys(value).length === 0;
293
+ }
294
+ }
295
+ // cert - computed: true, optional: false, required: false
296
+ get cert() {
297
+ return this.getStringAttribute('cert');
298
+ }
299
+ // key - computed: true, optional: false, required: false
300
+ get key() {
301
+ return this.getStringAttribute('key');
302
+ }
303
+ }
304
+ export function machineSecretsMachineSecretsCertsToTerraform(struct) {
305
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
306
+ return struct;
307
+ }
308
+ if (cdktf.isComplexElement(struct)) {
309
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
310
+ }
311
+ return {};
312
+ }
313
+ export function machineSecretsMachineSecretsCertsToHclTerraform(struct) {
314
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
315
+ return struct;
316
+ }
317
+ if (cdktf.isComplexElement(struct)) {
318
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
319
+ }
320
+ const attrs = {};
321
+ return attrs;
322
+ }
323
+ export class MachineSecretsMachineSecretsCertsOutputReference extends cdktf.ComplexObject {
324
+ isEmptyObject = false;
325
+ /**
326
+ * @param terraformResource The parent resource
327
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
328
+ */
329
+ constructor(terraformResource, terraformAttribute) {
330
+ super(terraformResource, terraformAttribute, false);
331
+ }
332
+ get internalValue() {
333
+ let hasAnyValues = this.isEmptyObject;
334
+ const internalValueResult = {};
335
+ return hasAnyValues ? internalValueResult : undefined;
336
+ }
337
+ set internalValue(value) {
338
+ if (value === undefined) {
339
+ this.isEmptyObject = false;
340
+ }
341
+ else {
342
+ this.isEmptyObject = Object.keys(value).length === 0;
343
+ }
344
+ }
345
+ // etcd - computed: true, optional: false, required: false
346
+ _etcd = new MachineSecretsMachineSecretsCertsEtcdOutputReference(this, "etcd");
347
+ get etcd() {
348
+ return this._etcd;
349
+ }
350
+ // k8s - computed: true, optional: false, required: false
351
+ _k8S = new MachineSecretsMachineSecretsCertsK8SOutputReference(this, "k8s");
352
+ get k8S() {
353
+ return this._k8S;
354
+ }
355
+ // k8s_aggregator - computed: true, optional: false, required: false
356
+ _k8SAggregator = new MachineSecretsMachineSecretsCertsK8SAggregatorOutputReference(this, "k8s_aggregator");
357
+ get k8SAggregator() {
358
+ return this._k8SAggregator;
359
+ }
360
+ // k8s_serviceaccount - computed: true, optional: false, required: false
361
+ _k8SServiceaccount = new MachineSecretsMachineSecretsCertsK8SServiceaccountOutputReference(this, "k8s_serviceaccount");
362
+ get k8SServiceaccount() {
363
+ return this._k8SServiceaccount;
364
+ }
365
+ // os - computed: true, optional: false, required: false
366
+ _os = new MachineSecretsMachineSecretsCertsOsOutputReference(this, "os");
367
+ get os() {
368
+ return this._os;
369
+ }
370
+ }
371
+ export function machineSecretsMachineSecretsClusterToTerraform(struct) {
372
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
373
+ return struct;
374
+ }
375
+ if (cdktf.isComplexElement(struct)) {
376
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
377
+ }
378
+ return {};
379
+ }
380
+ export function machineSecretsMachineSecretsClusterToHclTerraform(struct) {
381
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
382
+ return struct;
383
+ }
384
+ if (cdktf.isComplexElement(struct)) {
385
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
386
+ }
387
+ const attrs = {};
388
+ return attrs;
389
+ }
390
+ export class MachineSecretsMachineSecretsClusterOutputReference extends cdktf.ComplexObject {
391
+ isEmptyObject = false;
392
+ /**
393
+ * @param terraformResource The parent resource
394
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
395
+ */
396
+ constructor(terraformResource, terraformAttribute) {
397
+ super(terraformResource, terraformAttribute, false);
398
+ }
399
+ get internalValue() {
400
+ let hasAnyValues = this.isEmptyObject;
401
+ const internalValueResult = {};
402
+ return hasAnyValues ? internalValueResult : undefined;
403
+ }
404
+ set internalValue(value) {
405
+ if (value === undefined) {
406
+ this.isEmptyObject = false;
407
+ }
408
+ else {
409
+ this.isEmptyObject = Object.keys(value).length === 0;
410
+ }
411
+ }
412
+ // id - computed: true, optional: false, required: false
413
+ get id() {
414
+ return this.getStringAttribute('id');
415
+ }
416
+ // secret - computed: true, optional: false, required: false
417
+ get secret() {
418
+ return this.getStringAttribute('secret');
419
+ }
420
+ }
421
+ export function machineSecretsMachineSecretsSecretsToTerraform(struct) {
422
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
423
+ return struct;
424
+ }
425
+ if (cdktf.isComplexElement(struct)) {
426
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
427
+ }
428
+ return {};
429
+ }
430
+ export function machineSecretsMachineSecretsSecretsToHclTerraform(struct) {
431
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
432
+ return struct;
433
+ }
434
+ if (cdktf.isComplexElement(struct)) {
435
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
436
+ }
437
+ const attrs = {};
438
+ return attrs;
439
+ }
440
+ export class MachineSecretsMachineSecretsSecretsOutputReference extends cdktf.ComplexObject {
441
+ isEmptyObject = false;
442
+ /**
443
+ * @param terraformResource The parent resource
444
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
445
+ */
446
+ constructor(terraformResource, terraformAttribute) {
447
+ super(terraformResource, terraformAttribute, false);
448
+ }
449
+ get internalValue() {
450
+ let hasAnyValues = this.isEmptyObject;
451
+ const internalValueResult = {};
452
+ return hasAnyValues ? internalValueResult : undefined;
453
+ }
454
+ set internalValue(value) {
455
+ if (value === undefined) {
456
+ this.isEmptyObject = false;
457
+ }
458
+ else {
459
+ this.isEmptyObject = Object.keys(value).length === 0;
460
+ }
461
+ }
462
+ // aescbc_encryption_secret - computed: true, optional: false, required: false
463
+ get aescbcEncryptionSecret() {
464
+ return this.getStringAttribute('aescbc_encryption_secret');
465
+ }
466
+ // bootstrap_token - computed: true, optional: false, required: false
467
+ get bootstrapToken() {
468
+ return this.getStringAttribute('bootstrap_token');
469
+ }
470
+ // secretbox_encryption_secret - computed: true, optional: false, required: false
471
+ get secretboxEncryptionSecret() {
472
+ return this.getStringAttribute('secretbox_encryption_secret');
473
+ }
474
+ }
475
+ export function machineSecretsMachineSecretsTrustdinfoToTerraform(struct) {
476
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
477
+ return struct;
478
+ }
479
+ if (cdktf.isComplexElement(struct)) {
480
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
481
+ }
482
+ return {};
483
+ }
484
+ export function machineSecretsMachineSecretsTrustdinfoToHclTerraform(struct) {
485
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
486
+ return struct;
487
+ }
488
+ if (cdktf.isComplexElement(struct)) {
489
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
490
+ }
491
+ const attrs = {};
492
+ return attrs;
493
+ }
494
+ export class MachineSecretsMachineSecretsTrustdinfoOutputReference extends cdktf.ComplexObject {
495
+ isEmptyObject = false;
496
+ /**
497
+ * @param terraformResource The parent resource
498
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
499
+ */
500
+ constructor(terraformResource, terraformAttribute) {
501
+ super(terraformResource, terraformAttribute, false);
502
+ }
503
+ get internalValue() {
504
+ let hasAnyValues = this.isEmptyObject;
505
+ const internalValueResult = {};
506
+ return hasAnyValues ? internalValueResult : undefined;
507
+ }
508
+ set internalValue(value) {
509
+ if (value === undefined) {
510
+ this.isEmptyObject = false;
511
+ }
512
+ else {
513
+ this.isEmptyObject = Object.keys(value).length === 0;
514
+ }
515
+ }
516
+ // token - computed: true, optional: false, required: false
517
+ get token() {
518
+ return this.getStringAttribute('token');
519
+ }
520
+ }
521
+ export function machineSecretsMachineSecretsToTerraform(struct) {
522
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
523
+ return struct;
524
+ }
525
+ if (cdktf.isComplexElement(struct)) {
526
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
527
+ }
528
+ return {};
529
+ }
530
+ export function machineSecretsMachineSecretsToHclTerraform(struct) {
531
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
532
+ return struct;
533
+ }
534
+ if (cdktf.isComplexElement(struct)) {
535
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
536
+ }
537
+ const attrs = {};
538
+ return attrs;
539
+ }
540
+ export class MachineSecretsMachineSecretsOutputReference extends cdktf.ComplexObject {
541
+ isEmptyObject = false;
542
+ /**
543
+ * @param terraformResource The parent resource
544
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
545
+ */
546
+ constructor(terraformResource, terraformAttribute) {
547
+ super(terraformResource, terraformAttribute, false);
548
+ }
549
+ get internalValue() {
550
+ let hasAnyValues = this.isEmptyObject;
551
+ const internalValueResult = {};
552
+ return hasAnyValues ? internalValueResult : undefined;
553
+ }
554
+ set internalValue(value) {
555
+ if (value === undefined) {
556
+ this.isEmptyObject = false;
557
+ }
558
+ else {
559
+ this.isEmptyObject = Object.keys(value).length === 0;
560
+ }
561
+ }
562
+ // certs - computed: true, optional: false, required: false
563
+ _certs = new MachineSecretsMachineSecretsCertsOutputReference(this, "certs");
564
+ get certs() {
565
+ return this._certs;
566
+ }
567
+ // cluster - computed: true, optional: false, required: false
568
+ _cluster = new MachineSecretsMachineSecretsClusterOutputReference(this, "cluster");
569
+ get cluster() {
570
+ return this._cluster;
571
+ }
572
+ // secrets - computed: true, optional: false, required: false
573
+ _secrets = new MachineSecretsMachineSecretsSecretsOutputReference(this, "secrets");
574
+ get secrets() {
575
+ return this._secrets;
576
+ }
577
+ // trustdinfo - computed: true, optional: false, required: false
578
+ _trustdinfo = new MachineSecretsMachineSecretsTrustdinfoOutputReference(this, "trustdinfo");
579
+ get trustdinfo() {
580
+ return this._trustdinfo;
581
+ }
582
+ }
583
+ /**
584
+ * Represents a {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_secrets talos_machine_secrets}
585
+ */
586
+ export class MachineSecrets extends cdktf.TerraformResource {
587
+ // =================
588
+ // STATIC PROPERTIES
589
+ // =================
590
+ static tfResourceType = "talos_machine_secrets";
591
+ // ==============
592
+ // STATIC Methods
593
+ // ==============
594
+ /**
595
+ * Generates CDKTF code for importing a MachineSecrets resource upon running "cdktf plan <stack-name>"
596
+ * @param scope The scope in which to define this construct
597
+ * @param importToId The construct id used in the generated config for the MachineSecrets to import
598
+ * @param importFromId The id of the existing MachineSecrets that should be imported. Refer to the {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_secrets#import import section} in the documentation of this resource for the id to use
599
+ * @param provider? Optional instance of the provider where the MachineSecrets to import is found
600
+ */
601
+ static generateConfigForImport(scope, importToId, importFromId, provider) {
602
+ return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "talos_machine_secrets", importId: importFromId, provider });
603
+ }
604
+ // ===========
605
+ // INITIALIZER
606
+ // ===========
607
+ /**
608
+ * Create a new {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_secrets talos_machine_secrets} Resource
609
+ *
610
+ * @param scope The scope in which to define this construct
611
+ * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
612
+ * @param options MachineSecretsConfig = {}
613
+ */
614
+ constructor(scope, id, config = {}) {
615
+ super(scope, id, {
616
+ terraformResourceType: 'talos_machine_secrets',
617
+ terraformGeneratorMetadata: {
618
+ providerName: 'talos',
619
+ providerVersion: '0.9.0',
620
+ providerVersionConstraint: '0.9.0'
621
+ },
622
+ provider: config.provider,
623
+ dependsOn: config.dependsOn,
624
+ count: config.count,
625
+ lifecycle: config.lifecycle,
626
+ provisioners: config.provisioners,
627
+ connection: config.connection,
628
+ forEach: config.forEach
629
+ });
630
+ this._talosVersion = config.talosVersion;
631
+ }
632
+ // ==========
633
+ // ATTRIBUTES
634
+ // ==========
635
+ // client_configuration - computed: true, optional: false, required: false
636
+ _clientConfiguration = new MachineSecretsClientConfigurationOutputReference(this, "client_configuration");
637
+ get clientConfiguration() {
638
+ return this._clientConfiguration;
639
+ }
640
+ // id - computed: true, optional: false, required: false
641
+ get id() {
642
+ return this.getStringAttribute('id');
643
+ }
644
+ // machine_secrets - computed: true, optional: false, required: false
645
+ _machineSecrets = new MachineSecretsMachineSecretsOutputReference(this, "machine_secrets");
646
+ get machineSecrets() {
647
+ return this._machineSecrets;
648
+ }
649
+ // talos_version - computed: true, optional: true, required: false
650
+ _talosVersion;
651
+ get talosVersion() {
652
+ return this.getStringAttribute('talos_version');
653
+ }
654
+ set talosVersion(value) {
655
+ this._talosVersion = value;
656
+ }
657
+ resetTalosVersion() {
658
+ this._talosVersion = undefined;
659
+ }
660
+ // Temporarily expose input value. Use with caution.
661
+ get talosVersionInput() {
662
+ return this._talosVersion;
663
+ }
664
+ // =========
665
+ // SYNTHESIS
666
+ // =========
667
+ synthesizeAttributes() {
668
+ return {
669
+ talos_version: cdktf.stringToTerraform(this._talosVersion),
670
+ };
671
+ }
672
+ synthesizeHclAttributes() {
673
+ const attrs = {
674
+ talos_version: {
675
+ value: cdktf.stringToHclTerraform(this._talosVersion),
676
+ isBlock: false,
677
+ type: "simple",
678
+ storageClassType: "string",
679
+ },
680
+ };
681
+ // remove undefined attributes
682
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
683
+ }
684
+ }