@pulumiverse/talos 0.1.1

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 (52) hide show
  1. package/LICENSE +373 -0
  2. package/README.md +19 -0
  3. package/client/configuration.d.ts +112 -0
  4. package/client/configuration.js +58 -0
  5. package/client/configuration.js.map +1 -0
  6. package/client/index.d.ts +3 -0
  7. package/client/index.js +10 -0
  8. package/client/index.js.map +1 -0
  9. package/cluster/index.d.ts +3 -0
  10. package/cluster/index.js +10 -0
  11. package/cluster/index.js.map +1 -0
  12. package/cluster/kubeconfig.d.ts +89 -0
  13. package/cluster/kubeconfig.js +29 -0
  14. package/cluster/kubeconfig.js.map +1 -0
  15. package/index.d.ts +8 -0
  16. package/index.js +28 -0
  17. package/index.js.map +1 -0
  18. package/machine/bootstrap.d.ts +88 -0
  19. package/machine/bootstrap.js +72 -0
  20. package/machine/bootstrap.js.map +1 -0
  21. package/machine/configuration.d.ts +178 -0
  22. package/machine/configuration.js +69 -0
  23. package/machine/configuration.js.map +1 -0
  24. package/machine/configurationApply.d.ts +124 -0
  25. package/machine/configurationApply.js +77 -0
  26. package/machine/configurationApply.js.map +1 -0
  27. package/machine/disks.d.ts +127 -0
  28. package/machine/disks.js +71 -0
  29. package/machine/disks.js.map +1 -0
  30. package/machine/index.d.ts +15 -0
  31. package/machine/index.js +38 -0
  32. package/machine/index.js.map +1 -0
  33. package/machine/secrets.d.ts +86 -0
  34. package/machine/secrets.js +73 -0
  35. package/machine/secrets.js.map +1 -0
  36. package/package.json +29 -0
  37. package/package.json.bak +29 -0
  38. package/provider.d.ts +27 -0
  39. package/provider.js +44 -0
  40. package/provider.js.map +1 -0
  41. package/types/index.d.ts +3 -0
  42. package/types/index.js +11 -0
  43. package/types/index.js.map +1 -0
  44. package/types/input.d.ts +589 -0
  45. package/types/input.js +5 -0
  46. package/types/input.js.map +1 -0
  47. package/types/output.d.ts +439 -0
  48. package/types/output.js +5 -0
  49. package/types/output.js.map +1 -0
  50. package/utilities.d.ts +4 -0
  51. package/utilities.js +69 -0
  52. package/utilities.js.map +1 -0
