@pulumi/nomad 2.0.0 → 2.0.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.
- package/aclPolicy.d.ts +1 -1
- package/aclPolicy.js +1 -1
- package/getJobParser.d.ts +2 -2
- package/getJobParser.js +2 -2
- package/package.json +1 -1
- package/types/input.d.ts +18 -0
- package/types/output.d.ts +18 -0
- package/utilities.d.ts +4 -0
- package/utilities.js +33 -1
- package/utilities.js.map +1 -1
- package/scripts/install-pulumi-plugin.js +0 -21
package/aclPolicy.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import * as outputs from "./types/output";
|
|
|
15
15
|
*
|
|
16
16
|
* const dev = new nomad.AclPolicy("dev", {
|
|
17
17
|
* description: "Submit jobs to the dev environment.",
|
|
18
|
-
* rulesHcl: fs.readFileSync(`${path.module}/dev.hcl
|
|
18
|
+
* rulesHcl: fs.readFileSync(`${path.module}/dev.hcl`, "utf8"),
|
|
19
19
|
* });
|
|
20
20
|
* ```
|
|
21
21
|
*
|
package/aclPolicy.js
CHANGED
|
@@ -19,7 +19,7 @@ const utilities = require("./utilities");
|
|
|
19
19
|
*
|
|
20
20
|
* const dev = new nomad.AclPolicy("dev", {
|
|
21
21
|
* description: "Submit jobs to the dev environment.",
|
|
22
|
-
* rulesHcl: fs.readFileSync(`${path.module}/dev.hcl
|
|
22
|
+
* rulesHcl: fs.readFileSync(`${path.module}/dev.hcl`, "utf8"),
|
|
23
23
|
* });
|
|
24
24
|
* ```
|
|
25
25
|
*
|
package/getJobParser.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
10
10
|
* import * as nomad from "@pulumi/nomad";
|
|
11
11
|
*
|
|
12
12
|
* const myJob = nomad.getJobParser({
|
|
13
|
-
* hcl: fs.readFileSync(`${path.module}/jobspec.hcl
|
|
13
|
+
* hcl: fs.readFileSync(`${path.module}/jobspec.hcl`, "utf8"),
|
|
14
14
|
* canonicalize: false,
|
|
15
15
|
* });
|
|
16
16
|
* ```
|
|
@@ -61,7 +61,7 @@ export interface GetJobParserResult {
|
|
|
61
61
|
* import * as nomad from "@pulumi/nomad";
|
|
62
62
|
*
|
|
63
63
|
* const myJob = nomad.getJobParser({
|
|
64
|
-
* hcl: fs.readFileSync(`${path.module}/jobspec.hcl
|
|
64
|
+
* hcl: fs.readFileSync(`${path.module}/jobspec.hcl`, "utf8"),
|
|
65
65
|
* canonicalize: false,
|
|
66
66
|
* });
|
|
67
67
|
* ```
|
package/getJobParser.js
CHANGED
|
@@ -16,7 +16,7 @@ const utilities = require("./utilities");
|
|
|
16
16
|
* import * as nomad from "@pulumi/nomad";
|
|
17
17
|
*
|
|
18
18
|
* const myJob = nomad.getJobParser({
|
|
19
|
-
* hcl: fs.readFileSync(`${path.module}/jobspec.hcl
|
|
19
|
+
* hcl: fs.readFileSync(`${path.module}/jobspec.hcl`, "utf8"),
|
|
20
20
|
* canonicalize: false,
|
|
21
21
|
* });
|
|
22
22
|
* ```
|
|
@@ -40,7 +40,7 @@ exports.getJobParser = getJobParser;
|
|
|
40
40
|
* import * as nomad from "@pulumi/nomad";
|
|
41
41
|
*
|
|
42
42
|
* const myJob = nomad.getJobParser({
|
|
43
|
-
* hcl: fs.readFileSync(`${path.module}/jobspec.hcl
|
|
43
|
+
* hcl: fs.readFileSync(`${path.module}/jobspec.hcl`, "utf8"),
|
|
44
44
|
* canonicalize: false,
|
|
45
45
|
* });
|
|
46
46
|
* ```
|
package/package.json
CHANGED
package/types/input.d.ts
CHANGED
|
@@ -124,6 +124,9 @@ export interface CsiVolumeRegistrationTopologyRequest {
|
|
|
124
124
|
required?: pulumi.Input<inputs.CsiVolumeRegistrationTopologyRequestRequired>;
|
|
125
125
|
}
|
|
126
126
|
export interface CsiVolumeRegistrationTopologyRequestRequired {
|
|
127
|
+
/**
|
|
128
|
+
* `(List of segments: <required>)` - Defines the location for the volume.
|
|
129
|
+
*/
|
|
127
130
|
topologies: pulumi.Input<pulumi.Input<inputs.CsiVolumeRegistrationTopologyRequestRequiredTopology>[]>;
|
|
128
131
|
}
|
|
129
132
|
export interface CsiVolumeRegistrationTopologyRequestRequiredTopology {
|
|
@@ -159,6 +162,9 @@ export interface CsiVolumeTopologyRequest {
|
|
|
159
162
|
required?: pulumi.Input<inputs.CsiVolumeTopologyRequestRequired>;
|
|
160
163
|
}
|
|
161
164
|
export interface CsiVolumeTopologyRequestPreferred {
|
|
165
|
+
/**
|
|
166
|
+
* `(List of segments: <required>)` - Defines the location for the volume.
|
|
167
|
+
*/
|
|
162
168
|
topologies: pulumi.Input<pulumi.Input<inputs.CsiVolumeTopologyRequestPreferredTopology>[]>;
|
|
163
169
|
}
|
|
164
170
|
export interface CsiVolumeTopologyRequestPreferredTopology {
|
|
@@ -173,6 +179,9 @@ export interface CsiVolumeTopologyRequestPreferredTopology {
|
|
|
173
179
|
}>;
|
|
174
180
|
}
|
|
175
181
|
export interface CsiVolumeTopologyRequestRequired {
|
|
182
|
+
/**
|
|
183
|
+
* `(List of segments: <required>)` - Defines the location for the volume.
|
|
184
|
+
*/
|
|
176
185
|
topologies: pulumi.Input<pulumi.Input<inputs.CsiVolumeTopologyRequestRequiredTopology>[]>;
|
|
177
186
|
}
|
|
178
187
|
export interface CsiVolumeTopologyRequestRequiredTopology {
|
|
@@ -235,6 +244,9 @@ export interface ExternalVolumeTopologyRequest {
|
|
|
235
244
|
required?: pulumi.Input<inputs.ExternalVolumeTopologyRequestRequired>;
|
|
236
245
|
}
|
|
237
246
|
export interface ExternalVolumeTopologyRequestPreferred {
|
|
247
|
+
/**
|
|
248
|
+
* `(List of segments: <required>)` - Defines the location for the volume.
|
|
249
|
+
*/
|
|
238
250
|
topologies: pulumi.Input<pulumi.Input<inputs.ExternalVolumeTopologyRequestPreferredTopology>[]>;
|
|
239
251
|
}
|
|
240
252
|
export interface ExternalVolumeTopologyRequestPreferredTopology {
|
|
@@ -249,6 +261,9 @@ export interface ExternalVolumeTopologyRequestPreferredTopology {
|
|
|
249
261
|
}>;
|
|
250
262
|
}
|
|
251
263
|
export interface ExternalVolumeTopologyRequestRequired {
|
|
264
|
+
/**
|
|
265
|
+
* `(List of segments: <required>)` - Defines the location for the volume.
|
|
266
|
+
*/
|
|
252
267
|
topologies: pulumi.Input<pulumi.Input<inputs.ExternalVolumeTopologyRequestRequiredTopology>[]>;
|
|
253
268
|
}
|
|
254
269
|
export interface ExternalVolumeTopologyRequestRequiredTopology {
|
|
@@ -424,6 +439,9 @@ export interface VolumeTopologyRequest {
|
|
|
424
439
|
required?: pulumi.Input<inputs.VolumeTopologyRequestRequired>;
|
|
425
440
|
}
|
|
426
441
|
export interface VolumeTopologyRequestRequired {
|
|
442
|
+
/**
|
|
443
|
+
* `(List of segments: <required>)` - Defines the location for the volume.
|
|
444
|
+
*/
|
|
427
445
|
topologies: pulumi.Input<pulumi.Input<inputs.VolumeTopologyRequestRequiredTopology>[]>;
|
|
428
446
|
}
|
|
429
447
|
export interface VolumeTopologyRequestRequiredTopology {
|
package/types/output.d.ts
CHANGED
|
@@ -123,6 +123,9 @@ export interface CsiVolumeRegistrationTopologyRequest {
|
|
|
123
123
|
required?: outputs.CsiVolumeRegistrationTopologyRequestRequired;
|
|
124
124
|
}
|
|
125
125
|
export interface CsiVolumeRegistrationTopologyRequestRequired {
|
|
126
|
+
/**
|
|
127
|
+
* `(List of segments: <required>)` - Defines the location for the volume.
|
|
128
|
+
*/
|
|
126
129
|
topologies: outputs.CsiVolumeRegistrationTopologyRequestRequiredTopology[];
|
|
127
130
|
}
|
|
128
131
|
export interface CsiVolumeRegistrationTopologyRequestRequiredTopology {
|
|
@@ -158,6 +161,9 @@ export interface CsiVolumeTopologyRequest {
|
|
|
158
161
|
required?: outputs.CsiVolumeTopologyRequestRequired;
|
|
159
162
|
}
|
|
160
163
|
export interface CsiVolumeTopologyRequestPreferred {
|
|
164
|
+
/**
|
|
165
|
+
* `(List of segments: <required>)` - Defines the location for the volume.
|
|
166
|
+
*/
|
|
161
167
|
topologies: outputs.CsiVolumeTopologyRequestPreferredTopology[];
|
|
162
168
|
}
|
|
163
169
|
export interface CsiVolumeTopologyRequestPreferredTopology {
|
|
@@ -172,6 +178,9 @@ export interface CsiVolumeTopologyRequestPreferredTopology {
|
|
|
172
178
|
};
|
|
173
179
|
}
|
|
174
180
|
export interface CsiVolumeTopologyRequestRequired {
|
|
181
|
+
/**
|
|
182
|
+
* `(List of segments: <required>)` - Defines the location for the volume.
|
|
183
|
+
*/
|
|
175
184
|
topologies: outputs.CsiVolumeTopologyRequestRequiredTopology[];
|
|
176
185
|
}
|
|
177
186
|
export interface CsiVolumeTopologyRequestRequiredTopology {
|
|
@@ -234,6 +243,9 @@ export interface ExternalVolumeTopologyRequest {
|
|
|
234
243
|
required?: outputs.ExternalVolumeTopologyRequestRequired;
|
|
235
244
|
}
|
|
236
245
|
export interface ExternalVolumeTopologyRequestPreferred {
|
|
246
|
+
/**
|
|
247
|
+
* `(List of segments: <required>)` - Defines the location for the volume.
|
|
248
|
+
*/
|
|
237
249
|
topologies: outputs.ExternalVolumeTopologyRequestPreferredTopology[];
|
|
238
250
|
}
|
|
239
251
|
export interface ExternalVolumeTopologyRequestPreferredTopology {
|
|
@@ -248,6 +260,9 @@ export interface ExternalVolumeTopologyRequestPreferredTopology {
|
|
|
248
260
|
};
|
|
249
261
|
}
|
|
250
262
|
export interface ExternalVolumeTopologyRequestRequired {
|
|
263
|
+
/**
|
|
264
|
+
* `(List of segments: <required>)` - Defines the location for the volume.
|
|
265
|
+
*/
|
|
251
266
|
topologies: outputs.ExternalVolumeTopologyRequestRequiredTopology[];
|
|
252
267
|
}
|
|
253
268
|
export interface ExternalVolumeTopologyRequestRequiredTopology {
|
|
@@ -750,6 +765,9 @@ export interface VolumeTopologyRequest {
|
|
|
750
765
|
required?: outputs.VolumeTopologyRequestRequired;
|
|
751
766
|
}
|
|
752
767
|
export interface VolumeTopologyRequestRequired {
|
|
768
|
+
/**
|
|
769
|
+
* `(List of segments: <required>)` - Defines the location for the volume.
|
|
770
|
+
*/
|
|
753
771
|
topologies: outputs.VolumeTopologyRequestRequiredTopology[];
|
|
754
772
|
}
|
|
755
773
|
export interface VolumeTopologyRequestRequiredTopology {
|
package/utilities.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
1
2
|
export declare function getEnv(...vars: string[]): string | undefined;
|
|
2
3
|
export declare function getEnvBoolean(...vars: string[]): boolean | undefined;
|
|
3
4
|
export declare function getEnvNumber(...vars: string[]): number | undefined;
|
|
4
5
|
export declare function getVersion(): string;
|
|
6
|
+
export declare function callAsync<T>(tok: string, props: pulumi.Inputs, res?: pulumi.Resource, opts?: {
|
|
7
|
+
property?: string;
|
|
8
|
+
}): Promise<T>;
|
package/utilities.js
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
4
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.lazyLoad = exports.resourceOptsDefaults = exports.getVersion = exports.getEnvNumber = exports.getEnvBoolean = exports.getEnv = void 0;
|
|
14
|
+
exports.callAsync = exports.lazyLoad = exports.resourceOptsDefaults = exports.getVersion = exports.getEnvNumber = exports.getEnvBoolean = exports.getEnv = void 0;
|
|
15
|
+
const runtime = require("@pulumi/pulumi/runtime");
|
|
6
16
|
function getEnv(...vars) {
|
|
7
17
|
for (const v of vars) {
|
|
8
18
|
const value = process.env[v];
|
|
@@ -66,4 +76,26 @@ function lazyLoad(exports, props, loadModule) {
|
|
|
66
76
|
}
|
|
67
77
|
}
|
|
68
78
|
exports.lazyLoad = lazyLoad;
|
|
79
|
+
function callAsync(tok, props, res, opts) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
const o = runtime.call(tok, props, res);
|
|
82
|
+
const value = yield o.promise(true /*withUnknowns*/);
|
|
83
|
+
const isKnown = yield o.isKnown;
|
|
84
|
+
const isSecret = yield o.isSecret;
|
|
85
|
+
const problem = !isKnown ? "an unknown value"
|
|
86
|
+
: isSecret ? "a secret value"
|
|
87
|
+
: undefined;
|
|
88
|
+
// Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency.
|
|
89
|
+
if (problem) {
|
|
90
|
+
throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` +
|
|
91
|
+
"This is an error in the provider, please report this to the provider developer.");
|
|
92
|
+
}
|
|
93
|
+
// Extract a single property if requested.
|
|
94
|
+
if (opts && opts.property) {
|
|
95
|
+
return value[opts.property];
|
|
96
|
+
}
|
|
97
|
+
return value;
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
exports.callAsync = callAsync;
|
|
69
101
|
//# sourceMappingURL=utilities.js.map
|
package/utilities.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../utilities.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF
|
|
1
|
+
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../utilities.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;;;;;;;;;;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;QACtG,IAAI,OAAO,EAAE;YACT,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,0BAA0B,OAAO,IAAI;gBAC9E,iFAAiF,CAAC,CAAC;SAC1F;QACD,0CAA0C;QAC1C,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE;YACvB,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SAC/B;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CAAA;AAxBD,8BAwBC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var childProcess = require("child_process");
|
|
3
|
-
|
|
4
|
-
var args = process.argv.slice(2);
|
|
5
|
-
var res = childProcess.spawnSync("pulumi", ["plugin", "install"].concat(args), {
|
|
6
|
-
stdio: ["ignore", "inherit", "inherit"]
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
if (res.error && res.error.code === "ENOENT") {
|
|
10
|
-
console.error("\nThere was an error installing the resource provider plugin. " +
|
|
11
|
-
"It looks like `pulumi` is not installed on your system. " +
|
|
12
|
-
"Please visit https://pulumi.com/ to install the Pulumi CLI.\n" +
|
|
13
|
-
"You may try manually installing the plugin by running " +
|
|
14
|
-
"`pulumi plugin install " + args.join(" ") + "`");
|
|
15
|
-
} else if (res.error || res.status !== 0) {
|
|
16
|
-
console.error("\nThere was an error installing the resource provider plugin. " +
|
|
17
|
-
"You may try to manually installing the plugin by running " +
|
|
18
|
-
"`pulumi plugin install " + args.join(" ") + "`");
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
process.exit(0);
|