@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.
- package/LICENSE +355 -0
- package/README.md +19 -0
- package/dist/cluster-kubeconfig/index.d.ts +187 -0
- package/dist/cluster-kubeconfig/index.js +489 -0
- package/dist/data-talos-client-configuration/index.d.ts +121 -0
- package/dist/data-talos-client-configuration/index.js +292 -0
- package/dist/data-talos-cluster-health/index.d.ts +165 -0
- package/dist/data-talos-cluster-health/index.js +414 -0
- package/dist/data-talos-cluster-kubeconfig/index.d.ts +176 -0
- package/dist/data-talos-cluster-kubeconfig/index.js +461 -0
- package/dist/data-talos-image-factory-extensions-versions/index.d.ts +118 -0
- package/dist/data-talos-image-factory-extensions-versions/index.js +289 -0
- package/dist/data-talos-image-factory-overlays-versions/index.d.ts +117 -0
- package/dist/data-talos-image-factory-overlays-versions/index.js +285 -0
- package/dist/data-talos-image-factory-urls/index.d.ts +163 -0
- package/dist/data-talos-image-factory-urls/index.js +272 -0
- package/dist/data-talos-image-factory-versions/index.d.ts +71 -0
- package/dist/data-talos-image-factory-versions/index.js +182 -0
- package/dist/data-talos-machine-configuration/index.d.ts +521 -0
- package/dist/data-talos-machine-configuration/index.js +1424 -0
- package/dist/data-talos-machine-disks/index.d.ts +208 -0
- package/dist/data-talos-machine-disks/index.js +537 -0
- package/dist/image-factory-schematic/index.d.ts +50 -0
- package/dist/image-factory-schematic/index.js +95 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +16 -0
- package/dist/lazy-index.d.ts +0 -0
- package/dist/lazy-index.js +16 -0
- package/dist/machine-bootstrap/index.d.ts +144 -0
- package/dist/machine-bootstrap/index.js +371 -0
- package/dist/machine-configuration-apply/index.d.ts +262 -0
- package/dist/machine-configuration-apply/index.js +659 -0
- package/dist/machine-secrets/index.d.ts +238 -0
- package/dist/machine-secrets/index.js +684 -0
- package/dist/provider/index.d.ts +54 -0
- package/dist/provider/index.js +108 -0
- package/package.json +51 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * as clusterKubeconfig from './cluster-kubeconfig';
|
|
2
|
+
export * as imageFactorySchematic from './image-factory-schematic';
|
|
3
|
+
export * as machineBootstrap from './machine-bootstrap';
|
|
4
|
+
export * as machineConfigurationApply from './machine-configuration-apply';
|
|
5
|
+
export * as machineSecrets from './machine-secrets';
|
|
6
|
+
export * as dataTalosClientConfiguration from './data-talos-client-configuration';
|
|
7
|
+
export * as dataTalosClusterHealth from './data-talos-cluster-health';
|
|
8
|
+
export * as dataTalosClusterKubeconfig from './data-talos-cluster-kubeconfig';
|
|
9
|
+
export * as dataTalosImageFactoryExtensionsVersions from './data-talos-image-factory-extensions-versions';
|
|
10
|
+
export * as dataTalosImageFactoryOverlaysVersions from './data-talos-image-factory-overlays-versions';
|
|
11
|
+
export * as dataTalosImageFactoryUrls from './data-talos-image-factory-urls';
|
|
12
|
+
export * as dataTalosImageFactoryVersions from './data-talos-image-factory-versions';
|
|
13
|
+
export * as dataTalosMachineConfiguration from './data-talos-machine-configuration';
|
|
14
|
+
export * as dataTalosMachineDisks from './data-talos-machine-disks';
|
|
15
|
+
export * as provider from './provider';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// generated by cdktf get
|
|
2
|
+
export * as clusterKubeconfig from './cluster-kubeconfig';
|
|
3
|
+
export * as imageFactorySchematic from './image-factory-schematic';
|
|
4
|
+
export * as machineBootstrap from './machine-bootstrap';
|
|
5
|
+
export * as machineConfigurationApply from './machine-configuration-apply';
|
|
6
|
+
export * as machineSecrets from './machine-secrets';
|
|
7
|
+
export * as dataTalosClientConfiguration from './data-talos-client-configuration';
|
|
8
|
+
export * as dataTalosClusterHealth from './data-talos-cluster-health';
|
|
9
|
+
export * as dataTalosClusterKubeconfig from './data-talos-cluster-kubeconfig';
|
|
10
|
+
export * as dataTalosImageFactoryExtensionsVersions from './data-talos-image-factory-extensions-versions';
|
|
11
|
+
export * as dataTalosImageFactoryOverlaysVersions from './data-talos-image-factory-overlays-versions';
|
|
12
|
+
export * as dataTalosImageFactoryUrls from './data-talos-image-factory-urls';
|
|
13
|
+
export * as dataTalosImageFactoryVersions from './data-talos-image-factory-versions';
|
|
14
|
+
export * as dataTalosMachineConfiguration from './data-talos-machine-configuration';
|
|
15
|
+
export * as dataTalosMachineDisks from './data-talos-machine-disks';
|
|
16
|
+
export * as provider from './provider';
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// generated by cdktf get
|
|
2
|
+
Object.defineProperty(exports, 'clusterKubeconfig', { get: function () { return require('./cluster-kubeconfig'); } });
|
|
3
|
+
Object.defineProperty(exports, 'imageFactorySchematic', { get: function () { return require('./image-factory-schematic'); } });
|
|
4
|
+
Object.defineProperty(exports, 'machineBootstrap', { get: function () { return require('./machine-bootstrap'); } });
|
|
5
|
+
Object.defineProperty(exports, 'machineConfigurationApply', { get: function () { return require('./machine-configuration-apply'); } });
|
|
6
|
+
Object.defineProperty(exports, 'machineSecrets', { get: function () { return require('./machine-secrets'); } });
|
|
7
|
+
Object.defineProperty(exports, 'dataTalosClientConfiguration', { get: function () { return require('./data-talos-client-configuration'); } });
|
|
8
|
+
Object.defineProperty(exports, 'dataTalosClusterHealth', { get: function () { return require('./data-talos-cluster-health'); } });
|
|
9
|
+
Object.defineProperty(exports, 'dataTalosClusterKubeconfig', { get: function () { return require('./data-talos-cluster-kubeconfig'); } });
|
|
10
|
+
Object.defineProperty(exports, 'dataTalosImageFactoryExtensionsVersions', { get: function () { return require('./data-talos-image-factory-extensions-versions'); } });
|
|
11
|
+
Object.defineProperty(exports, 'dataTalosImageFactoryOverlaysVersions', { get: function () { return require('./data-talos-image-factory-overlays-versions'); } });
|
|
12
|
+
Object.defineProperty(exports, 'dataTalosImageFactoryUrls', { get: function () { return require('./data-talos-image-factory-urls'); } });
|
|
13
|
+
Object.defineProperty(exports, 'dataTalosImageFactoryVersions', { get: function () { return require('./data-talos-image-factory-versions'); } });
|
|
14
|
+
Object.defineProperty(exports, 'dataTalosMachineConfiguration', { get: function () { return require('./data-talos-machine-configuration'); } });
|
|
15
|
+
Object.defineProperty(exports, 'dataTalosMachineDisks', { get: function () { return require('./data-talos-machine-disks'); } });
|
|
16
|
+
Object.defineProperty(exports, 'provider', { get: function () { return require('./provider'); } });
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { Construct } from 'constructs';
|
|
2
|
+
import * as cdktf from 'cdktf';
|
|
3
|
+
export interface MachineBootstrapConfig extends cdktf.TerraformMetaArguments {
|
|
4
|
+
/**
|
|
5
|
+
* The client configuration data
|
|
6
|
+
*
|
|
7
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap#client_configuration MachineBootstrap#client_configuration}
|
|
8
|
+
*/
|
|
9
|
+
readonly clientConfiguration: MachineBootstrapClientConfiguration;
|
|
10
|
+
/**
|
|
11
|
+
* The endpoint of the machine to bootstrap
|
|
12
|
+
*
|
|
13
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap#endpoint MachineBootstrap#endpoint}
|
|
14
|
+
*/
|
|
15
|
+
readonly endpoint?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The name of the node to bootstrap
|
|
18
|
+
*
|
|
19
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap#node MachineBootstrap#node}
|
|
20
|
+
*/
|
|
21
|
+
readonly nodeAttribute: string;
|
|
22
|
+
/**
|
|
23
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap#timeouts MachineBootstrap#timeouts}
|
|
24
|
+
*/
|
|
25
|
+
readonly timeouts?: MachineBootstrapTimeouts;
|
|
26
|
+
}
|
|
27
|
+
export interface MachineBootstrapClientConfiguration {
|
|
28
|
+
/**
|
|
29
|
+
* The client CA certificate
|
|
30
|
+
*
|
|
31
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap#ca_certificate MachineBootstrap#ca_certificate}
|
|
32
|
+
*/
|
|
33
|
+
readonly caCertificate: string;
|
|
34
|
+
/**
|
|
35
|
+
* The client certificate
|
|
36
|
+
*
|
|
37
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap#client_certificate MachineBootstrap#client_certificate}
|
|
38
|
+
*/
|
|
39
|
+
readonly clientCertificate: string;
|
|
40
|
+
/**
|
|
41
|
+
* The client key
|
|
42
|
+
*
|
|
43
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap#client_key MachineBootstrap#client_key}
|
|
44
|
+
*/
|
|
45
|
+
readonly clientKey: string;
|
|
46
|
+
}
|
|
47
|
+
export declare function machineBootstrapClientConfigurationToTerraform(struct?: MachineBootstrapClientConfiguration | cdktf.IResolvable): any;
|
|
48
|
+
export declare function machineBootstrapClientConfigurationToHclTerraform(struct?: MachineBootstrapClientConfiguration | cdktf.IResolvable): any;
|
|
49
|
+
export declare class MachineBootstrapClientConfigurationOutputReference extends cdktf.ComplexObject {
|
|
50
|
+
private isEmptyObject;
|
|
51
|
+
private resolvableValue?;
|
|
52
|
+
/**
|
|
53
|
+
* @param terraformResource The parent resource
|
|
54
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
55
|
+
*/
|
|
56
|
+
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string);
|
|
57
|
+
get internalValue(): MachineBootstrapClientConfiguration | cdktf.IResolvable | undefined;
|
|
58
|
+
set internalValue(value: MachineBootstrapClientConfiguration | cdktf.IResolvable | undefined);
|
|
59
|
+
private _caCertificate?;
|
|
60
|
+
get caCertificate(): string;
|
|
61
|
+
set caCertificate(value: string);
|
|
62
|
+
get caCertificateInput(): string;
|
|
63
|
+
private _clientCertificate?;
|
|
64
|
+
get clientCertificate(): string;
|
|
65
|
+
set clientCertificate(value: string);
|
|
66
|
+
get clientCertificateInput(): string;
|
|
67
|
+
private _clientKey?;
|
|
68
|
+
get clientKey(): string;
|
|
69
|
+
set clientKey(value: string);
|
|
70
|
+
get clientKeyInput(): string;
|
|
71
|
+
}
|
|
72
|
+
export interface MachineBootstrapTimeouts {
|
|
73
|
+
/**
|
|
74
|
+
* A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
|
|
75
|
+
*
|
|
76
|
+
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap#create MachineBootstrap#create}
|
|
77
|
+
*/
|
|
78
|
+
readonly create?: string;
|
|
79
|
+
}
|
|
80
|
+
export declare function machineBootstrapTimeoutsToTerraform(struct?: MachineBootstrapTimeouts | cdktf.IResolvable): any;
|
|
81
|
+
export declare function machineBootstrapTimeoutsToHclTerraform(struct?: MachineBootstrapTimeouts | cdktf.IResolvable): any;
|
|
82
|
+
export declare class MachineBootstrapTimeoutsOutputReference extends cdktf.ComplexObject {
|
|
83
|
+
private isEmptyObject;
|
|
84
|
+
private resolvableValue?;
|
|
85
|
+
/**
|
|
86
|
+
* @param terraformResource The parent resource
|
|
87
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
88
|
+
*/
|
|
89
|
+
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string);
|
|
90
|
+
get internalValue(): MachineBootstrapTimeouts | cdktf.IResolvable | undefined;
|
|
91
|
+
set internalValue(value: MachineBootstrapTimeouts | cdktf.IResolvable | undefined);
|
|
92
|
+
private _create?;
|
|
93
|
+
get create(): string;
|
|
94
|
+
set create(value: string);
|
|
95
|
+
resetCreate(): void;
|
|
96
|
+
get createInput(): string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Represents a {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap talos_machine_bootstrap}
|
|
100
|
+
*/
|
|
101
|
+
export declare class MachineBootstrap extends cdktf.TerraformResource {
|
|
102
|
+
static readonly tfResourceType = "talos_machine_bootstrap";
|
|
103
|
+
/**
|
|
104
|
+
* Generates CDKTF code for importing a MachineBootstrap resource upon running "cdktf plan <stack-name>"
|
|
105
|
+
* @param scope The scope in which to define this construct
|
|
106
|
+
* @param importToId The construct id used in the generated config for the MachineBootstrap to import
|
|
107
|
+
* @param importFromId The id of the existing MachineBootstrap that should be imported. Refer to the {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap#import import section} in the documentation of this resource for the id to use
|
|
108
|
+
* @param provider? Optional instance of the provider where the MachineBootstrap to import is found
|
|
109
|
+
*/
|
|
110
|
+
static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktf.TerraformProvider): any;
|
|
111
|
+
/**
|
|
112
|
+
* Create a new {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap talos_machine_bootstrap} Resource
|
|
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 MachineBootstrapConfig
|
|
117
|
+
*/
|
|
118
|
+
constructor(scope: Construct, id: string, config: MachineBootstrapConfig);
|
|
119
|
+
private _clientConfiguration;
|
|
120
|
+
get clientConfiguration(): MachineBootstrapClientConfigurationOutputReference;
|
|
121
|
+
putClientConfiguration(value: MachineBootstrapClientConfiguration): void;
|
|
122
|
+
get clientConfigurationInput(): any;
|
|
123
|
+
private _endpoint?;
|
|
124
|
+
get endpoint(): string;
|
|
125
|
+
set endpoint(value: string);
|
|
126
|
+
resetEndpoint(): void;
|
|
127
|
+
get endpointInput(): string;
|
|
128
|
+
get id(): any;
|
|
129
|
+
private _node?;
|
|
130
|
+
get nodeAttribute(): string;
|
|
131
|
+
set nodeAttribute(value: string);
|
|
132
|
+
get nodeAttributeInput(): string;
|
|
133
|
+
private _timeouts;
|
|
134
|
+
get timeouts(): MachineBootstrapTimeoutsOutputReference;
|
|
135
|
+
putTimeouts(value: MachineBootstrapTimeouts): void;
|
|
136
|
+
resetTimeouts(): void;
|
|
137
|
+
get timeoutsInput(): any;
|
|
138
|
+
protected synthesizeAttributes(): {
|
|
139
|
+
[name: string]: any;
|
|
140
|
+
};
|
|
141
|
+
protected synthesizeHclAttributes(): {
|
|
142
|
+
[name: string]: any;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
// https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap
|
|
2
|
+
// generated from terraform resource schema
|
|
3
|
+
import * as cdktf from 'cdktf';
|
|
4
|
+
export function machineBootstrapClientConfigurationToTerraform(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
|
+
ca_certificate: cdktf.stringToTerraform(struct.caCertificate),
|
|
13
|
+
client_certificate: cdktf.stringToTerraform(struct.clientCertificate),
|
|
14
|
+
client_key: cdktf.stringToTerraform(struct.clientKey),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export function machineBootstrapClientConfigurationToHclTerraform(struct) {
|
|
18
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
19
|
+
return struct;
|
|
20
|
+
}
|
|
21
|
+
if (cdktf.isComplexElement(struct)) {
|
|
22
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
23
|
+
}
|
|
24
|
+
const attrs = {
|
|
25
|
+
ca_certificate: {
|
|
26
|
+
value: cdktf.stringToHclTerraform(struct.caCertificate),
|
|
27
|
+
isBlock: false,
|
|
28
|
+
type: "simple",
|
|
29
|
+
storageClassType: "string",
|
|
30
|
+
},
|
|
31
|
+
client_certificate: {
|
|
32
|
+
value: cdktf.stringToHclTerraform(struct.clientCertificate),
|
|
33
|
+
isBlock: false,
|
|
34
|
+
type: "simple",
|
|
35
|
+
storageClassType: "string",
|
|
36
|
+
},
|
|
37
|
+
client_key: {
|
|
38
|
+
value: cdktf.stringToHclTerraform(struct.clientKey),
|
|
39
|
+
isBlock: false,
|
|
40
|
+
type: "simple",
|
|
41
|
+
storageClassType: "string",
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
// remove undefined attributes
|
|
45
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
|
|
46
|
+
}
|
|
47
|
+
export class MachineBootstrapClientConfigurationOutputReference extends cdktf.ComplexObject {
|
|
48
|
+
isEmptyObject = false;
|
|
49
|
+
resolvableValue;
|
|
50
|
+
/**
|
|
51
|
+
* @param terraformResource The parent resource
|
|
52
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
53
|
+
*/
|
|
54
|
+
constructor(terraformResource, terraformAttribute) {
|
|
55
|
+
super(terraformResource, terraformAttribute, false);
|
|
56
|
+
}
|
|
57
|
+
get internalValue() {
|
|
58
|
+
if (this.resolvableValue) {
|
|
59
|
+
return this.resolvableValue;
|
|
60
|
+
}
|
|
61
|
+
let hasAnyValues = this.isEmptyObject;
|
|
62
|
+
const internalValueResult = {};
|
|
63
|
+
if (this._caCertificate !== undefined) {
|
|
64
|
+
hasAnyValues = true;
|
|
65
|
+
internalValueResult.caCertificate = this._caCertificate;
|
|
66
|
+
}
|
|
67
|
+
if (this._clientCertificate !== undefined) {
|
|
68
|
+
hasAnyValues = true;
|
|
69
|
+
internalValueResult.clientCertificate = this._clientCertificate;
|
|
70
|
+
}
|
|
71
|
+
if (this._clientKey !== undefined) {
|
|
72
|
+
hasAnyValues = true;
|
|
73
|
+
internalValueResult.clientKey = this._clientKey;
|
|
74
|
+
}
|
|
75
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
76
|
+
}
|
|
77
|
+
set internalValue(value) {
|
|
78
|
+
if (value === undefined) {
|
|
79
|
+
this.isEmptyObject = false;
|
|
80
|
+
this.resolvableValue = undefined;
|
|
81
|
+
this._caCertificate = undefined;
|
|
82
|
+
this._clientCertificate = undefined;
|
|
83
|
+
this._clientKey = undefined;
|
|
84
|
+
}
|
|
85
|
+
else if (cdktf.Tokenization.isResolvable(value)) {
|
|
86
|
+
this.isEmptyObject = false;
|
|
87
|
+
this.resolvableValue = value;
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
91
|
+
this.resolvableValue = undefined;
|
|
92
|
+
this._caCertificate = value.caCertificate;
|
|
93
|
+
this._clientCertificate = value.clientCertificate;
|
|
94
|
+
this._clientKey = value.clientKey;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// ca_certificate - computed: false, optional: false, required: true
|
|
98
|
+
_caCertificate;
|
|
99
|
+
get caCertificate() {
|
|
100
|
+
return this.getStringAttribute('ca_certificate');
|
|
101
|
+
}
|
|
102
|
+
set caCertificate(value) {
|
|
103
|
+
this._caCertificate = value;
|
|
104
|
+
}
|
|
105
|
+
// Temporarily expose input value. Use with caution.
|
|
106
|
+
get caCertificateInput() {
|
|
107
|
+
return this._caCertificate;
|
|
108
|
+
}
|
|
109
|
+
// client_certificate - computed: false, optional: false, required: true
|
|
110
|
+
_clientCertificate;
|
|
111
|
+
get clientCertificate() {
|
|
112
|
+
return this.getStringAttribute('client_certificate');
|
|
113
|
+
}
|
|
114
|
+
set clientCertificate(value) {
|
|
115
|
+
this._clientCertificate = value;
|
|
116
|
+
}
|
|
117
|
+
// Temporarily expose input value. Use with caution.
|
|
118
|
+
get clientCertificateInput() {
|
|
119
|
+
return this._clientCertificate;
|
|
120
|
+
}
|
|
121
|
+
// client_key - computed: false, optional: false, required: true
|
|
122
|
+
_clientKey;
|
|
123
|
+
get clientKey() {
|
|
124
|
+
return this.getStringAttribute('client_key');
|
|
125
|
+
}
|
|
126
|
+
set clientKey(value) {
|
|
127
|
+
this._clientKey = value;
|
|
128
|
+
}
|
|
129
|
+
// Temporarily expose input value. Use with caution.
|
|
130
|
+
get clientKeyInput() {
|
|
131
|
+
return this._clientKey;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
export function machineBootstrapTimeoutsToTerraform(struct) {
|
|
135
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
136
|
+
return struct;
|
|
137
|
+
}
|
|
138
|
+
if (cdktf.isComplexElement(struct)) {
|
|
139
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
create: cdktf.stringToTerraform(struct.create),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
export function machineBootstrapTimeoutsToHclTerraform(struct) {
|
|
146
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
147
|
+
return struct;
|
|
148
|
+
}
|
|
149
|
+
if (cdktf.isComplexElement(struct)) {
|
|
150
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
151
|
+
}
|
|
152
|
+
const attrs = {
|
|
153
|
+
create: {
|
|
154
|
+
value: cdktf.stringToHclTerraform(struct.create),
|
|
155
|
+
isBlock: false,
|
|
156
|
+
type: "simple",
|
|
157
|
+
storageClassType: "string",
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
// remove undefined attributes
|
|
161
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
|
|
162
|
+
}
|
|
163
|
+
export class MachineBootstrapTimeoutsOutputReference extends cdktf.ComplexObject {
|
|
164
|
+
isEmptyObject = false;
|
|
165
|
+
resolvableValue;
|
|
166
|
+
/**
|
|
167
|
+
* @param terraformResource The parent resource
|
|
168
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
169
|
+
*/
|
|
170
|
+
constructor(terraformResource, terraformAttribute) {
|
|
171
|
+
super(terraformResource, terraformAttribute, false);
|
|
172
|
+
}
|
|
173
|
+
get internalValue() {
|
|
174
|
+
if (this.resolvableValue) {
|
|
175
|
+
return this.resolvableValue;
|
|
176
|
+
}
|
|
177
|
+
let hasAnyValues = this.isEmptyObject;
|
|
178
|
+
const internalValueResult = {};
|
|
179
|
+
if (this._create !== undefined) {
|
|
180
|
+
hasAnyValues = true;
|
|
181
|
+
internalValueResult.create = this._create;
|
|
182
|
+
}
|
|
183
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
184
|
+
}
|
|
185
|
+
set internalValue(value) {
|
|
186
|
+
if (value === undefined) {
|
|
187
|
+
this.isEmptyObject = false;
|
|
188
|
+
this.resolvableValue = undefined;
|
|
189
|
+
this._create = undefined;
|
|
190
|
+
}
|
|
191
|
+
else if (cdktf.Tokenization.isResolvable(value)) {
|
|
192
|
+
this.isEmptyObject = false;
|
|
193
|
+
this.resolvableValue = value;
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
197
|
+
this.resolvableValue = undefined;
|
|
198
|
+
this._create = value.create;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
// create - computed: false, optional: true, required: false
|
|
202
|
+
_create;
|
|
203
|
+
get create() {
|
|
204
|
+
return this.getStringAttribute('create');
|
|
205
|
+
}
|
|
206
|
+
set create(value) {
|
|
207
|
+
this._create = value;
|
|
208
|
+
}
|
|
209
|
+
resetCreate() {
|
|
210
|
+
this._create = undefined;
|
|
211
|
+
}
|
|
212
|
+
// Temporarily expose input value. Use with caution.
|
|
213
|
+
get createInput() {
|
|
214
|
+
return this._create;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Represents a {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap talos_machine_bootstrap}
|
|
219
|
+
*/
|
|
220
|
+
export class MachineBootstrap extends cdktf.TerraformResource {
|
|
221
|
+
// =================
|
|
222
|
+
// STATIC PROPERTIES
|
|
223
|
+
// =================
|
|
224
|
+
static tfResourceType = "talos_machine_bootstrap";
|
|
225
|
+
// ==============
|
|
226
|
+
// STATIC Methods
|
|
227
|
+
// ==============
|
|
228
|
+
/**
|
|
229
|
+
* Generates CDKTF code for importing a MachineBootstrap resource upon running "cdktf plan <stack-name>"
|
|
230
|
+
* @param scope The scope in which to define this construct
|
|
231
|
+
* @param importToId The construct id used in the generated config for the MachineBootstrap to import
|
|
232
|
+
* @param importFromId The id of the existing MachineBootstrap that should be imported. Refer to the {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap#import import section} in the documentation of this resource for the id to use
|
|
233
|
+
* @param provider? Optional instance of the provider where the MachineBootstrap to import is found
|
|
234
|
+
*/
|
|
235
|
+
static generateConfigForImport(scope, importToId, importFromId, provider) {
|
|
236
|
+
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "talos_machine_bootstrap", importId: importFromId, provider });
|
|
237
|
+
}
|
|
238
|
+
// ===========
|
|
239
|
+
// INITIALIZER
|
|
240
|
+
// ===========
|
|
241
|
+
/**
|
|
242
|
+
* Create a new {@link https://registry.terraform.io/providers/siderolabs/talos/0.9.0/docs/resources/machine_bootstrap talos_machine_bootstrap} Resource
|
|
243
|
+
*
|
|
244
|
+
* @param scope The scope in which to define this construct
|
|
245
|
+
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
|
|
246
|
+
* @param options MachineBootstrapConfig
|
|
247
|
+
*/
|
|
248
|
+
constructor(scope, id, config) {
|
|
249
|
+
super(scope, id, {
|
|
250
|
+
terraformResourceType: 'talos_machine_bootstrap',
|
|
251
|
+
terraformGeneratorMetadata: {
|
|
252
|
+
providerName: 'talos',
|
|
253
|
+
providerVersion: '0.9.0',
|
|
254
|
+
providerVersionConstraint: '0.9.0'
|
|
255
|
+
},
|
|
256
|
+
provider: config.provider,
|
|
257
|
+
dependsOn: config.dependsOn,
|
|
258
|
+
count: config.count,
|
|
259
|
+
lifecycle: config.lifecycle,
|
|
260
|
+
provisioners: config.provisioners,
|
|
261
|
+
connection: config.connection,
|
|
262
|
+
forEach: config.forEach
|
|
263
|
+
});
|
|
264
|
+
this._clientConfiguration.internalValue = config.clientConfiguration;
|
|
265
|
+
this._endpoint = config.endpoint;
|
|
266
|
+
this._node = config.nodeAttribute;
|
|
267
|
+
this._timeouts.internalValue = config.timeouts;
|
|
268
|
+
}
|
|
269
|
+
// ==========
|
|
270
|
+
// ATTRIBUTES
|
|
271
|
+
// ==========
|
|
272
|
+
// client_configuration - computed: false, optional: false, required: true
|
|
273
|
+
_clientConfiguration = new MachineBootstrapClientConfigurationOutputReference(this, "client_configuration");
|
|
274
|
+
get clientConfiguration() {
|
|
275
|
+
return this._clientConfiguration;
|
|
276
|
+
}
|
|
277
|
+
putClientConfiguration(value) {
|
|
278
|
+
this._clientConfiguration.internalValue = value;
|
|
279
|
+
}
|
|
280
|
+
// Temporarily expose input value. Use with caution.
|
|
281
|
+
get clientConfigurationInput() {
|
|
282
|
+
return this._clientConfiguration.internalValue;
|
|
283
|
+
}
|
|
284
|
+
// endpoint - computed: true, optional: true, required: false
|
|
285
|
+
_endpoint;
|
|
286
|
+
get endpoint() {
|
|
287
|
+
return this.getStringAttribute('endpoint');
|
|
288
|
+
}
|
|
289
|
+
set endpoint(value) {
|
|
290
|
+
this._endpoint = value;
|
|
291
|
+
}
|
|
292
|
+
resetEndpoint() {
|
|
293
|
+
this._endpoint = undefined;
|
|
294
|
+
}
|
|
295
|
+
// Temporarily expose input value. Use with caution.
|
|
296
|
+
get endpointInput() {
|
|
297
|
+
return this._endpoint;
|
|
298
|
+
}
|
|
299
|
+
// id - computed: true, optional: false, required: false
|
|
300
|
+
get id() {
|
|
301
|
+
return this.getStringAttribute('id');
|
|
302
|
+
}
|
|
303
|
+
// node - computed: false, optional: false, required: true
|
|
304
|
+
_node;
|
|
305
|
+
get nodeAttribute() {
|
|
306
|
+
return this.getStringAttribute('node');
|
|
307
|
+
}
|
|
308
|
+
set nodeAttribute(value) {
|
|
309
|
+
this._node = value;
|
|
310
|
+
}
|
|
311
|
+
// Temporarily expose input value. Use with caution.
|
|
312
|
+
get nodeAttributeInput() {
|
|
313
|
+
return this._node;
|
|
314
|
+
}
|
|
315
|
+
// timeouts - computed: false, optional: true, required: false
|
|
316
|
+
_timeouts = new MachineBootstrapTimeoutsOutputReference(this, "timeouts");
|
|
317
|
+
get timeouts() {
|
|
318
|
+
return this._timeouts;
|
|
319
|
+
}
|
|
320
|
+
putTimeouts(value) {
|
|
321
|
+
this._timeouts.internalValue = value;
|
|
322
|
+
}
|
|
323
|
+
resetTimeouts() {
|
|
324
|
+
this._timeouts.internalValue = undefined;
|
|
325
|
+
}
|
|
326
|
+
// Temporarily expose input value. Use with caution.
|
|
327
|
+
get timeoutsInput() {
|
|
328
|
+
return this._timeouts.internalValue;
|
|
329
|
+
}
|
|
330
|
+
// =========
|
|
331
|
+
// SYNTHESIS
|
|
332
|
+
// =========
|
|
333
|
+
synthesizeAttributes() {
|
|
334
|
+
return {
|
|
335
|
+
client_configuration: machineBootstrapClientConfigurationToTerraform(this._clientConfiguration.internalValue),
|
|
336
|
+
endpoint: cdktf.stringToTerraform(this._endpoint),
|
|
337
|
+
node: cdktf.stringToTerraform(this._node),
|
|
338
|
+
timeouts: machineBootstrapTimeoutsToTerraform(this._timeouts.internalValue),
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
synthesizeHclAttributes() {
|
|
342
|
+
const attrs = {
|
|
343
|
+
client_configuration: {
|
|
344
|
+
value: machineBootstrapClientConfigurationToHclTerraform(this._clientConfiguration.internalValue),
|
|
345
|
+
isBlock: true,
|
|
346
|
+
type: "struct",
|
|
347
|
+
storageClassType: "MachineBootstrapClientConfiguration",
|
|
348
|
+
},
|
|
349
|
+
endpoint: {
|
|
350
|
+
value: cdktf.stringToHclTerraform(this._endpoint),
|
|
351
|
+
isBlock: false,
|
|
352
|
+
type: "simple",
|
|
353
|
+
storageClassType: "string",
|
|
354
|
+
},
|
|
355
|
+
node: {
|
|
356
|
+
value: cdktf.stringToHclTerraform(this._node),
|
|
357
|
+
isBlock: false,
|
|
358
|
+
type: "simple",
|
|
359
|
+
storageClassType: "string",
|
|
360
|
+
},
|
|
361
|
+
timeouts: {
|
|
362
|
+
value: machineBootstrapTimeoutsToHclTerraform(this._timeouts.internalValue),
|
|
363
|
+
isBlock: true,
|
|
364
|
+
type: "struct",
|
|
365
|
+
storageClassType: "MachineBootstrapTimeouts",
|
|
366
|
+
},
|
|
367
|
+
};
|
|
368
|
+
// remove undefined attributes
|
|
369
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
|
|
370
|
+
}
|
|
371
|
+
}
|