@@ -0,0 +1,124 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "../types/input";
3
+ import * as outputs from "../types/output";
4
+ /**
5
+ * The machine configuration apply resource allows to apply machine configuration to a node
6
+ */
7
+ export declare class ConfigurationApply extends pulumi.CustomResource {
8
+ /**
9
+ * Get an existing ConfigurationApply resource's state with the given name, ID, and optional extra
10
+ * properties used to qualify the lookup.
11
+ *
12
+ * @param name The _unique_ name of the resulting resource.
13
+ * @param id The _unique_ provider ID of the resource to lookup.
14
+ * @param state Any extra arguments used during the lookup.
15
+ * @param opts Optional settings to control the behavior of the CustomResource.
16
+ */
17
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ConfigurationApplyState, opts?: pulumi.CustomResourceOptions): ConfigurationApply;
18
+ /**
19
+ * Returns true if the given object is an instance of ConfigurationApply. This is designed to work even
20
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
21
+ */
22
+ static isInstance(obj: any): obj is ConfigurationApply;
23
+ /**
24
+ * The mode of the apply operation
25
+ */
26
+ readonly applyMode: pulumi.Output<string>;
27
+ /**
28
+ * The client configuration data
29
+ */
30
+ readonly clientConfiguration: pulumi.Output<outputs.machine.ConfigurationApplyClientConfiguration>;
31
+ /**
32
+ * The list of config patches to apply
33
+ */
34
+ readonly configPatches: pulumi.Output<string[] | undefined>;
35
+ /**
36
+ * The endpoint of the machine to bootstrap
37
+ */
38
+ readonly endpoint: pulumi.Output<string>;
39
+ /**
40
+ * The generated machine configuration after applying patches
41
+ */
42
+ readonly machineConfiguration: pulumi.Output<string>;
43
+ /**
44
+ * The machine configuration to apply
45
+ */
46
+ readonly machineConfigurationInput: pulumi.Output<string>;
47
+ /**
48
+ * The name of the node to bootstrap
49
+ */
50
+ readonly node: pulumi.Output<string>;
51
+ readonly timeouts: pulumi.Output<outputs.machine.Timeout | undefined>;
52
+ /**
53
+ * Create a ConfigurationApply resource with the given unique name, arguments, and options.
54
+ *
55
+ * @param name The _unique_ name of the resource.
56
+ * @param args The arguments to use to populate this resource's properties.
57
+ * @param opts A bag of options that control this resource's behavior.
58
+ */
59
+ constructor(name: string, args: ConfigurationApplyArgs, opts?: pulumi.CustomResourceOptions);
60
+ }
61
+ /**
62
+ * Input properties used for looking up and filtering ConfigurationApply resources.
63
+ */
64
+ export interface ConfigurationApplyState {
65
+ /**
66
+ * The mode of the apply operation
67
+ */
68
+ applyMode?: pulumi.Input<string>;
69
+ /**
70
+ * The client configuration data
71
+ */
72
+ clientConfiguration?: pulumi.Input<inputs.machine.ConfigurationApplyClientConfiguration>;
73
+ /**
74
+ * The list of config patches to apply
75
+ */
76
+ configPatches?: pulumi.Input<pulumi.Input<string>[]>;
77
+ /**
78
+ * The endpoint of the machine to bootstrap
79
+ */
80
+ endpoint?: pulumi.Input<string>;
81
+ /**
82
+ * The generated machine configuration after applying patches
83
+ */
84
+ machineConfiguration?: pulumi.Input<string>;
85
+ /**
86
+ * The machine configuration to apply
87
+ */
88
+ machineConfigurationInput?: pulumi.Input<string>;
89
+ /**
90
+ * The name of the node to bootstrap
91
+ */
92
+ node?: pulumi.Input<string>;
93
+ timeouts?: pulumi.Input<inputs.machine.Timeout>;
94
+ }
95
+ /**
96
+ * The set of arguments for constructing a ConfigurationApply resource.
97
+ */
98
+ export interface ConfigurationApplyArgs {
99
+ /**
100
+ * The mode of the apply operation
101
+ */
102
+ applyMode?: pulumi.Input<string>;
103
+ /**
104
+ * The client configuration data
105
+ */
106
+ clientConfiguration: pulumi.Input<inputs.machine.ConfigurationApplyClientConfiguration>;
107
+ /**
108
+ * The list of config patches to apply
109
+ */
110
+ configPatches?: pulumi.Input<pulumi.Input<string>[]>;
111
+ /**
112
+ * The endpoint of the machine to bootstrap
113
+ */
114
+ endpoint?: pulumi.Input<string>;
115
+ /**
116
+ * The machine configuration to apply
117
+ */
118
+ machineConfigurationInput: pulumi.Input<string>;
119
+ /**
120
+ * The name of the node to bootstrap
121
+ */
122
+ node: pulumi.Input<string>;
123
+ timeouts?: pulumi.Input<inputs.machine.Timeout>;
124
+ }
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ConfigurationApply = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ /**
9
+ * The machine configuration apply resource allows to apply machine configuration to a node
10
+ */
11
+ class ConfigurationApply extends pulumi.CustomResource {
12
+ /**
13
+ * Get an existing ConfigurationApply resource's state with the given name, ID, and optional extra
14
+ * properties used to qualify the lookup.
15
+ *
16
+ * @param name The _unique_ name of the resulting resource.
17
+ * @param id The _unique_ provider ID of the resource to lookup.
18
+ * @param state Any extra arguments used during the lookup.
19
+ * @param opts Optional settings to control the behavior of the CustomResource.
20
+ */
21
+ static get(name, id, state, opts) {
22
+ return new ConfigurationApply(name, state, Object.assign(Object.assign({}, opts), { id: id }));
23
+ }
24
+ /**
25
+ * Returns true if the given object is an instance of ConfigurationApply. This is designed to work even
26
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
27
+ */
28
+ static isInstance(obj) {
29
+ if (obj === undefined || obj === null) {
30
+ return false;
31
+ }
32
+ return obj['__pulumiType'] === ConfigurationApply.__pulumiType;
33
+ }
34
+ constructor(name, argsOrState, opts) {
35
+ let resourceInputs = {};
36
+ opts = opts || {};
37
+ if (opts.id) {
38
+ const state = argsOrState;
39
+ resourceInputs["applyMode"] = state ? state.applyMode : undefined;
40
+ resourceInputs["clientConfiguration"] = state ? state.clientConfiguration : undefined;
41
+ resourceInputs["configPatches"] = state ? state.configPatches : undefined;
42
+ resourceInputs["endpoint"] = state ? state.endpoint : undefined;
43
+ resourceInputs["machineConfiguration"] = state ? state.machineConfiguration : undefined;
44
+ resourceInputs["machineConfigurationInput"] = state ? state.machineConfigurationInput : undefined;
45
+ resourceInputs["node"] = state ? state.node : undefined;
46
+ resourceInputs["timeouts"] = state ? state.timeouts : undefined;
47
+ }
48
+ else {
49
+ const args = argsOrState;
50
+ if ((!args || args.clientConfiguration === undefined) && !opts.urn) {
51
+ throw new Error("Missing required property 'clientConfiguration'");
52
+ }
53
+ if ((!args || args.machineConfigurationInput === undefined) && !opts.urn) {
54
+ throw new Error("Missing required property 'machineConfigurationInput'");
55
+ }
56
+ if ((!args || args.node === undefined) && !opts.urn) {
57
+ throw new Error("Missing required property 'node'");
58
+ }
59
+ resourceInputs["applyMode"] = args ? args.applyMode : undefined;
60
+ resourceInputs["clientConfiguration"] = args ? args.clientConfiguration : undefined;
61
+ resourceInputs["configPatches"] = args ? args.configPatches : undefined;
62
+ resourceInputs["endpoint"] = args ? args.endpoint : undefined;
63
+ resourceInputs["machineConfigurationInput"] = (args === null || args === void 0 ? void 0 : args.machineConfigurationInput) ? pulumi.secret(args.machineConfigurationInput) : undefined;
64
+ resourceInputs["node"] = args ? args.node : undefined;
65
+ resourceInputs["timeouts"] = args ? args.timeouts : undefined;
66
+ resourceInputs["machineConfiguration"] = undefined /*out*/;
67
+ }
68
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
69
+ const secretOpts = { additionalSecretOutputs: ["machineConfiguration", "machineConfigurationInput"] };
70
+ opts = pulumi.mergeOptions(opts, secretOpts);
71
+ super(ConfigurationApply.__pulumiType, name, resourceInputs, opts);
72
+ }
73
+ }
74
+ exports.ConfigurationApply = ConfigurationApply;
75
+ /** @internal */
76
+ ConfigurationApply.__pulumiType = 'talos:machine/configurationApply:ConfigurationApply';
77
+ //# sourceMappingURL=configurationApply.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configurationApply.js","sourceRoot":"","sources":["../../machine/configurationApply.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,0CAA0C;A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C,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,cAAc,CAAC,2BAA2B,CAAC,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,yBAAyB,EAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1I,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,cAAc,CAAC,sBAAsB,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAC9D;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,sBAAsB,EAAE,2BAA2B,CAAC,EAAE,CAAC;QACtG,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,kBAAkB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACvE,CAAC;;AAvGL,gDAwGC;AA1FG,gBAAgB;AACO,+BAAY,GAAG,qDAAqD,CAAC"}
@@ -0,0 +1,127 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "../types/input";
3
+ import * as outputs from "../types/output";
4
+ /**
5
+ * Generate a machine configuration for a node type
6
+ *
7
+ * > **Note:** Since Talos natively supports `.machine.install.diskSelector`, the `talos.machine.Disks` data source maybe just used to query disk information that could be used elsewhere. It's recommended to use `machine.install.diskSelector` in Talos machine configuration.
8
+ *
9
+ * ## Example Usage
10
+ *
11
+ * ```typescript
12
+ * import * as pulumi from "@pulumi/pulumi";
13
+ * import * as talos from "@pulumi/talos";
14
+ * import * as talos from "@pulumiverse/talos";
15
+ *
16
+ * const thisSecrets = new talos.machine.Secrets("thisSecrets", {});
17
+ * const thisDisks = talos.machine.DisksOutput({
18
+ * clientConfiguration: thisSecrets.clientConfiguration,
19
+ * node: "10.5.0.2",
20
+ * filters: {
21
+ * size: "> 100GB",
22
+ * type: "nvme",
23
+ * },
24
+ * });
25
+ * export const nvmeDisks = thisDisks.apply(thisDisks => thisDisks.disks.map(__item => __item.name));
26
+ * ```
27
+ */
28
+ export declare function disks(args: DisksArgs, opts?: pulumi.InvokeOptions): Promise<DisksResult>;
29
+ /**
30
+ * A collection of arguments for invoking Disks.
31
+ */
32
+ export interface DisksArgs {
33
+ /**
34
+ * The client configuration data
35
+ */
36
+ clientConfiguration: inputs.machine.DisksClientConfiguration;
37
+ /**
38
+ * endpoint to use for the talosclient. if not set, the node value will be used
39
+ */
40
+ endpoint?: string;
41
+ /**
42
+ * Filters to apply to the disks
43
+ */
44
+ filters?: inputs.machine.DisksFilters;
45
+ /**
46
+ * controlplane node to retrieve the kubeconfig from
47
+ */
48
+ node: string;
49
+ timeouts?: inputs.machine.DisksTimeouts;
50
+ }
51
+ /**
52
+ * A collection of values returned by Disks.
53
+ */
54
+ export interface DisksResult {
55
+ /**
56
+ * The client configuration data
57
+ */
58
+ readonly clientConfiguration: outputs.machine.DisksClientConfiguration;
59
+ /**
60
+ * The disks that match the filters
61
+ */
62
+ readonly disks: outputs.machine.DisksDisk[];
63
+ /**
64
+ * endpoint to use for the talosclient. if not set, the node value will be used
65
+ */
66
+ readonly endpoint: string;
67
+ /**
68
+ * Filters to apply to the disks
69
+ */
70
+ readonly filters?: outputs.machine.DisksFilters;
71
+ /**
72
+ * The generated ID of this resource
73
+ */
74
+ readonly id: string;
75
+ /**
76
+ * controlplane node to retrieve the kubeconfig from
77
+ */
78
+ readonly node: string;
79
+ readonly timeouts?: outputs.machine.DisksTimeouts;
80
+ }
81
+ /**
82
+ * Generate a machine configuration for a node type
83
+ *
84
+ * > **Note:** Since Talos natively supports `.machine.install.diskSelector`, the `talos.machine.Disks` data source maybe just used to query disk information that could be used elsewhere. It's recommended to use `machine.install.diskSelector` in Talos machine configuration.
85
+ *
86
+ * ## Example Usage
87
+ *
88
+ * ```typescript
89
+ * import * as pulumi from "@pulumi/pulumi";
90
+ * import * as talos from "@pulumi/talos";
91
+ * import * as talos from "@pulumiverse/talos";
92
+ *
93
+ * const thisSecrets = new talos.machine.Secrets("thisSecrets", {});
94
+ * const thisDisks = talos.machine.DisksOutput({
95
+ * clientConfiguration: thisSecrets.clientConfiguration,
96
+ * node: "10.5.0.2",
97
+ * filters: {
98
+ * size: "> 100GB",
99
+ * type: "nvme",
100
+ * },
101
+ * });
102
+ * export const nvmeDisks = thisDisks.apply(thisDisks => thisDisks.disks.map(__item => __item.name));
103
+ * ```
104
+ */
105
+ export declare function disksOutput(args: DisksOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<DisksResult>;
106
+ /**
107
+ * A collection of arguments for invoking Disks.
108
+ */
109
+ export interface DisksOutputArgs {
110
+ /**
111
+ * The client configuration data
112
+ */
113
+ clientConfiguration: pulumi.Input<inputs.machine.DisksClientConfigurationArgs>;
114
+ /**
115
+ * endpoint to use for the talosclient. if not set, the node value will be used
116
+ */
117
+ endpoint?: pulumi.Input<string>;
118
+ /**
119
+ * Filters to apply to the disks
120
+ */
121
+ filters?: pulumi.Input<inputs.machine.DisksFiltersArgs>;
122
+ /**
123
+ * controlplane node to retrieve the kubeconfig from
124
+ */
125
+ node: pulumi.Input<string>;
126
+ timeouts?: pulumi.Input<inputs.machine.DisksTimeoutsArgs>;
127
+ }
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.disksOutput = exports.disks = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ /**
9
+ * Generate a machine configuration for a node type
10
+ *
11
+ * > **Note:** Since Talos natively supports `.machine.install.diskSelector`, the `talos.machine.Disks` data source maybe just used to query disk information that could be used elsewhere. It's recommended to use `machine.install.diskSelector` in Talos machine configuration.
12
+ *
13
+ * ## Example Usage
14
+ *
15
+ * ```typescript
16
+ * import * as pulumi from "@pulumi/pulumi";
17
+ * import * as talos from "@pulumi/talos";
18
+ * import * as talos from "@pulumiverse/talos";
19
+ *
20
+ * const thisSecrets = new talos.machine.Secrets("thisSecrets", {});
21
+ * const thisDisks = talos.machine.DisksOutput({
22
+ * clientConfiguration: thisSecrets.clientConfiguration,
23
+ * node: "10.5.0.2",
24
+ * filters: {
25
+ * size: "> 100GB",
26
+ * type: "nvme",
27
+ * },
28
+ * });
29
+ * export const nvmeDisks = thisDisks.apply(thisDisks => thisDisks.disks.map(__item => __item.name));
30
+ * ```
31
+ */
32
+ function disks(args, opts) {
33
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
34
+ return pulumi.runtime.invoke("talos:machine/disks:Disks", {
35
+ "clientConfiguration": args.clientConfiguration,
36
+ "endpoint": args.endpoint,
37
+ "filters": args.filters,
38
+ "node": args.node,
39
+ "timeouts": args.timeouts,
40
+ }, opts);
41
+ }
42
+ exports.disks = disks;
43
+ /**
44
+ * Generate a machine configuration for a node type
45
+ *
46
+ * > **Note:** Since Talos natively supports `.machine.install.diskSelector`, the `talos.machine.Disks` data source maybe just used to query disk information that could be used elsewhere. It's recommended to use `machine.install.diskSelector` in Talos machine configuration.
47
+ *
48
+ * ## Example Usage
49
+ *
50
+ * ```typescript
51
+ * import * as pulumi from "@pulumi/pulumi";
52
+ * import * as talos from "@pulumi/talos";
53
+ * import * as talos from "@pulumiverse/talos";
54
+ *
55
+ * const thisSecrets = new talos.machine.Secrets("thisSecrets", {});
56
+ * const thisDisks = talos.machine.DisksOutput({
57
+ * clientConfiguration: thisSecrets.clientConfiguration,
58
+ * node: "10.5.0.2",
59
+ * filters: {
60
+ * size: "> 100GB",
61
+ * type: "nvme",
62
+ * },
63
+ * });
64
+ * export const nvmeDisks = thisDisks.apply(thisDisks => thisDisks.disks.map(__item => __item.name));
65
+ * ```
66
+ */
67
+ function disksOutput(args, opts) {
68
+ return pulumi.output(args).apply((a) => disks(a, opts));
69
+ }
70
+ exports.disksOutput = disksOutput;
71
+ //# sourceMappingURL=disks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disks.js","sourceRoot":"","sources":["../../machine/disks.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,0CAA0C;AAE1C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAgB,KAAK,CAAC,IAAe,EAAE,IAA2B;IAE9D,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,2BAA2B,EAAE;QACtD,qBAAqB,EAAE,IAAI,CAAC,mBAAmB;QAC/C,UAAU,EAAE,IAAI,CAAC,QAAQ;QACzB,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,MAAM,EAAE,IAAI,CAAC,IAAI;QACjB,UAAU,EAAE,IAAI,CAAC,QAAQ;KAC5B,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAVD,sBAUC;AAuDD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAgB,WAAW,CAAC,IAAqB,EAAE,IAA2B;IAC1E,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AAChE,CAAC;AAFD,kCAEC"}
@@ -0,0 +1,15 @@
1
+ export { BootstrapArgs, BootstrapState } from "./bootstrap";
2
+ export type Bootstrap = import("./bootstrap").Bootstrap;
3
+ export declare const Bootstrap: typeof import("./bootstrap").Bootstrap;
4
+ export { ConfigurationArgs, ConfigurationResult, ConfigurationOutputArgs } from "./configuration";
5
+ export declare const configuration: typeof import("./configuration").configuration;
6
+ export declare const configurationOutput: typeof import("./configuration").configurationOutput;
7
+ export { ConfigurationApplyArgs, ConfigurationApplyState } from "./configurationApply";
8
+ export type ConfigurationApply = import("./configurationApply").ConfigurationApply;
9
+ export declare const ConfigurationApply: typeof import("./configurationApply").ConfigurationApply;
10
+ export { DisksArgs, DisksResult, DisksOutputArgs } from "./disks";
11
+ export declare const disks: typeof import("./disks").disks;
12
+ export declare const disksOutput: typeof import("./disks").disksOutput;
13
+ export { SecretsArgs, SecretsState } from "./secrets";
14
+ export type Secrets = import("./secrets").Secrets;
15
+ export declare const Secrets: typeof import("./secrets").Secrets;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Secrets = exports.disksOutput = exports.disks = exports.ConfigurationApply = exports.configurationOutput = exports.configuration = exports.Bootstrap = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ exports.Bootstrap = null;
9
+ utilities.lazyLoad(exports, ["Bootstrap"], () => require("./bootstrap"));
10
+ exports.configuration = null;
11
+ exports.configurationOutput = null;
12
+ utilities.lazyLoad(exports, ["configuration", "configurationOutput"], () => require("./configuration"));
13
+ exports.ConfigurationApply = null;
14
+ utilities.lazyLoad(exports, ["ConfigurationApply"], () => require("./configurationApply"));
15
+ exports.disks = null;
16
+ exports.disksOutput = null;
17
+ utilities.lazyLoad(exports, ["disks", "disksOutput"], () => require("./disks"));
18
+ exports.Secrets = null;
19
+ utilities.lazyLoad(exports, ["Secrets"], () => require("./secrets"));
20
+ const _module = {
21
+ version: utilities.getVersion(),
22
+ construct: (name, type, urn) => {
23
+ switch (type) {
24
+ case "talos:machine/bootstrap:Bootstrap":
25
+ return new exports.Bootstrap(name, undefined, { urn });
26
+ case "talos:machine/configurationApply:ConfigurationApply":
27
+ return new exports.ConfigurationApply(name, undefined, { urn });
28
+ case "talos:machine/secrets:Secrets":
29
+ return new exports.Secrets(name, undefined, { urn });
30
+ default:
31
+ throw new Error(`unknown resource type ${type}`);
32
+ }
33
+ },
34
+ };
35
+ pulumi.runtime.registerResourceModule("talos", "machine/bootstrap", _module);
36
+ pulumi.runtime.registerResourceModule("talos", "machine/configurationApply", _module);
37
+ pulumi.runtime.registerResourceModule("talos", "machine/secrets", _module);
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../machine/index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,0CAA0C;AAK7B,QAAA,SAAS,GAA2C,IAAW,CAAC;AAC7E,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;AAG5D,QAAA,aAAa,GAAmD,IAAW,CAAC;AAC5E,QAAA,mBAAmB,GAAyD,IAAW,CAAC;AACrG,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,eAAe,EAAC,qBAAqB,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAI1F,QAAA,kBAAkB,GAA6D,IAAW,CAAC;AACxG,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,oBAAoB,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CA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O,CAAC,CAAA"}
@@ -0,0 +1,86 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "../types/input";
3
+ import * as outputs from "../types/output";
4
+ /**
5
+ * Generate machine secrets for Talos cluster.
6
+ *
7
+ * ## Example Usage
8
+ *
9
+ * ```typescript
10
+ * import * as pulumi from "@pulumi/pulumi";
11
+ * import * as talos from "@pulumiverse/talos";
12
+ *
13
+ * const machineSecrets = new talos.machine.Secrets("machineSecrets", {});
14
+ * ```
15
+ *
16
+ * ## Import
17
+ *
18
+ * terraform machine secrets can be imported from an existing secrets file
19
+ *
20
+ * ```sh
21
+ * $ pulumi import talos:machine/secrets:Secrets this <path-to-secrets.yaml>
22
+ * ```
23
+ */
24
+ export declare class Secrets extends pulumi.CustomResource {
25
+ /**
26
+ * Get an existing Secrets resource's state with the given name, ID, and optional extra
27
+ * properties used to qualify the lookup.
28
+ *
29
+ * @param name The _unique_ name of the resulting resource.
30
+ * @param id The _unique_ provider ID of the resource to lookup.
31
+ * @param state Any extra arguments used during the lookup.
32
+ * @param opts Optional settings to control the behavior of the CustomResource.
33
+ */
34
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SecretsState, opts?: pulumi.CustomResourceOptions): Secrets;
35
+ /**
36
+ * Returns true if the given object is an instance of Secrets. This is designed to work even
37
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
38
+ */
39
+ static isInstance(obj: any): obj is Secrets;
40
+ /**
41
+ * The generated client configuration data
42
+ */
43
+ readonly clientConfiguration: pulumi.Output<outputs.machine.SecretsClientConfiguration>;
44
+ /**
45
+ * The secrets for the talos cluster
46
+ */
47
+ readonly machineSecrets: pulumi.Output<outputs.machine.SecretsMachineSecrets>;
48
+ /**
49
+ * The version of talos features to use in generated machine configuration
50
+ */
51
+ readonly talosVersion: pulumi.Output<string>;
52
+ /**
53
+ * Create a Secrets resource with the given unique name, arguments, and options.
54
+ *
55
+ * @param name The _unique_ name of the resource.
56
+ * @param args The arguments to use to populate this resource's properties.
57
+ * @param opts A bag of options that control this resource's behavior.
58
+ */
59
+ constructor(name: string, args?: SecretsArgs, opts?: pulumi.CustomResourceOptions);
60
+ }
61
+ /**
62
+ * Input properties used for looking up and filtering Secrets resources.
63
+ */
64
+ export interface SecretsState {
65
+ /**
66
+ * The generated client configuration data
67
+ */
68
+ clientConfiguration?: pulumi.Input<inputs.machine.SecretsClientConfiguration>;
69
+ /**
70
+ * The secrets for the talos cluster
71
+ */
72
+ machineSecrets?: pulumi.Input<inputs.machine.SecretsMachineSecrets>;
73
+ /**
74
+ * The version of talos features to use in generated machine configuration
75
+ */
76
+ talosVersion?: pulumi.Input<string>;
77
+ }
78
+ /**
79
+ * The set of arguments for constructing a Secrets resource.
80
+ */
81
+ export interface SecretsArgs {
82
+ /**
83
+ * The version of talos features to use in generated machine configuration
84
+ */
85
+ talosVersion?: pulumi.Input<string>;
86
+ }
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Secrets = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ /**
9
+ * Generate machine secrets for Talos cluster.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as talos from "@pulumiverse/talos";
16
+ *
17
+ * const machineSecrets = new talos.machine.Secrets("machineSecrets", {});
18
+ * ```
19
+ *
20
+ * ## Import
21
+ *
22
+ * terraform machine secrets can be imported from an existing secrets file
23
+ *
24
+ * ```sh
25
+ * $ pulumi import talos:machine/secrets:Secrets this <path-to-secrets.yaml>
26
+ * ```
27
+ */
28
+ class Secrets extends pulumi.CustomResource {
29
+ /**
30
+ * Get an existing Secrets resource's state with the given name, ID, and optional extra
31
+ * properties used to qualify the lookup.
32
+ *
33
+ * @param name The _unique_ name of the resulting resource.
34
+ * @param id The _unique_ provider ID of the resource to lookup.
35
+ * @param state Any extra arguments used during the lookup.
36
+ * @param opts Optional settings to control the behavior of the CustomResource.
37
+ */
38
+ static get(name, id, state, opts) {
39
+ return new Secrets(name, state, Object.assign(Object.assign({}, opts), { id: id }));
40
+ }
41
+ /**
42
+ * Returns true if the given object is an instance of Secrets. This is designed to work even
43
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
44
+ */
45
+ static isInstance(obj) {
46
+ if (obj === undefined || obj === null) {
47
+ return false;
48
+ }
49
+ return obj['__pulumiType'] === Secrets.__pulumiType;
50
+ }
51
+ constructor(name, argsOrState, opts) {
52
+ let resourceInputs = {};
53
+ opts = opts || {};
54
+ if (opts.id) {
55
+ const state = argsOrState;
56
+ resourceInputs["clientConfiguration"] = state ? state.clientConfiguration : undefined;
57
+ resourceInputs["machineSecrets"] = state ? state.machineSecrets : undefined;
58
+ resourceInputs["talosVersion"] = state ? state.talosVersion : undefined;
59
+ }
60
+ else {
61
+ const args = argsOrState;
62
+ resourceInputs["talosVersion"] = args ? args.talosVersion : undefined;
63
+ resourceInputs["clientConfiguration"] = undefined /*out*/;
64
+ resourceInputs["machineSecrets"] = undefined /*out*/;
65
+ }
66
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
67
+ super(Secrets.__pulumiType, name, resourceInputs, opts);
68
+ }
69
+ }
70
+ exports.Secrets = Secrets;
71
+ /** @internal */
72
+ Secrets.__pulumiType = 'talos:machine/secrets:Secrets';
73
+ //# sourceMappingURL=secrets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../machine/secrets.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,0CAA0C;AAE1C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,OAAQ,SAAQ,MAAM,CAAC,cAAc;IAC9C;;;;;;;;OAQG;IACI,MA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G,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC5D,CAAC;;AAjEL,0BAkEC;AApDG,gBAAgB;AACO,oBAAY,GAAG,+BAA+B,CAAC"}
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@pulumiverse/talos",
3
+ "version": "v0.1.1",
4
+ "description": "A Pulumi package for creating and managing Talos Linux machines and clusters.",
5
+ "keywords": [
6
+ "pulumi",
7
+ "talos",
8
+ "category/infrastructure"
9
+ ],
10
+ "homepage": "https://talos.dev",
11
+ "repository": "https://github.com/pulumiverse/pulumi-talos",
12
+ "license": "MPL-2.0",
13
+ "scripts": {
14
+ "build": "tsc"
15
+ },
16
+ "dependencies": {
17
+ "@pulumi/pulumi": "^3.0.0"
18
+ },
19
+ "devDependencies": {
20
+ "@types/mime": "^2.0.0",
21
+ "@types/node": "^10.0.0",
22
+ "typescript": "^4.3.5"
23
+ },
24
+ "pulumi": {
25
+ "resource": true,
26
+ "name": "talos",
27
+ "server": "https://github.com/pulumiverse/pulumi-talos/releases"
28
+ }
29
+ }