@pulumi/nomad 2.5.0-alpha.1744783739 → 2.5.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.
@@ -0,0 +1,225 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "./types/input";
3
+ import * as outputs from "./types/output";
4
+ /**
5
+ * Registers a dynamic host volume in Nomad that has already been created. Note
6
+ * that Nomad supports two workflows for dynamic host volumes: create and
7
+ * register. Both resources result in the same data source with the same outputs.
8
+ */
9
+ export declare class DynamicHostVolumeRegistration extends pulumi.CustomResource {
10
+ /**
11
+ * Get an existing DynamicHostVolumeRegistration resource's state with the given name, ID, and optional extra
12
+ * properties used to qualify the lookup.
13
+ *
14
+ * @param name The _unique_ name of the resulting resource.
15
+ * @param id The _unique_ provider ID of the resource to lookup.
16
+ * @param state Any extra arguments used during the lookup.
17
+ * @param opts Optional settings to control the behavior of the CustomResource.
18
+ */
19
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DynamicHostVolumeRegistrationState, opts?: pulumi.CustomResourceOptions): DynamicHostVolumeRegistration;
20
+ /**
21
+ * Returns true if the given object is an instance of DynamicHostVolumeRegistration. This is designed to work even
22
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
23
+ */
24
+ static isInstance(obj: any): obj is DynamicHostVolumeRegistration;
25
+ /**
26
+ * `(block: <optional>)` - Option for validating the capability of a
27
+ * volume. Each capability block has the following attributes:
28
+ */
29
+ readonly capabilities: pulumi.Output<outputs.DynamicHostVolumeRegistrationCapability[]>;
30
+ /**
31
+ * `(string: <optional>)` - The size of a volume in bytes. Either the
32
+ * physical size of a disk or a quota, depending on the plugin. This field must
33
+ * be between the `capacityMin` and `capacityMax` values unless they are
34
+ * omitted. Accepts human-friendly suffixes such as `"100GiB"`.
35
+ */
36
+ readonly capacity: pulumi.Output<string | undefined>;
37
+ readonly capacityBytes: pulumi.Output<number>;
38
+ readonly capacityMaxBytes: pulumi.Output<number>;
39
+ readonly capacityMinBytes: pulumi.Output<number>;
40
+ /**
41
+ * Constraints
42
+ */
43
+ readonly constraints: pulumi.Output<outputs.DynamicHostVolumeRegistrationConstraint[]>;
44
+ /**
45
+ * `(string)` - The path on disk where the volume exists.
46
+ */
47
+ readonly hostPath: pulumi.Output<string>;
48
+ /**
49
+ * `(string: <required>)` - The name of the volume, which is used as the
50
+ * [`volume.source`][volumeSource] field in job specifications that claim this
51
+ * volume. Host volume names must be unique per node. Names are visible to any
52
+ * user with `node:read` ACL, even across namespaces, so they should not be
53
+ * treated as sensitive values.
54
+ */
55
+ readonly name: pulumi.Output<string>;
56
+ /**
57
+ * `(string: <optional>)` - The namespace of the volume. This field
58
+ * overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
59
+ * environment variable. Defaults to `"default"` if unset.
60
+ */
61
+ readonly namespace: pulumi.Output<string | undefined>;
62
+ /**
63
+ * `(string: <required>)` - A specific node where the volume is
64
+ * mounted.
65
+ */
66
+ readonly nodeId: pulumi.Output<string>;
67
+ /**
68
+ * Node pool
69
+ */
70
+ readonly nodePool: pulumi.Output<string>;
71
+ /**
72
+ * `(map<string|string>: <optional>)` - A key-value map of strings
73
+ * passed directly to the plugin to configure the volume. The details of these
74
+ * parameters are specific to the plugin.
75
+ *
76
+ *
77
+ * [`accessMode`]: /nomad/docs/other-specifications/volume/capability#access_mode
78
+ * [`attachmentMode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
79
+ * [volumeSource]: /nomad/docs/job-specification/volume#source
80
+ */
81
+ readonly parameters: pulumi.Output<{
82
+ [key: string]: string;
83
+ } | undefined>;
84
+ /**
85
+ * Plugin ID
86
+ */
87
+ readonly pluginId: pulumi.Output<string>;
88
+ /**
89
+ * State
90
+ */
91
+ readonly state: pulumi.Output<string>;
92
+ /**
93
+ * Create a DynamicHostVolumeRegistration resource with the given unique name, arguments, and options.
94
+ *
95
+ * @param name The _unique_ name of the resource.
96
+ * @param args The arguments to use to populate this resource's properties.
97
+ * @param opts A bag of options that control this resource's behavior.
98
+ */
99
+ constructor(name: string, args: DynamicHostVolumeRegistrationArgs, opts?: pulumi.CustomResourceOptions);
100
+ }
101
+ /**
102
+ * Input properties used for looking up and filtering DynamicHostVolumeRegistration resources.
103
+ */
104
+ export interface DynamicHostVolumeRegistrationState {
105
+ /**
106
+ * `(block: <optional>)` - Option for validating the capability of a
107
+ * volume. Each capability block has the following attributes:
108
+ */
109
+ capabilities?: pulumi.Input<pulumi.Input<inputs.DynamicHostVolumeRegistrationCapability>[]>;
110
+ /**
111
+ * `(string: <optional>)` - The size of a volume in bytes. Either the
112
+ * physical size of a disk or a quota, depending on the plugin. This field must
113
+ * be between the `capacityMin` and `capacityMax` values unless they are
114
+ * omitted. Accepts human-friendly suffixes such as `"100GiB"`.
115
+ */
116
+ capacity?: pulumi.Input<string>;
117
+ capacityBytes?: pulumi.Input<number>;
118
+ capacityMaxBytes?: pulumi.Input<number>;
119
+ capacityMinBytes?: pulumi.Input<number>;
120
+ /**
121
+ * Constraints
122
+ */
123
+ constraints?: pulumi.Input<pulumi.Input<inputs.DynamicHostVolumeRegistrationConstraint>[]>;
124
+ /**
125
+ * `(string)` - The path on disk where the volume exists.
126
+ */
127
+ hostPath?: pulumi.Input<string>;
128
+ /**
129
+ * `(string: <required>)` - The name of the volume, which is used as the
130
+ * [`volume.source`][volumeSource] field in job specifications that claim this
131
+ * volume. Host volume names must be unique per node. Names are visible to any
132
+ * user with `node:read` ACL, even across namespaces, so they should not be
133
+ * treated as sensitive values.
134
+ */
135
+ name?: pulumi.Input<string>;
136
+ /**
137
+ * `(string: <optional>)` - The namespace of the volume. This field
138
+ * overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
139
+ * environment variable. Defaults to `"default"` if unset.
140
+ */
141
+ namespace?: pulumi.Input<string>;
142
+ /**
143
+ * `(string: <required>)` - A specific node where the volume is
144
+ * mounted.
145
+ */
146
+ nodeId?: pulumi.Input<string>;
147
+ /**
148
+ * Node pool
149
+ */
150
+ nodePool?: pulumi.Input<string>;
151
+ /**
152
+ * `(map<string|string>: <optional>)` - A key-value map of strings
153
+ * passed directly to the plugin to configure the volume. The details of these
154
+ * parameters are specific to the plugin.
155
+ *
156
+ *
157
+ * [`accessMode`]: /nomad/docs/other-specifications/volume/capability#access_mode
158
+ * [`attachmentMode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
159
+ * [volumeSource]: /nomad/docs/job-specification/volume#source
160
+ */
161
+ parameters?: pulumi.Input<{
162
+ [key: string]: pulumi.Input<string>;
163
+ }>;
164
+ /**
165
+ * Plugin ID
166
+ */
167
+ pluginId?: pulumi.Input<string>;
168
+ /**
169
+ * State
170
+ */
171
+ state?: pulumi.Input<string>;
172
+ }
173
+ /**
174
+ * The set of arguments for constructing a DynamicHostVolumeRegistration resource.
175
+ */
176
+ export interface DynamicHostVolumeRegistrationArgs {
177
+ /**
178
+ * `(block: <optional>)` - Option for validating the capability of a
179
+ * volume. Each capability block has the following attributes:
180
+ */
181
+ capabilities: pulumi.Input<pulumi.Input<inputs.DynamicHostVolumeRegistrationCapability>[]>;
182
+ /**
183
+ * `(string: <optional>)` - The size of a volume in bytes. Either the
184
+ * physical size of a disk or a quota, depending on the plugin. This field must
185
+ * be between the `capacityMin` and `capacityMax` values unless they are
186
+ * omitted. Accepts human-friendly suffixes such as `"100GiB"`.
187
+ */
188
+ capacity?: pulumi.Input<string>;
189
+ /**
190
+ * `(string)` - The path on disk where the volume exists.
191
+ */
192
+ hostPath: pulumi.Input<string>;
193
+ /**
194
+ * `(string: <required>)` - The name of the volume, which is used as the
195
+ * [`volume.source`][volumeSource] field in job specifications that claim this
196
+ * volume. Host volume names must be unique per node. Names are visible to any
197
+ * user with `node:read` ACL, even across namespaces, so they should not be
198
+ * treated as sensitive values.
199
+ */
200
+ name?: pulumi.Input<string>;
201
+ /**
202
+ * `(string: <optional>)` - The namespace of the volume. This field
203
+ * overrides the namespace provided by the `-namespace` flag or `NOMAD_NAMESPACE`
204
+ * environment variable. Defaults to `"default"` if unset.
205
+ */
206
+ namespace?: pulumi.Input<string>;
207
+ /**
208
+ * `(string: <required>)` - A specific node where the volume is
209
+ * mounted.
210
+ */
211
+ nodeId: pulumi.Input<string>;
212
+ /**
213
+ * `(map<string|string>: <optional>)` - A key-value map of strings
214
+ * passed directly to the plugin to configure the volume. The details of these
215
+ * parameters are specific to the plugin.
216
+ *
217
+ *
218
+ * [`accessMode`]: /nomad/docs/other-specifications/volume/capability#access_mode
219
+ * [`attachmentMode`]: /nomad/docs/other-specifications/volume/capability#attachment_mode
220
+ * [volumeSource]: /nomad/docs/job-specification/volume#source
221
+ */
222
+ parameters?: pulumi.Input<{
223
+ [key: string]: pulumi.Input<string>;
224
+ }>;
225
+ }
@@ -0,0 +1,89 @@
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.DynamicHostVolumeRegistration = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * Registers a dynamic host volume in Nomad that has already been created. Note
10
+ * that Nomad supports two workflows for dynamic host volumes: create and
11
+ * register. Both resources result in the same data source with the same outputs.
12
+ */
13
+ class DynamicHostVolumeRegistration extends pulumi.CustomResource {
14
+ /**
15
+ * Get an existing DynamicHostVolumeRegistration resource's state with the given name, ID, and optional extra
16
+ * properties used to qualify the lookup.
17
+ *
18
+ * @param name The _unique_ name of the resulting resource.
19
+ * @param id The _unique_ provider ID of the resource to lookup.
20
+ * @param state Any extra arguments used during the lookup.
21
+ * @param opts Optional settings to control the behavior of the CustomResource.
22
+ */
23
+ static get(name, id, state, opts) {
24
+ return new DynamicHostVolumeRegistration(name, state, Object.assign(Object.assign({}, opts), { id: id }));
25
+ }
26
+ /**
27
+ * Returns true if the given object is an instance of DynamicHostVolumeRegistration. This is designed to work even
28
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
29
+ */
30
+ static isInstance(obj) {
31
+ if (obj === undefined || obj === null) {
32
+ return false;
33
+ }
34
+ return obj['__pulumiType'] === DynamicHostVolumeRegistration.__pulumiType;
35
+ }
36
+ constructor(name, argsOrState, opts) {
37
+ let resourceInputs = {};
38
+ opts = opts || {};
39
+ if (opts.id) {
40
+ const state = argsOrState;
41
+ resourceInputs["capabilities"] = state ? state.capabilities : undefined;
42
+ resourceInputs["capacity"] = state ? state.capacity : undefined;
43
+ resourceInputs["capacityBytes"] = state ? state.capacityBytes : undefined;
44
+ resourceInputs["capacityMaxBytes"] = state ? state.capacityMaxBytes : undefined;
45
+ resourceInputs["capacityMinBytes"] = state ? state.capacityMinBytes : undefined;
46
+ resourceInputs["constraints"] = state ? state.constraints : undefined;
47
+ resourceInputs["hostPath"] = state ? state.hostPath : undefined;
48
+ resourceInputs["name"] = state ? state.name : undefined;
49
+ resourceInputs["namespace"] = state ? state.namespace : undefined;
50
+ resourceInputs["nodeId"] = state ? state.nodeId : undefined;
51
+ resourceInputs["nodePool"] = state ? state.nodePool : undefined;
52
+ resourceInputs["parameters"] = state ? state.parameters : undefined;
53
+ resourceInputs["pluginId"] = state ? state.pluginId : undefined;
54
+ resourceInputs["state"] = state ? state.state : undefined;
55
+ }
56
+ else {
57
+ const args = argsOrState;
58
+ if ((!args || args.capabilities === undefined) && !opts.urn) {
59
+ throw new Error("Missing required property 'capabilities'");
60
+ }
61
+ if ((!args || args.hostPath === undefined) && !opts.urn) {
62
+ throw new Error("Missing required property 'hostPath'");
63
+ }
64
+ if ((!args || args.nodeId === undefined) && !opts.urn) {
65
+ throw new Error("Missing required property 'nodeId'");
66
+ }
67
+ resourceInputs["capabilities"] = args ? args.capabilities : undefined;
68
+ resourceInputs["capacity"] = args ? args.capacity : undefined;
69
+ resourceInputs["hostPath"] = args ? args.hostPath : undefined;
70
+ resourceInputs["name"] = args ? args.name : undefined;
71
+ resourceInputs["namespace"] = args ? args.namespace : undefined;
72
+ resourceInputs["nodeId"] = args ? args.nodeId : undefined;
73
+ resourceInputs["parameters"] = args ? args.parameters : undefined;
74
+ resourceInputs["capacityBytes"] = undefined /*out*/;
75
+ resourceInputs["capacityMaxBytes"] = undefined /*out*/;
76
+ resourceInputs["capacityMinBytes"] = undefined /*out*/;
77
+ resourceInputs["constraints"] = undefined /*out*/;
78
+ resourceInputs["nodePool"] = undefined /*out*/;
79
+ resourceInputs["pluginId"] = undefined /*out*/;
80
+ resourceInputs["state"] = undefined /*out*/;
81
+ }
82
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
83
+ super(DynamicHostVolumeRegistration.__pulumiType, name, resourceInputs, opts);
84
+ }
85
+ }
86
+ exports.DynamicHostVolumeRegistration = DynamicHostVolumeRegistration;
87
+ /** @internal */
88
+ DynamicHostVolumeRegistration.__pulumiType = 'nomad:index/dynamicHostVolumeRegistration:DynamicHostVolumeRegistration';
89
+ //# sourceMappingURL=dynamicHostVolumeRegistration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamicHostVolumeRegistration.js","sourceRoot":"","sources":["../dynamicHostVolumeRegistration.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;GAIG;AACH,MAAa,6BAA8B,SAAQ,MAAM,CAAC,cAAc;IACpE;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA0C,EAAE,IAAmC;QACxI,OAAO,IAAI,6BAA6B,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACpF,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC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EAAE,IAAI,CAAC,CAAC;IAClF,CAAC;;AArJL,sEAsJC;AAxIG,gBAAgB;AACO,0CAAY,GAAG,yEAAyE,CAAC"}
@@ -0,0 +1,156 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as outputs from "./types/output";
3
+ /**
4
+ * Get information on a dynamic host volume from Nomad.
5
+ *
6
+ * ## Example Usage
7
+ *
8
+ * Check for the existing of a host volume:
9
+ *
10
+ * ```typescript
11
+ * import * as pulumi from "@pulumi/pulumi";
12
+ * import * as nomad from "@pulumi/nomad";
13
+ *
14
+ * const example = nomad.getDynamicHostVolume({
15
+ * namespace: "prod",
16
+ * id: "d688ff7a-d299-11ef-ae3c-6f2400953c18",
17
+ * });
18
+ * ```
19
+ *
20
+ * This will check for a dynamic host volume with the ID
21
+ * `d688ff7a-d299-11ef-ae3c-6f2400953c18`.
22
+ */
23
+ export declare function getDynamicHostVolume(args: GetDynamicHostVolumeArgs, opts?: pulumi.InvokeOptions): Promise<GetDynamicHostVolumeResult>;
24
+ /**
25
+ * A collection of arguments for invoking getDynamicHostVolume.
26
+ */
27
+ export interface GetDynamicHostVolumeArgs {
28
+ /**
29
+ * `(string)` - the ID of the volume
30
+ */
31
+ id: string;
32
+ /**
33
+ * `(string)` - the namespace of the volume. Defaults to `"default"`
34
+ */
35
+ namespace?: string;
36
+ }
37
+ /**
38
+ * A collection of values returned by getDynamicHostVolume.
39
+ */
40
+ export interface GetDynamicHostVolumeResult {
41
+ /**
42
+ * `(block)` - Option for validating the capability of a
43
+ * volume. Each capability block has the following attributes:
44
+ */
45
+ readonly capabilities: outputs.GetDynamicHostVolumeCapability[];
46
+ /**
47
+ * `(string)` - The size of the volume, in human-friendly format
48
+ * (ex. 10 GiB)
49
+ */
50
+ readonly capacity: string;
51
+ /**
52
+ * `(int)` - The size of the volume, in bytes.
53
+ */
54
+ readonly capacityBytes: number;
55
+ /**
56
+ * `(string)` - The requested maximum capacity of the volume, in
57
+ * human-friendly format (ex. 10 GiB).
58
+ */
59
+ readonly capacityMax: string;
60
+ /**
61
+ * `(string)` - The requested maximum capacity of the
62
+ * volume, in bytes.
63
+ */
64
+ readonly capacityMaxBytes: number;
65
+ /**
66
+ * `(string)` - The requested minimum capacity of the volume, in
67
+ * human-friendly format (ex. 10 GiB).
68
+ */
69
+ readonly capacityMin: string;
70
+ /**
71
+ * `(string)` - The requested minimum capacity of the
72
+ * volume, in bytes.
73
+ */
74
+ readonly capacityMinBytes: number;
75
+ /**
76
+ * `(block)` - The restrictions used to place the volume on a node,
77
+ * similar to the [`constraint`][] block on a Nomad job specification. A volume
78
+ * may have multiple `constraint` blocks. Each constraint block has the following
79
+ * attributes.
80
+ */
81
+ readonly constraints: outputs.GetDynamicHostVolumeConstraint[];
82
+ /**
83
+ * `(string)` - The path on disk where the volume exists.
84
+ */
85
+ readonly hostPath: string;
86
+ readonly id: string;
87
+ /**
88
+ * `(string)` - The name of the volume, which is used as the
89
+ * [`volume.source`][volumeSource] field in job specifications that claim this
90
+ * volume. Host volume names are be unique per node. Names are visible to any
91
+ * user with `node:read` ACL, even across namespaces, so they should not be
92
+ * treated as sensitive values.
93
+ */
94
+ readonly name: string;
95
+ /**
96
+ * `(string)` - The namespace of the volume.
97
+ */
98
+ readonly namespace?: string;
99
+ /**
100
+ * `(string)` - A specific node where the volume is mounted.
101
+ */
102
+ readonly nodeId: string;
103
+ /**
104
+ * `(string: <optional>)` - The node pool of the node where the
105
+ * volume is mounted.
106
+ */
107
+ readonly nodePool: string;
108
+ /**
109
+ * `(map<string|string>)` - A key-value map of strings
110
+ * passed directly to the plugin to configure the volume. The details of these
111
+ * parameters are specific to the plugin.
112
+ */
113
+ readonly parameters: {
114
+ [key: string]: string;
115
+ };
116
+ /**
117
+ * `(string: <required>)` - The ID of the [dynamic host volume
118
+ * plugin][dhvPlugin] that manages this volume.
119
+ */
120
+ readonly pluginId: string;
121
+ readonly state: string;
122
+ }
123
+ /**
124
+ * Get information on a dynamic host volume from Nomad.
125
+ *
126
+ * ## Example Usage
127
+ *
128
+ * Check for the existing of a host volume:
129
+ *
130
+ * ```typescript
131
+ * import * as pulumi from "@pulumi/pulumi";
132
+ * import * as nomad from "@pulumi/nomad";
133
+ *
134
+ * const example = nomad.getDynamicHostVolume({
135
+ * namespace: "prod",
136
+ * id: "d688ff7a-d299-11ef-ae3c-6f2400953c18",
137
+ * });
138
+ * ```
139
+ *
140
+ * This will check for a dynamic host volume with the ID
141
+ * `d688ff7a-d299-11ef-ae3c-6f2400953c18`.
142
+ */
143
+ export declare function getDynamicHostVolumeOutput(args: GetDynamicHostVolumeOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDynamicHostVolumeResult>;
144
+ /**
145
+ * A collection of arguments for invoking getDynamicHostVolume.
146
+ */
147
+ export interface GetDynamicHostVolumeOutputArgs {
148
+ /**
149
+ * `(string)` - the ID of the volume
150
+ */
151
+ id: pulumi.Input<string>;
152
+ /**
153
+ * `(string)` - the namespace of the volume. Defaults to `"default"`
154
+ */
155
+ namespace?: pulumi.Input<string>;
156
+ }
@@ -0,0 +1,64 @@
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.getDynamicHostVolumeOutput = exports.getDynamicHostVolume = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * Get information on a dynamic host volume from Nomad.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * Check for the existing of a host volume:
14
+ *
15
+ * ```typescript
16
+ * import * as pulumi from "@pulumi/pulumi";
17
+ * import * as nomad from "@pulumi/nomad";
18
+ *
19
+ * const example = nomad.getDynamicHostVolume({
20
+ * namespace: "prod",
21
+ * id: "d688ff7a-d299-11ef-ae3c-6f2400953c18",
22
+ * });
23
+ * ```
24
+ *
25
+ * This will check for a dynamic host volume with the ID
26
+ * `d688ff7a-d299-11ef-ae3c-6f2400953c18`.
27
+ */
28
+ function getDynamicHostVolume(args, opts) {
29
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
30
+ return pulumi.runtime.invoke("nomad:index/getDynamicHostVolume:getDynamicHostVolume", {
31
+ "id": args.id,
32
+ "namespace": args.namespace,
33
+ }, opts);
34
+ }
35
+ exports.getDynamicHostVolume = getDynamicHostVolume;
36
+ /**
37
+ * Get information on a dynamic host volume from Nomad.
38
+ *
39
+ * ## Example Usage
40
+ *
41
+ * Check for the existing of a host volume:
42
+ *
43
+ * ```typescript
44
+ * import * as pulumi from "@pulumi/pulumi";
45
+ * import * as nomad from "@pulumi/nomad";
46
+ *
47
+ * const example = nomad.getDynamicHostVolume({
48
+ * namespace: "prod",
49
+ * id: "d688ff7a-d299-11ef-ae3c-6f2400953c18",
50
+ * });
51
+ * ```
52
+ *
53
+ * This will check for a dynamic host volume with the ID
54
+ * `d688ff7a-d299-11ef-ae3c-6f2400953c18`.
55
+ */
56
+ function getDynamicHostVolumeOutput(args, opts) {
57
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
58
+ return pulumi.runtime.invokeOutput("nomad:index/getDynamicHostVolume:getDynamicHostVolume", {
59
+ "id": args.id,
60
+ "namespace": args.namespace,
61
+ }, opts);
62
+ }
63
+ exports.getDynamicHostVolumeOutput = getDynamicHostVolumeOutput;
64
+ //# sourceMappingURL=getDynamicHostVolume.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDynamicHostVolume.js","sourceRoot":"","sources":["../getDynamicHostVolume.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,oBAAoB,CAAC,IAA8B,EAAE,IAA2B;IAC5F,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,uDAAuD,EAAE;QAClF,IAAI,EAAE,IAAI,CAAC,EAAE;QACb,WAAW,EAAE,IAAI,CAAC,SAAS;KAC9B,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAND,oDAMC;AAoGD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,0BAA0B,CAAC,IAAoC,EAAE,IAAiC;IAC9G,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,uDAAuD,EAAE;QACxF,IAAI,EAAE,IAAI,CAAC,EAAE;QACb,WAAW,EAAE,IAAI,CAAC,SAAS;KAC9B,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAND,gEAMC"}
package/getVolumes.d.ts CHANGED
@@ -29,7 +29,7 @@ export interface GetVolumesArgs {
29
29
  */
30
30
  pluginId?: string;
31
31
  /**
32
- * `(string: "csi")` Volume type (currently only supports `csi`)
32
+ * `(string: "csi")` Volume type (one of `csi` or `host`)
33
33
  */
34
34
  type?: string;
35
35
  }
@@ -85,7 +85,7 @@ export interface GetVolumesOutputArgs {
85
85
  */
86
86
  pluginId?: pulumi.Input<string>;
87
87
  /**
88
- * `(string: "csi")` Volume type (currently only supports `csi`)
88
+ * `(string: "csi")` Volume type (one of `csi` or `host`)
89
89
  */
90
90
  type?: pulumi.Input<string>;
91
91
  }
package/index.d.ts CHANGED
@@ -19,6 +19,12 @@ export declare const CsiVolume: typeof import("./csiVolume").CsiVolume;
19
19
  export { CsiVolumeRegistrationArgs, CsiVolumeRegistrationState } from "./csiVolumeRegistration";
20
20
  export type CsiVolumeRegistration = import("./csiVolumeRegistration").CsiVolumeRegistration;
21
21
  export declare const CsiVolumeRegistration: typeof import("./csiVolumeRegistration").CsiVolumeRegistration;
22
+ export { DynamicHostVolumeArgs, DynamicHostVolumeState } from "./dynamicHostVolume";
23
+ export type DynamicHostVolume = import("./dynamicHostVolume").DynamicHostVolume;
24
+ export declare const DynamicHostVolume: typeof import("./dynamicHostVolume").DynamicHostVolume;
25
+ export { DynamicHostVolumeRegistrationArgs, DynamicHostVolumeRegistrationState } from "./dynamicHostVolumeRegistration";
26
+ export type DynamicHostVolumeRegistration = import("./dynamicHostVolumeRegistration").DynamicHostVolumeRegistration;
27
+ export declare const DynamicHostVolumeRegistration: typeof import("./dynamicHostVolumeRegistration").DynamicHostVolumeRegistration;
22
28
  export { ExternalVolumeArgs, ExternalVolumeState } from "./externalVolume";
23
29
  export type ExternalVolume = import("./externalVolume").ExternalVolume;
24
30
  export declare const ExternalVolume: typeof import("./externalVolume").ExternalVolume;
@@ -49,6 +55,9 @@ export declare const getDatacentersOutput: typeof import("./getDatacenters").get
49
55
  export { GetDeploymentsResult } from "./getDeployments";
50
56
  export declare const getDeployments: typeof import("./getDeployments").getDeployments;
51
57
  export declare const getDeploymentsOutput: typeof import("./getDeployments").getDeploymentsOutput;
58
+ export { GetDynamicHostVolumeArgs, GetDynamicHostVolumeResult, GetDynamicHostVolumeOutputArgs } from "./getDynamicHostVolume";
59
+ export declare const getDynamicHostVolume: typeof import("./getDynamicHostVolume").getDynamicHostVolume;
60
+ export declare const getDynamicHostVolumeOutput: typeof import("./getDynamicHostVolume").getDynamicHostVolumeOutput;
52
61
  export { GetJobArgs, GetJobResult, GetJobOutputArgs } from "./getJob";
53
62
  export declare const getJob: typeof import("./getJob").getJob;
54
63
  export declare const getJobOutput: typeof import("./getJob").getJobOutput;
package/index.js CHANGED
@@ -2,8 +2,8 @@
2
2
  // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getScalingPolicyOutput = exports.getScalingPolicy = exports.getScalingPoliciesOutput = exports.getScalingPolicies = exports.getRegionsOutput = exports.getRegions = exports.getPluginsOutput = exports.getPlugins = exports.getPluginOutput = exports.getPlugin = exports.getNodePoolsOutput = exports.getNodePools = exports.getNodePoolOutput = exports.getNodePool = exports.getNamespacesOutput = exports.getNamespaces = exports.getNamespaceOutput = exports.getNamespace = exports.getJwksOutput = exports.getJwks = exports.getJobParserOutput = exports.getJobParser = exports.getJobOutput = exports.getJob = exports.getDeploymentsOutput = exports.getDeployments = exports.getDatacentersOutput = exports.getDatacenters = exports.getAllocationsOutput = exports.getAllocations = exports.getAclTokensOutput = exports.getAclTokens = exports.getAclTokenOutput = exports.getAclToken = exports.getAclRolesOutput = exports.getAclRoles = exports.getAclRoleOutput = exports.getAclRole = exports.getAclPolicyOutput = exports.getAclPolicy = exports.getAclPoliciesOutput = exports.getAclPolicies = exports.ExternalVolume = exports.CsiVolumeRegistration = exports.CsiVolume = exports.AclToken = exports.AclRole = exports.AclPolicy = exports.AclBindingRule = exports.AclAuthMethod = void 0;
6
- exports.types = exports.config = exports.Volume = exports.Variable = exports.SentinelPolicy = exports.SchedulerConfig = exports.QuoteSpecification = exports.Provider = exports.NodePool = exports.Namespace = exports.Job = exports.getVolumesOutput = exports.getVolumes = exports.getVariableOutput = exports.getVariable = exports.getSchedulerPolicyOutput = exports.getSchedulerPolicy = void 0;
5
+ exports.getRegionsOutput = exports.getRegions = exports.getPluginsOutput = exports.getPlugins = exports.getPluginOutput = exports.getPlugin = exports.getNodePoolsOutput = exports.getNodePools = exports.getNodePoolOutput = exports.getNodePool = exports.getNamespacesOutput = exports.getNamespaces = exports.getNamespaceOutput = exports.getNamespace = exports.getJwksOutput = exports.getJwks = exports.getJobParserOutput = exports.getJobParser = exports.getJobOutput = exports.getJob = exports.getDynamicHostVolumeOutput = exports.getDynamicHostVolume = exports.getDeploymentsOutput = exports.getDeployments = exports.getDatacentersOutput = exports.getDatacenters = exports.getAllocationsOutput = exports.getAllocations = exports.getAclTokensOutput = exports.getAclTokens = exports.getAclTokenOutput = exports.getAclToken = exports.getAclRolesOutput = exports.getAclRoles = exports.getAclRoleOutput = exports.getAclRole = exports.getAclPolicyOutput = exports.getAclPolicy = exports.getAclPoliciesOutput = exports.getAclPolicies = exports.ExternalVolume = exports.DynamicHostVolumeRegistration = exports.DynamicHostVolume = exports.CsiVolumeRegistration = exports.CsiVolume = exports.AclToken = exports.AclRole = exports.AclPolicy = exports.AclBindingRule = exports.AclAuthMethod = void 0;
6
+ exports.types = exports.config = exports.Volume = exports.Variable = exports.SentinelPolicy = exports.SchedulerConfig = exports.QuoteSpecification = exports.Provider = exports.NodePool = exports.Namespace = exports.Job = exports.getVolumesOutput = exports.getVolumes = exports.getVariableOutput = exports.getVariable = exports.getSchedulerPolicyOutput = exports.getSchedulerPolicy = exports.getScalingPolicyOutput = exports.getScalingPolicy = exports.getScalingPoliciesOutput = exports.getScalingPolicies = void 0;
7
7
  const pulumi = require("@pulumi/pulumi");
8
8
  const utilities = require("./utilities");
9
9
  exports.AclAuthMethod = null;
@@ -20,6 +20,10 @@ exports.CsiVolume = null;
20
20
  utilities.lazyLoad(exports, ["CsiVolume"], () => require("./csiVolume"));
21
21
  exports.CsiVolumeRegistration = null;
22
22
  utilities.lazyLoad(exports, ["CsiVolumeRegistration"], () => require("./csiVolumeRegistration"));
23
+ exports.DynamicHostVolume = null;
24
+ utilities.lazyLoad(exports, ["DynamicHostVolume"], () => require("./dynamicHostVolume"));
25
+ exports.DynamicHostVolumeRegistration = null;
26
+ utilities.lazyLoad(exports, ["DynamicHostVolumeRegistration"], () => require("./dynamicHostVolumeRegistration"));
23
27
  exports.ExternalVolume = null;
24
28
  utilities.lazyLoad(exports, ["ExternalVolume"], () => require("./externalVolume"));
25
29
  exports.getAclPolicies = null;
@@ -49,6 +53,9 @@ utilities.lazyLoad(exports, ["getDatacenters", "getDatacentersOutput"], () => re
49
53
  exports.getDeployments = null;
50
54
  exports.getDeploymentsOutput = null;
51
55
  utilities.lazyLoad(exports, ["getDeployments", "getDeploymentsOutput"], () => require("./getDeployments"));
56
+ exports.getDynamicHostVolume = null;
57
+ exports.getDynamicHostVolumeOutput = null;
58
+ utilities.lazyLoad(exports, ["getDynamicHostVolume", "getDynamicHostVolumeOutput"], () => require("./getDynamicHostVolume"));
52
59
  exports.getJob = null;
53
60
  exports.getJobOutput = null;
54
61
  utilities.lazyLoad(exports, ["getJob", "getJobOutput"], () => require("./getJob"));
@@ -135,6 +142,10 @@ const _module = {
135
142
  return new exports.CsiVolume(name, undefined, { urn });
136
143
  case "nomad:index/csiVolumeRegistration:CsiVolumeRegistration":
137
144
  return new exports.CsiVolumeRegistration(name, undefined, { urn });
145
+ case "nomad:index/dynamicHostVolume:DynamicHostVolume":
146
+ return new exports.DynamicHostVolume(name, undefined, { urn });
147
+ case "nomad:index/dynamicHostVolumeRegistration:DynamicHostVolumeRegistration":
148
+ return new exports.DynamicHostVolumeRegistration(name, undefined, { urn });
138
149
  case "nomad:index/externalVolume:ExternalVolume":
139
150
  return new exports.ExternalVolume(name, undefined, { urn });
140
151
  case "nomad:index/job:Job":
@@ -165,6 +176,8 @@ pulumi.runtime.registerResourceModule("nomad", "index/aclRole", _module);
165
176
  pulumi.runtime.registerResourceModule("nomad", "index/aclToken", _module);
166
177
  pulumi.runtime.registerResourceModule("nomad", "index/csiVolume", _module);
167
178
  pulumi.runtime.registerResourceModule("nomad", "index/csiVolumeRegistration", _module);
179
+ pulumi.runtime.registerResourceModule("nomad", "index/dynamicHostVolume", _module);
180
+ pulumi.runtime.registerResourceModule("nomad", "index/dynamicHostVolumeRegistration", _module);
168
181
  pulumi.runtime.registerResourceModule("nomad", "index/externalVolume", _module);
169
182
  pulumi.runtime.registerResourceModule("nomad", "index/job", _module);
170
183
  pulumi.runtime.registerResourceModule("nomad", "index/namespace", _module);