@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,163 @@
1
+ import { Construct } from 'constructs';
2
+ import * as cdktf from 'cdktf';
3
+ export interface DataTalosImageFactoryUrlsConfig extends cdktf.TerraformMetaArguments {
4
+ /**
5
+ * The platform architecture for which the URLs are generated. Defaults to amd64.
6
+ *
7
+ * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_urls#architecture DataTalosImageFactoryUrls#architecture}
8
+ */
9
+ readonly architecture?: string;
10
+ /**
11
+ *
12
+ * The platform for which the URLs are generated.
13
+ *
14
+ * #### Metal
15
+ *
16
+ * - metal
17
+ *
18
+ * #### Cloud Platforms
19
+ * - aws
20
+ * - gcp
21
+ * - equinixMetal
22
+ * - azure
23
+ * - digital-ocean
24
+ * - nocloud
25
+ * - openstack
26
+ * - vmware
27
+ * - akamai
28
+ * - cloudstack
29
+ * - hcloud
30
+ * - oracle
31
+ * - upcloud
32
+ * - vultr
33
+ * - exoscale
34
+ * - opennebula
35
+ * - scaleway
36
+ *
37
+ *
38
+ * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_urls#platform DataTalosImageFactoryUrls#platform}
39
+ */
40
+ readonly platform?: string;
41
+ /**
42
+ *
43
+ * The SBC's (Single Board Copmuters) for which the url are generated.
44
+ *
45
+ * #### Single Board Computers
46
+ * - rpi_generic
47
+ * - revpi_generic
48
+ * - bananapi_m64
49
+ * - nanopi_r4s
50
+ * - nanopi_r5s
51
+ * - jetson_nano
52
+ * - libretech_all_h3_cc_h5
53
+ * - orangepi_r1_plus_lts
54
+ * - pine64
55
+ * - rock64
56
+ * - rock4cplus
57
+ * - rock4se
58
+ * - rock5a
59
+ * - rock5b
60
+ * - rockpi_4
61
+ * - rockpi_4c
62
+ * - helios64
63
+ * - turingrk1
64
+ * - orangepi-5
65
+ * - orangepi-5-plus
66
+ * - rockpro64
67
+ *
68
+ *
69
+ * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_urls#sbc DataTalosImageFactoryUrls#sbc}
70
+ */
71
+ readonly sbc?: string;
72
+ /**
73
+ * The schematic ID for which the URLs are generated.
74
+ *
75
+ * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_urls#schematic_id DataTalosImageFactoryUrls#schematic_id}
76
+ */
77
+ readonly schematicId: string;
78
+ /**
79
+ * The Talos version for which the URLs are generated.
80
+ *
81
+ * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_urls#talos_version DataTalosImageFactoryUrls#talos_version}
82
+ */
83
+ readonly talosVersion: string;
84
+ }
85
+ export interface DataTalosImageFactoryUrlsUrls {
86
+ }
87
+ export declare function dataTalosImageFactoryUrlsUrlsToTerraform(struct?: DataTalosImageFactoryUrlsUrls): any;
88
+ export declare function dataTalosImageFactoryUrlsUrlsToHclTerraform(struct?: DataTalosImageFactoryUrlsUrls): any;
89
+ export declare class DataTalosImageFactoryUrlsUrlsOutputReference extends cdktf.ComplexObject {
90
+ private isEmptyObject;
91
+ /**
92
+ * @param terraformResource The parent resource
93
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
94
+ */
95
+ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string);
96
+ get internalValue(): DataTalosImageFactoryUrlsUrls | undefined;
97
+ set internalValue(value: DataTalosImageFactoryUrlsUrls | undefined);
98
+ get diskImage(): any;
99
+ get diskImageSecureboot(): any;
100
+ get initramfs(): any;
101
+ get installer(): any;
102
+ get installerSecureboot(): any;
103
+ get iso(): any;
104
+ get isoSecureboot(): any;
105
+ get kernel(): any;
106
+ get kernelCommandLine(): any;
107
+ get pxe(): any;
108
+ get uki(): any;
109
+ }
110
+ /**
111
+ * Represents a {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_urls talos_image_factory_urls}
112
+ */
113
+ export declare class DataTalosImageFactoryUrls extends cdktf.TerraformDataSource {
114
+ static readonly tfResourceType = "talos_image_factory_urls";
115
+ /**
116
+ * Generates CDKTF code for importing a DataTalosImageFactoryUrls resource upon running "cdktf plan <stack-name>"
117
+ * @param scope The scope in which to define this construct
118
+ * @param importToId The construct id used in the generated config for the DataTalosImageFactoryUrls to import
119
+ * @param importFromId The id of the existing DataTalosImageFactoryUrls that should be imported. Refer to the {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_urls#import import section} in the documentation of this resource for the id to use
120
+ * @param provider? Optional instance of the provider where the DataTalosImageFactoryUrls to import is found
121
+ */
122
+ static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktf.TerraformProvider): any;
123
+ /**
124
+ * Create a new {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_urls talos_image_factory_urls} Data Source
125
+ *
126
+ * @param scope The scope in which to define this construct
127
+ * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
128
+ * @param options DataTalosImageFactoryUrlsConfig
129
+ */
130
+ constructor(scope: Construct, id: string, config: DataTalosImageFactoryUrlsConfig);
131
+ private _architecture?;
132
+ get architecture(): string;
133
+ set architecture(value: string);
134
+ resetArchitecture(): void;
135
+ get architectureInput(): string;
136
+ get id(): any;
137
+ private _platform?;
138
+ get platform(): string;
139
+ set platform(value: string);
140
+ resetPlatform(): void;
141
+ get platformInput(): string;
142
+ private _sbc?;
143
+ get sbc(): string;
144
+ set sbc(value: string);
145
+ resetSbc(): void;
146
+ get sbcInput(): string;
147
+ private _schematicId?;
148
+ get schematicId(): string;
149
+ set schematicId(value: string);
150
+ get schematicIdInput(): string;
151
+ private _talosVersion?;
152
+ get talosVersion(): string;
153
+ set talosVersion(value: string);
154
+ get talosVersionInput(): string;
155
+ private _urls;
156
+ get urls(): DataTalosImageFactoryUrlsUrlsOutputReference;
157
+ protected synthesizeAttributes(): {
158
+ [name: string]: any;
159
+ };
160
+ protected synthesizeHclAttributes(): {
161
+ [name: string]: any;
162
+ };
163
+ }
@@ -0,0 +1,272 @@
1
+ // https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_urls
2
+ // generated from terraform resource schema
3
+ import * as cdktf from 'cdktf';
4
+ export function dataTalosImageFactoryUrlsUrlsToTerraform(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 dataTalosImageFactoryUrlsUrlsToHclTerraform(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 DataTalosImageFactoryUrlsUrlsOutputReference 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
+ // disk_image - computed: true, optional: false, required: false
46
+ get diskImage() {
47
+ return this.getStringAttribute('disk_image');
48
+ }
49
+ // disk_image_secureboot - computed: true, optional: false, required: false
50
+ get diskImageSecureboot() {
51
+ return this.getStringAttribute('disk_image_secureboot');
52
+ }
53
+ // initramfs - computed: true, optional: false, required: false
54
+ get initramfs() {
55
+ return this.getStringAttribute('initramfs');
56
+ }
57
+ // installer - computed: true, optional: false, required: false
58
+ get installer() {
59
+ return this.getStringAttribute('installer');
60
+ }
61
+ // installer_secureboot - computed: true, optional: false, required: false
62
+ get installerSecureboot() {
63
+ return this.getStringAttribute('installer_secureboot');
64
+ }
65
+ // iso - computed: true, optional: false, required: false
66
+ get iso() {
67
+ return this.getStringAttribute('iso');
68
+ }
69
+ // iso_secureboot - computed: true, optional: false, required: false
70
+ get isoSecureboot() {
71
+ return this.getStringAttribute('iso_secureboot');
72
+ }
73
+ // kernel - computed: true, optional: false, required: false
74
+ get kernel() {
75
+ return this.getStringAttribute('kernel');
76
+ }
77
+ // kernel_command_line - computed: true, optional: false, required: false
78
+ get kernelCommandLine() {
79
+ return this.getStringAttribute('kernel_command_line');
80
+ }
81
+ // pxe - computed: true, optional: false, required: false
82
+ get pxe() {
83
+ return this.getStringAttribute('pxe');
84
+ }
85
+ // uki - computed: true, optional: false, required: false
86
+ get uki() {
87
+ return this.getStringAttribute('uki');
88
+ }
89
+ }
90
+ /**
91
+ * Represents a {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_urls talos_image_factory_urls}
92
+ */
93
+ export class DataTalosImageFactoryUrls extends cdktf.TerraformDataSource {
94
+ // =================
95
+ // STATIC PROPERTIES
96
+ // =================
97
+ static tfResourceType = "talos_image_factory_urls";
98
+ // ==============
99
+ // STATIC Methods
100
+ // ==============
101
+ /**
102
+ * Generates CDKTF code for importing a DataTalosImageFactoryUrls resource upon running "cdktf plan <stack-name>"
103
+ * @param scope The scope in which to define this construct
104
+ * @param importToId The construct id used in the generated config for the DataTalosImageFactoryUrls to import
105
+ * @param importFromId The id of the existing DataTalosImageFactoryUrls that should be imported. Refer to the {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_urls#import import section} in the documentation of this resource for the id to use
106
+ * @param provider? Optional instance of the provider where the DataTalosImageFactoryUrls to import is found
107
+ */
108
+ static generateConfigForImport(scope, importToId, importFromId, provider) {
109
+ return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "talos_image_factory_urls", importId: importFromId, provider });
110
+ }
111
+ // ===========
112
+ // INITIALIZER
113
+ // ===========
114
+ /**
115
+ * Create a new {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_urls talos_image_factory_urls} Data Source
116
+ *
117
+ * @param scope The scope in which to define this construct
118
+ * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
119
+ * @param options DataTalosImageFactoryUrlsConfig
120
+ */
121
+ constructor(scope, id, config) {
122
+ super(scope, id, {
123
+ terraformResourceType: 'talos_image_factory_urls',
124
+ terraformGeneratorMetadata: {
125
+ providerName: 'talos',
126
+ providerVersion: '0.9.0',
127
+ providerVersionConstraint: '0.9.0'
128
+ },
129
+ provider: config.provider,
130
+ dependsOn: config.dependsOn,
131
+ count: config.count,
132
+ lifecycle: config.lifecycle,
133
+ provisioners: config.provisioners,
134
+ connection: config.connection,
135
+ forEach: config.forEach
136
+ });
137
+ this._architecture = config.architecture;
138
+ this._platform = config.platform;
139
+ this._sbc = config.sbc;
140
+ this._schematicId = config.schematicId;
141
+ this._talosVersion = config.talosVersion;
142
+ }
143
+ // ==========
144
+ // ATTRIBUTES
145
+ // ==========
146
+ // architecture - computed: true, optional: true, required: false
147
+ _architecture;
148
+ get architecture() {
149
+ return this.getStringAttribute('architecture');
150
+ }
151
+ set architecture(value) {
152
+ this._architecture = value;
153
+ }
154
+ resetArchitecture() {
155
+ this._architecture = undefined;
156
+ }
157
+ // Temporarily expose input value. Use with caution.
158
+ get architectureInput() {
159
+ return this._architecture;
160
+ }
161
+ // id - computed: true, optional: false, required: false
162
+ get id() {
163
+ return this.getStringAttribute('id');
164
+ }
165
+ // platform - computed: false, optional: true, required: false
166
+ _platform;
167
+ get platform() {
168
+ return this.getStringAttribute('platform');
169
+ }
170
+ set platform(value) {
171
+ this._platform = value;
172
+ }
173
+ resetPlatform() {
174
+ this._platform = undefined;
175
+ }
176
+ // Temporarily expose input value. Use with caution.
177
+ get platformInput() {
178
+ return this._platform;
179
+ }
180
+ // sbc - computed: false, optional: true, required: false
181
+ _sbc;
182
+ get sbc() {
183
+ return this.getStringAttribute('sbc');
184
+ }
185
+ set sbc(value) {
186
+ this._sbc = value;
187
+ }
188
+ resetSbc() {
189
+ this._sbc = undefined;
190
+ }
191
+ // Temporarily expose input value. Use with caution.
192
+ get sbcInput() {
193
+ return this._sbc;
194
+ }
195
+ // schematic_id - computed: false, optional: false, required: true
196
+ _schematicId;
197
+ get schematicId() {
198
+ return this.getStringAttribute('schematic_id');
199
+ }
200
+ set schematicId(value) {
201
+ this._schematicId = value;
202
+ }
203
+ // Temporarily expose input value. Use with caution.
204
+ get schematicIdInput() {
205
+ return this._schematicId;
206
+ }
207
+ // talos_version - computed: false, optional: false, required: true
208
+ _talosVersion;
209
+ get talosVersion() {
210
+ return this.getStringAttribute('talos_version');
211
+ }
212
+ set talosVersion(value) {
213
+ this._talosVersion = value;
214
+ }
215
+ // Temporarily expose input value. Use with caution.
216
+ get talosVersionInput() {
217
+ return this._talosVersion;
218
+ }
219
+ // urls - computed: true, optional: false, required: false
220
+ _urls = new DataTalosImageFactoryUrlsUrlsOutputReference(this, "urls");
221
+ get urls() {
222
+ return this._urls;
223
+ }
224
+ // =========
225
+ // SYNTHESIS
226
+ // =========
227
+ synthesizeAttributes() {
228
+ return {
229
+ architecture: cdktf.stringToTerraform(this._architecture),
230
+ platform: cdktf.stringToTerraform(this._platform),
231
+ sbc: cdktf.stringToTerraform(this._sbc),
232
+ schematic_id: cdktf.stringToTerraform(this._schematicId),
233
+ talos_version: cdktf.stringToTerraform(this._talosVersion),
234
+ };
235
+ }
236
+ synthesizeHclAttributes() {
237
+ const attrs = {
238
+ architecture: {
239
+ value: cdktf.stringToHclTerraform(this._architecture),
240
+ isBlock: false,
241
+ type: "simple",
242
+ storageClassType: "string",
243
+ },
244
+ platform: {
245
+ value: cdktf.stringToHclTerraform(this._platform),
246
+ isBlock: false,
247
+ type: "simple",
248
+ storageClassType: "string",
249
+ },
250
+ sbc: {
251
+ value: cdktf.stringToHclTerraform(this._sbc),
252
+ isBlock: false,
253
+ type: "simple",
254
+ storageClassType: "string",
255
+ },
256
+ schematic_id: {
257
+ value: cdktf.stringToHclTerraform(this._schematicId),
258
+ isBlock: false,
259
+ type: "simple",
260
+ storageClassType: "string",
261
+ },
262
+ talos_version: {
263
+ value: cdktf.stringToHclTerraform(this._talosVersion),
264
+ isBlock: false,
265
+ type: "simple",
266
+ storageClassType: "string",
267
+ },
268
+ };
269
+ // remove undefined attributes
270
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
271
+ }
272
+ }
@@ -0,0 +1,71 @@
1
+ import { Construct } from 'constructs';
2
+ import * as cdktf from 'cdktf';
3
+ export interface DataTalosImageFactoryVersionsConfig extends cdktf.TerraformMetaArguments {
4
+ /**
5
+ * The filter to apply to the overlays list.
6
+ *
7
+ * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_versions#filters DataTalosImageFactoryVersions#filters}
8
+ */
9
+ readonly filters?: DataTalosImageFactoryVersionsFilters;
10
+ }
11
+ export interface DataTalosImageFactoryVersionsFilters {
12
+ /**
13
+ * If set to true, only stable versions will be returned. If set to false, all versions will be returned.
14
+ *
15
+ * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_versions#stable_versions_only DataTalosImageFactoryVersions#stable_versions_only}
16
+ */
17
+ readonly stableVersionsOnly?: boolean | cdktf.IResolvable;
18
+ }
19
+ export declare function dataTalosImageFactoryVersionsFiltersToTerraform(struct?: DataTalosImageFactoryVersionsFilters | cdktf.IResolvable): any;
20
+ export declare function dataTalosImageFactoryVersionsFiltersToHclTerraform(struct?: DataTalosImageFactoryVersionsFilters | cdktf.IResolvable): any;
21
+ export declare class DataTalosImageFactoryVersionsFiltersOutputReference extends cdktf.ComplexObject {
22
+ private isEmptyObject;
23
+ private resolvableValue?;
24
+ /**
25
+ * @param terraformResource The parent resource
26
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
27
+ */
28
+ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string);
29
+ get internalValue(): DataTalosImageFactoryVersionsFilters | cdktf.IResolvable | undefined;
30
+ set internalValue(value: DataTalosImageFactoryVersionsFilters | cdktf.IResolvable | undefined);
31
+ private _stableVersionsOnly?;
32
+ get stableVersionsOnly(): boolean | cdktf.IResolvable;
33
+ set stableVersionsOnly(value: boolean | cdktf.IResolvable);
34
+ resetStableVersionsOnly(): void;
35
+ get stableVersionsOnlyInput(): any;
36
+ }
37
+ /**
38
+ * Represents a {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_versions talos_image_factory_versions}
39
+ */
40
+ export declare class DataTalosImageFactoryVersions extends cdktf.TerraformDataSource {
41
+ static readonly tfResourceType = "talos_image_factory_versions";
42
+ /**
43
+ * Generates CDKTF code for importing a DataTalosImageFactoryVersions resource upon running "cdktf plan <stack-name>"
44
+ * @param scope The scope in which to define this construct
45
+ * @param importToId The construct id used in the generated config for the DataTalosImageFactoryVersions to import
46
+ * @param importFromId The id of the existing DataTalosImageFactoryVersions that should be imported. Refer to the {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_versions#import import section} in the documentation of this resource for the id to use
47
+ * @param provider? Optional instance of the provider where the DataTalosImageFactoryVersions to import is found
48
+ */
49
+ static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktf.TerraformProvider): any;
50
+ /**
51
+ * Create a new {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_versions talos_image_factory_versions} Data Source
52
+ *
53
+ * @param scope The scope in which to define this construct
54
+ * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
55
+ * @param options DataTalosImageFactoryVersionsConfig = {}
56
+ */
57
+ constructor(scope: Construct, id: string, config?: DataTalosImageFactoryVersionsConfig);
58
+ private _filters;
59
+ get filters(): DataTalosImageFactoryVersionsFiltersOutputReference;
60
+ putFilters(value: DataTalosImageFactoryVersionsFilters): void;
61
+ resetFilters(): void;
62
+ get filtersInput(): any;
63
+ get id(): any;
64
+ get talosVersions(): any;
65
+ protected synthesizeAttributes(): {
66
+ [name: string]: any;
67
+ };
68
+ protected synthesizeHclAttributes(): {
69
+ [name: string]: any;
70
+ };
71
+ }
@@ -0,0 +1,182 @@
1
+ // https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_versions
2
+ // generated from terraform resource schema
3
+ import * as cdktf from 'cdktf';
4
+ export function dataTalosImageFactoryVersionsFiltersToTerraform(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
+ stable_versions_only: cdktf.booleanToTerraform(struct.stableVersionsOnly),
13
+ };
14
+ }
15
+ export function dataTalosImageFactoryVersionsFiltersToHclTerraform(struct) {
16
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
17
+ return struct;
18
+ }
19
+ if (cdktf.isComplexElement(struct)) {
20
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
21
+ }
22
+ const attrs = {
23
+ stable_versions_only: {
24
+ value: cdktf.booleanToHclTerraform(struct.stableVersionsOnly),
25
+ isBlock: false,
26
+ type: "simple",
27
+ storageClassType: "boolean",
28
+ },
29
+ };
30
+ // remove undefined attributes
31
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
32
+ }
33
+ export class DataTalosImageFactoryVersionsFiltersOutputReference extends cdktf.ComplexObject {
34
+ isEmptyObject = false;
35
+ resolvableValue;
36
+ /**
37
+ * @param terraformResource The parent resource
38
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
39
+ */
40
+ constructor(terraformResource, terraformAttribute) {
41
+ super(terraformResource, terraformAttribute, false);
42
+ }
43
+ get internalValue() {
44
+ if (this.resolvableValue) {
45
+ return this.resolvableValue;
46
+ }
47
+ let hasAnyValues = this.isEmptyObject;
48
+ const internalValueResult = {};
49
+ if (this._stableVersionsOnly !== undefined) {
50
+ hasAnyValues = true;
51
+ internalValueResult.stableVersionsOnly = this._stableVersionsOnly;
52
+ }
53
+ return hasAnyValues ? internalValueResult : undefined;
54
+ }
55
+ set internalValue(value) {
56
+ if (value === undefined) {
57
+ this.isEmptyObject = false;
58
+ this.resolvableValue = undefined;
59
+ this._stableVersionsOnly = undefined;
60
+ }
61
+ else if (cdktf.Tokenization.isResolvable(value)) {
62
+ this.isEmptyObject = false;
63
+ this.resolvableValue = value;
64
+ }
65
+ else {
66
+ this.isEmptyObject = Object.keys(value).length === 0;
67
+ this.resolvableValue = undefined;
68
+ this._stableVersionsOnly = value.stableVersionsOnly;
69
+ }
70
+ }
71
+ // stable_versions_only - computed: false, optional: true, required: false
72
+ _stableVersionsOnly;
73
+ get stableVersionsOnly() {
74
+ return this.getBooleanAttribute('stable_versions_only');
75
+ }
76
+ set stableVersionsOnly(value) {
77
+ this._stableVersionsOnly = value;
78
+ }
79
+ resetStableVersionsOnly() {
80
+ this._stableVersionsOnly = undefined;
81
+ }
82
+ // Temporarily expose input value. Use with caution.
83
+ get stableVersionsOnlyInput() {
84
+ return this._stableVersionsOnly;
85
+ }
86
+ }
87
+ /**
88
+ * Represents a {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_versions talos_image_factory_versions}
89
+ */
90
+ export class DataTalosImageFactoryVersions extends cdktf.TerraformDataSource {
91
+ // =================
92
+ // STATIC PROPERTIES
93
+ // =================
94
+ static tfResourceType = "talos_image_factory_versions";
95
+ // ==============
96
+ // STATIC Methods
97
+ // ==============
98
+ /**
99
+ * Generates CDKTF code for importing a DataTalosImageFactoryVersions resource upon running "cdktf plan <stack-name>"
100
+ * @param scope The scope in which to define this construct
101
+ * @param importToId The construct id used in the generated config for the DataTalosImageFactoryVersions to import
102
+ * @param importFromId The id of the existing DataTalosImageFactoryVersions that should be imported. Refer to the {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_versions#import import section} in the documentation of this resource for the id to use
103
+ * @param provider? Optional instance of the provider where the DataTalosImageFactoryVersions to import is found
104
+ */
105
+ static generateConfigForImport(scope, importToId, importFromId, provider) {
106
+ return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "talos_image_factory_versions", importId: importFromId, provider });
107
+ }
108
+ // ===========
109
+ // INITIALIZER
110
+ // ===========
111
+ /**
112
+ * Create a new {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/data-sources/image_factory_versions talos_image_factory_versions} Data Source
113
+ *
114
+ * @param scope The scope in which to define this construct
115
+ * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
116
+ * @param options DataTalosImageFactoryVersionsConfig = {}
117
+ */
118
+ constructor(scope, id, config = {}) {
119
+ super(scope, id, {
120
+ terraformResourceType: 'talos_image_factory_versions',
121
+ terraformGeneratorMetadata: {
122
+ providerName: 'talos',
123
+ providerVersion: '0.9.0',
124
+ providerVersionConstraint: '0.9.0'
125
+ },
126
+ provider: config.provider,
127
+ dependsOn: config.dependsOn,
128
+ count: config.count,
129
+ lifecycle: config.lifecycle,
130
+ provisioners: config.provisioners,
131
+ connection: config.connection,
132
+ forEach: config.forEach
133
+ });
134
+ this._filters.internalValue = config.filters;
135
+ }
136
+ // ==========
137
+ // ATTRIBUTES
138
+ // ==========
139
+ // filters - computed: false, optional: true, required: false
140
+ _filters = new DataTalosImageFactoryVersionsFiltersOutputReference(this, "filters");
141
+ get filters() {
142
+ return this._filters;
143
+ }
144
+ putFilters(value) {
145
+ this._filters.internalValue = value;
146
+ }
147
+ resetFilters() {
148
+ this._filters.internalValue = undefined;
149
+ }
150
+ // Temporarily expose input value. Use with caution.
151
+ get filtersInput() {
152
+ return this._filters.internalValue;
153
+ }
154
+ // id - computed: true, optional: false, required: false
155
+ get id() {
156
+ return this.getStringAttribute('id');
157
+ }
158
+ // talos_versions - computed: true, optional: false, required: false
159
+ get talosVersions() {
160
+ return this.getListAttribute('talos_versions');
161
+ }
162
+ // =========
163
+ // SYNTHESIS
164
+ // =========
165
+ synthesizeAttributes() {
166
+ return {
167
+ filters: dataTalosImageFactoryVersionsFiltersToTerraform(this._filters.internalValue),
168
+ };
169
+ }
170
+ synthesizeHclAttributes() {
171
+ const attrs = {
172
+ filters: {
173
+ value: dataTalosImageFactoryVersionsFiltersToHclTerraform(this._filters.internalValue),
174
+ isBlock: true,
175
+ type: "struct",
176
+ storageClassType: "DataTalosImageFactoryVersionsFilters",
177
+ },
178
+ };
179
+ // remove undefined attributes
180
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
181
+ }
182
+ }