@pulumi-labs/modal 0.0.0-stage → 0.1.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/README.md +1 -3
- package/bin/config/index.d.ts +2 -0
- package/bin/config/index.d.ts.map +1 -0
- package/bin/config/index.js +21 -0
- package/bin/config/index.js.map +1 -0
- package/bin/config/vars.d.ts +17 -0
- package/bin/config/vars.d.ts.map +1 -0
- package/bin/config/vars.js +55 -0
- package/bin/config/vars.js.map +1 -0
- package/bin/index.d.ts +15 -0
- package/bin/index.d.ts.map +1 -0
- package/bin/index.js +67 -0
- package/bin/index.js.map +1 -0
- package/bin/package.json +37 -0
- package/bin/provider.d.ts +54 -0
- package/bin/provider.d.ts.map +1 -0
- package/bin/provider.js +67 -0
- package/bin/provider.js.map +1 -0
- package/bin/queue.d.ts +67 -0
- package/bin/queue.d.ts.map +1 -0
- package/bin/queue.js +92 -0
- package/bin/queue.js.map +1 -0
- package/bin/secret.d.ts +79 -0
- package/bin/secret.d.ts.map +1 -0
- package/bin/secret.js +97 -0
- package/bin/secret.js.map +1 -0
- package/bin/utilities.d.ts +5 -0
- package/bin/utilities.d.ts.map +1 -0
- package/bin/utilities.js +114 -0
- package/bin/utilities.js.map +1 -0
- package/bin/volume.d.ts +75 -0
- package/bin/volume.d.ts.map +1 -0
- package/bin/volume.js +94 -0
- package/bin/volume.js.map +1 -0
- package/package.json +36 -5
package/README.md
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
|
|
1
|
+
Experimental: manage Modal (modal.com) serverless compute resources — Secrets, Volumes, and Queues — as infrastructure with Pulumi.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
// Export members:
|
|
20
|
+
__exportStar(require("./vars"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;AAEjF,kBAAkB;AAClB,yCAAuB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default Modal environment (workspace namespace) for resources that don't set their own. Falls back to MODAL_ENVIRONMENT, then the account's default environment.
|
|
3
|
+
*/
|
|
4
|
+
export declare const environment: string | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Override for Modal's gRPC control-plane endpoint. Only used for testing.
|
|
7
|
+
*/
|
|
8
|
+
export declare const serverAddr: string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Modal API token ID. Falls back to the MODAL_TOKEN_ID environment variable.
|
|
11
|
+
*/
|
|
12
|
+
export declare const tokenId: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Modal API token secret. Falls back to the MODAL_TOKEN_SECRET environment variable.
|
|
15
|
+
*/
|
|
16
|
+
export declare const tokenSecret: string | undefined;
|
|
17
|
+
//# sourceMappingURL=vars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vars.d.ts","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;AAQrD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;AAQpD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;AAQjD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
29
|
+
const utilities = __importStar(require("../utilities"));
|
|
30
|
+
const __config = new pulumi.Config("modal");
|
|
31
|
+
Object.defineProperty(exports, "environment", {
|
|
32
|
+
get() {
|
|
33
|
+
return __config.get("environment") ?? utilities.getEnv("MODAL_ENVIRONMENT");
|
|
34
|
+
},
|
|
35
|
+
enumerable: true,
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "serverAddr", {
|
|
38
|
+
get() {
|
|
39
|
+
return __config.get("serverAddr") ?? utilities.getEnv("MODAL_SERVER_ADDR");
|
|
40
|
+
},
|
|
41
|
+
enumerable: true,
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "tokenId", {
|
|
44
|
+
get() {
|
|
45
|
+
return __config.get("tokenId") ?? utilities.getEnv("MODAL_TOKEN_ID");
|
|
46
|
+
},
|
|
47
|
+
enumerable: true,
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "tokenSecret", {
|
|
50
|
+
get() {
|
|
51
|
+
return __config.get("tokenSecret") ?? utilities.getEnv("MODAL_TOKEN_SECRET");
|
|
52
|
+
},
|
|
53
|
+
enumerable: true,
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=vars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,wDAA0C;AAG1C,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAM5C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE;IAC1C,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAChF,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE;IACzC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAC/E,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE;IACtC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IACzE,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE;IAC1C,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IACjF,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC"}
|
package/bin/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { ProviderArgs } from "./provider";
|
|
2
|
+
export type Provider = import("./provider").Provider;
|
|
3
|
+
export declare const Provider: typeof import("./provider").Provider;
|
|
4
|
+
export { QueueArgs } from "./queue";
|
|
5
|
+
export type Queue = import("./queue").Queue;
|
|
6
|
+
export declare const Queue: typeof import("./queue").Queue;
|
|
7
|
+
export { SecretArgs } from "./secret";
|
|
8
|
+
export type Secret = import("./secret").Secret;
|
|
9
|
+
export declare const Secret: typeof import("./secret").Secret;
|
|
10
|
+
export { VolumeArgs } from "./volume";
|
|
11
|
+
export type Volume = import("./volume").Volume;
|
|
12
|
+
export declare const Volume: typeof import("./volume").Volume;
|
|
13
|
+
import * as config from "./config";
|
|
14
|
+
export { config, };
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,MAAM,MAAM,QAAQ,GAAG,OAAO,YAAY,EAAE,QAAQ,CAAC;AACrD,eAAO,MAAM,QAAQ,EAAE,cAAc,YAAY,EAAE,QAAsB,CAAC;AAG1E,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,MAAM,MAAM,KAAK,GAAG,OAAO,SAAS,EAAE,KAAK,CAAC;AAC5C,eAAO,MAAM,KAAK,EAAE,cAAc,SAAS,EAAE,KAAmB,CAAC;AAGjE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,MAAM,MAAM,MAAM,GAAG,OAAO,UAAU,EAAE,MAAM,CAAC;AAC/C,eAAO,MAAM,MAAM,EAAE,cAAc,UAAU,EAAE,MAAoB,CAAC;AAGpE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,MAAM,MAAM,MAAM,GAAG,OAAO,UAAU,EAAE,MAAM,CAAC;AAC/C,eAAO,MAAM,MAAM,EAAE,cAAc,UAAU,EAAE,MAAoB,CAAC;AAKpE,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EACH,MAAM,GACT,CAAC"}
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.config = exports.Volume = exports.Secret = exports.Queue = exports.Provider = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
exports.Provider = null;
|
|
32
|
+
utilities.lazyLoad(exports, ["Provider"], () => require("./provider"));
|
|
33
|
+
exports.Queue = null;
|
|
34
|
+
utilities.lazyLoad(exports, ["Queue"], () => require("./queue"));
|
|
35
|
+
exports.Secret = null;
|
|
36
|
+
utilities.lazyLoad(exports, ["Secret"], () => require("./secret"));
|
|
37
|
+
exports.Volume = null;
|
|
38
|
+
utilities.lazyLoad(exports, ["Volume"], () => require("./volume"));
|
|
39
|
+
// Export sub-modules:
|
|
40
|
+
const config = __importStar(require("./config"));
|
|
41
|
+
exports.config = config;
|
|
42
|
+
const _module = {
|
|
43
|
+
version: utilities.getVersion(),
|
|
44
|
+
construct: (name, type, urn) => {
|
|
45
|
+
switch (type) {
|
|
46
|
+
case "modal:index:Queue":
|
|
47
|
+
return new exports.Queue(name, undefined, { urn });
|
|
48
|
+
case "modal:index:Secret":
|
|
49
|
+
return new exports.Secret(name, undefined, { urn });
|
|
50
|
+
case "modal:index:Volume":
|
|
51
|
+
return new exports.Volume(name, undefined, { urn });
|
|
52
|
+
default:
|
|
53
|
+
throw new Error(`unknown resource type ${type}`);
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
pulumi.runtime.registerResourceModule("modal", "index", _module);
|
|
58
|
+
pulumi.runtime.registerResourcePackage("modal", {
|
|
59
|
+
version: utilities.getVersion(),
|
|
60
|
+
constructProvider: (name, type, urn) => {
|
|
61
|
+
if (type !== "pulumi:providers:modal") {
|
|
62
|
+
throw new Error(`unknown provider type ${type}`);
|
|
63
|
+
}
|
|
64
|
+
return new exports.Provider(name, undefined, { urn });
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=index.js.map
|
package/bin/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;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,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACxD;IACL,CAAC;CACJ,CAAC;AACF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;AAChE,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,OAAO,EAAE;IAC5C,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE;IAC/B,iBAAiB,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,GAAW,EAA2B,EAAE;QACpF,IAAI,IAAI,KAAK,wBAAwB,EAAE;YACnC,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACpD;QACD,OAAO,IAAI,gBAAQ,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACvD,CAAC;CACJ,CAAC,CAAC"}
|
package/bin/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pulumi-labs/modal",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Experimental: manage Modal (modal.com) serverless compute resources \u2014 Secrets, Volumes, and Queues \u2014 as infrastructure with Pulumi.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pulumi",
|
|
7
|
+
"modal",
|
|
8
|
+
"serverless",
|
|
9
|
+
"ai",
|
|
10
|
+
"compute",
|
|
11
|
+
"category/cloud"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://modal.com",
|
|
14
|
+
"repository": "https://github.com/pulumi-labs/pulumi-modal",
|
|
15
|
+
"license": "Apache-2.0",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc && cp package.json bin/"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@pulumi/pulumi": "^3.142.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "^20",
|
|
24
|
+
"typescript": "^4.7.0"
|
|
25
|
+
},
|
|
26
|
+
"pulumi": {
|
|
27
|
+
"resource": true,
|
|
28
|
+
"name": "modal",
|
|
29
|
+
"version": "0.1.0",
|
|
30
|
+
"server": "github://api.github.com/pulumi-labs/pulumi-modal"
|
|
31
|
+
},
|
|
32
|
+
"main": "bin/index.js",
|
|
33
|
+
"types": "bin/index.d.ts",
|
|
34
|
+
"files": [
|
|
35
|
+
"bin/"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
export declare class Provider extends pulumi.ProviderResource {
|
|
3
|
+
/**
|
|
4
|
+
* Returns true if the given object is an instance of Provider. This is designed to work even
|
|
5
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
6
|
+
*/
|
|
7
|
+
static isInstance(obj: any): obj is Provider;
|
|
8
|
+
/**
|
|
9
|
+
* Default Modal environment (workspace namespace) for resources that don't set their own. Falls back to MODAL_ENVIRONMENT, then the account's default environment.
|
|
10
|
+
*/
|
|
11
|
+
readonly environment: pulumi.Output<string | undefined>;
|
|
12
|
+
/**
|
|
13
|
+
* Override for Modal's gRPC control-plane endpoint. Only used for testing.
|
|
14
|
+
*/
|
|
15
|
+
readonly serverAddr: pulumi.Output<string | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* Modal API token ID. Falls back to the MODAL_TOKEN_ID environment variable.
|
|
18
|
+
*/
|
|
19
|
+
readonly tokenId: pulumi.Output<string | undefined>;
|
|
20
|
+
/**
|
|
21
|
+
* Modal API token secret. Falls back to the MODAL_TOKEN_SECRET environment variable.
|
|
22
|
+
*/
|
|
23
|
+
readonly tokenSecret: pulumi.Output<string | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* Create a Provider resource with the given unique name, arguments, and options.
|
|
26
|
+
*
|
|
27
|
+
* @param name The _unique_ name of the resource.
|
|
28
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
29
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
30
|
+
*/
|
|
31
|
+
constructor(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The set of arguments for constructing a Provider resource.
|
|
35
|
+
*/
|
|
36
|
+
export interface ProviderArgs {
|
|
37
|
+
/**
|
|
38
|
+
* Default Modal environment (workspace namespace) for resources that don't set their own. Falls back to MODAL_ENVIRONMENT, then the account's default environment.
|
|
39
|
+
*/
|
|
40
|
+
environment?: pulumi.Input<string | undefined>;
|
|
41
|
+
/**
|
|
42
|
+
* Override for Modal's gRPC control-plane endpoint. Only used for testing.
|
|
43
|
+
*/
|
|
44
|
+
serverAddr?: pulumi.Input<string | undefined>;
|
|
45
|
+
/**
|
|
46
|
+
* Modal API token ID. Falls back to the MODAL_TOKEN_ID environment variable.
|
|
47
|
+
*/
|
|
48
|
+
tokenId?: pulumi.Input<string | undefined>;
|
|
49
|
+
/**
|
|
50
|
+
* Modal API token secret. Falls back to the MODAL_TOKEN_SECRET environment variable.
|
|
51
|
+
*/
|
|
52
|
+
tokenSecret?: pulumi.Input<string | undefined>;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC,qBAAa,QAAS,SAAQ,MAAM,CAAC,gBAAgB;IAIjD;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,QAAQ;IAOnD;;OAEG;IACH,SAAwB,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACvE;;OAEG;IACH,SAAwB,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACtE;;OAEG;IACH,SAAwB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACnE;;OAEG;IACH,SAAwB,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEvE;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,eAAe;CAc/E;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC9C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAClD"}
|
package/bin/provider.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Provider = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
class Provider extends pulumi.ProviderResource {
|
|
32
|
+
/** @internal */
|
|
33
|
+
static __pulumiType = 'modal';
|
|
34
|
+
/**
|
|
35
|
+
* Returns true if the given object is an instance of Provider. This is designed to work even
|
|
36
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
37
|
+
*/
|
|
38
|
+
static isInstance(obj) {
|
|
39
|
+
if (obj === undefined || obj === null) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Create a Provider resource with the given unique name, arguments, and options.
|
|
46
|
+
*
|
|
47
|
+
* @param name The _unique_ name of the resource.
|
|
48
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
49
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
50
|
+
*/
|
|
51
|
+
constructor(name, args, opts) {
|
|
52
|
+
let resourceInputs = {};
|
|
53
|
+
opts = opts || {};
|
|
54
|
+
{
|
|
55
|
+
resourceInputs["environment"] = (args?.environment) ?? utilities.getEnv("MODAL_ENVIRONMENT");
|
|
56
|
+
resourceInputs["serverAddr"] = (args?.serverAddr) ?? utilities.getEnv("MODAL_SERVER_ADDR");
|
|
57
|
+
resourceInputs["tokenId"] = (args?.tokenId ? pulumi.secret(args.tokenId) : undefined) ?? utilities.getEnv("MODAL_TOKEN_ID");
|
|
58
|
+
resourceInputs["tokenSecret"] = (args?.tokenSecret ? pulumi.secret(args.tokenSecret) : undefined) ?? utilities.getEnv("MODAL_TOKEN_SECRET");
|
|
59
|
+
}
|
|
60
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
61
|
+
const secretOpts = { additionalSecretOutputs: ["tokenId", "tokenSecret"] };
|
|
62
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
63
|
+
super(Provider.__pulumiType, name, resourceInputs, opts);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.Provider = Provider;
|
|
67
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,uDAAyC;AAEzC,MAAa,QAAS,SAAQ,MAAM,CAAC,gBAAgB;IACjD,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,OAAO,CAAC;IAE9C;;;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,cAAc,CAAC,KAAK,mBAAmB,GAAG,QAAQ,CAAC,YAAY,CAAC;IAC/E,CAAC;IAmBD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAmB,EAAE,IAA6B;QACxE,IAAI,cAAc,GAAkB,EAA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modal Functions, Sandboxes, and external callers. See https://modal.com/docs/guide/queues.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Queue extends pulumi.CustomResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get an existing Queue resource's state with the given name, ID, and optional extra
|
|
8
|
+
* properties used to qualify the lookup.
|
|
9
|
+
*
|
|
10
|
+
* @param name The _unique_ name of the resulting resource.
|
|
11
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
12
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
13
|
+
*/
|
|
14
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Queue;
|
|
15
|
+
/**
|
|
16
|
+
* Returns true if the given object is an instance of Queue. This is designed to work even
|
|
17
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
18
|
+
*/
|
|
19
|
+
static isInstance(obj: any): obj is Queue;
|
|
20
|
+
/**
|
|
21
|
+
* The Modal environment the queue lives in. Changing this forces a new resource.
|
|
22
|
+
*/
|
|
23
|
+
readonly environment: pulumi.Output<string | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* The queue's unique name. Changing this forces a new resource.
|
|
26
|
+
*/
|
|
27
|
+
readonly name: pulumi.Output<string>;
|
|
28
|
+
readonly queueId: pulumi.Output<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Modal API token ID. Overrides the provider-level tokenId.
|
|
31
|
+
*/
|
|
32
|
+
readonly tokenId: pulumi.Output<string | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* Modal API token secret. Overrides the provider-level tokenSecret.
|
|
35
|
+
*/
|
|
36
|
+
readonly tokenSecret: pulumi.Output<string | undefined>;
|
|
37
|
+
/**
|
|
38
|
+
* Create a Queue resource with the given unique name, arguments, and options.
|
|
39
|
+
*
|
|
40
|
+
* @param name The _unique_ name of the resource.
|
|
41
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
42
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
43
|
+
*/
|
|
44
|
+
constructor(name: string, args: QueueArgs, opts?: pulumi.CustomResourceOptions);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The set of arguments for constructing a Queue resource.
|
|
48
|
+
*/
|
|
49
|
+
export interface QueueArgs {
|
|
50
|
+
/**
|
|
51
|
+
* The Modal environment the queue lives in. Changing this forces a new resource.
|
|
52
|
+
*/
|
|
53
|
+
environment?: pulumi.Input<string | undefined>;
|
|
54
|
+
/**
|
|
55
|
+
* The queue's unique name. Changing this forces a new resource.
|
|
56
|
+
*/
|
|
57
|
+
name: pulumi.Input<string>;
|
|
58
|
+
/**
|
|
59
|
+
* Modal API token ID. Overrides the provider-level tokenId.
|
|
60
|
+
*/
|
|
61
|
+
tokenId?: pulumi.Input<string | undefined>;
|
|
62
|
+
/**
|
|
63
|
+
* Modal API token secret. Overrides the provider-level tokenSecret.
|
|
64
|
+
*/
|
|
65
|
+
tokenSecret?: pulumi.Input<string | undefined>;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../queue.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC;;GAEG;AACH,qBAAa,KAAM,SAAQ,MAAM,CAAC,cAAc;IAC5C;;;;;;;OAOG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,KAAK;IAOxG;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,KAAK;IAOhD;;OAEG;IACH,SAAwB,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACvE;;OAEG;IACH,SAAwB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpD,SAAgC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/D;;OAEG;IACH,SAAwB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACnE;;OAEG;IACH,SAAwB,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEvE;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB;CAwBjF;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAClD"}
|
package/bin/queue.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Queue = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* A Modal Queue — a distributed FIFO/LIFO queue for passing data between Modal Functions, Sandboxes, and external callers. See https://modal.com/docs/guide/queues.
|
|
33
|
+
*/
|
|
34
|
+
class Queue extends pulumi.CustomResource {
|
|
35
|
+
/**
|
|
36
|
+
* Get an existing Queue resource's state with the given name, ID, and optional extra
|
|
37
|
+
* properties used to qualify the lookup.
|
|
38
|
+
*
|
|
39
|
+
* @param name The _unique_ name of the resulting resource.
|
|
40
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
41
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
42
|
+
*/
|
|
43
|
+
static get(name, id, opts) {
|
|
44
|
+
return new Queue(name, undefined, { ...opts, id: id });
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
static __pulumiType = 'modal:index:Queue';
|
|
48
|
+
/**
|
|
49
|
+
* Returns true if the given object is an instance of Queue. This is designed to work even
|
|
50
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
51
|
+
*/
|
|
52
|
+
static isInstance(obj) {
|
|
53
|
+
if (obj === undefined || obj === null) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
return obj['__pulumiType'] === Queue.__pulumiType;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a Queue resource with the given unique name, arguments, and options.
|
|
60
|
+
*
|
|
61
|
+
* @param name The _unique_ name of the resource.
|
|
62
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
63
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
64
|
+
*/
|
|
65
|
+
constructor(name, args, opts) {
|
|
66
|
+
let resourceInputs = {};
|
|
67
|
+
opts = opts || {};
|
|
68
|
+
if (!opts.id) {
|
|
69
|
+
if (args?.name === undefined && !opts.urn) {
|
|
70
|
+
throw new Error("Missing required property 'name'");
|
|
71
|
+
}
|
|
72
|
+
resourceInputs["environment"] = args?.environment;
|
|
73
|
+
resourceInputs["name"] = args?.name;
|
|
74
|
+
resourceInputs["tokenId"] = args?.tokenId ? pulumi.secret(args.tokenId) : undefined;
|
|
75
|
+
resourceInputs["tokenSecret"] = args?.tokenSecret ? pulumi.secret(args.tokenSecret) : undefined;
|
|
76
|
+
resourceInputs["queueId"] = undefined /*out*/;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
resourceInputs["environment"] = undefined /*out*/;
|
|
80
|
+
resourceInputs["name"] = undefined /*out*/;
|
|
81
|
+
resourceInputs["queueId"] = undefined /*out*/;
|
|
82
|
+
resourceInputs["tokenId"] = undefined /*out*/;
|
|
83
|
+
resourceInputs["tokenSecret"] = undefined /*out*/;
|
|
84
|
+
}
|
|
85
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
86
|
+
const secretOpts = { additionalSecretOutputs: ["tokenId", "tokenSecret"] };
|
|
87
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
88
|
+
super(Queue.__pulumiType, name, resourceInputs, opts);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.Queue = Queue;
|
|
92
|
+
//# sourceMappingURL=queue.js.map
|
package/bin/queue.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../queue.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,uDAAyC;AAEzC;;GAEG;AACH,MAAa,KAAM,SAAQ,MAAM,CAAC,cAAc;IAC5C;;;;;;;OAOG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,IAAmC;QAC5F,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,SAAgB,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,mBAAmB,CAAC;IAE1D;;;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,cAAc,CAAC,KAAK,KAAK,CAAC,YAAY,CAAC;IACtD,CAAC;IAoBD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAe,EAAE,IAAmC;QAC1E,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACV,IAAI,IAAI,EAAE,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACvC,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;aACvD;YACD,cAA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"@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* A durable, named Modal Secret — a collection of key/value pairs Modal Functions mount as environment variables. See https://modal.com/docs/guide/secrets.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Secret extends pulumi.CustomResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get an existing Secret resource's state with the given name, ID, and optional extra
|
|
8
|
+
* properties used to qualify the lookup.
|
|
9
|
+
*
|
|
10
|
+
* @param name The _unique_ name of the resulting resource.
|
|
11
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
12
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
13
|
+
*/
|
|
14
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Secret;
|
|
15
|
+
/**
|
|
16
|
+
* Returns true if the given object is an instance of Secret. This is designed to work even
|
|
17
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
18
|
+
*/
|
|
19
|
+
static isInstance(obj: any): obj is Secret;
|
|
20
|
+
/**
|
|
21
|
+
* The Modal environment the Secret lives in. Changing this forces a new resource.
|
|
22
|
+
*/
|
|
23
|
+
readonly environment: pulumi.Output<string | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* The unique Secret name. Changing this forces a new resource.
|
|
26
|
+
*/
|
|
27
|
+
readonly name: pulumi.Output<string>;
|
|
28
|
+
readonly secretId: pulumi.Output<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Modal API token ID. Overrides the provider-level tokenId.
|
|
31
|
+
*/
|
|
32
|
+
readonly tokenId: pulumi.Output<string | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* Modal API token secret. Overrides the provider-level tokenSecret.
|
|
35
|
+
*/
|
|
36
|
+
readonly tokenSecret: pulumi.Output<string | undefined>;
|
|
37
|
+
/**
|
|
38
|
+
* Key/value pairs exposed as environment variables to Functions that mount this Secret.
|
|
39
|
+
*/
|
|
40
|
+
readonly values: pulumi.Output<{
|
|
41
|
+
[key: string]: string;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Create a Secret resource with the given unique name, arguments, and options.
|
|
45
|
+
*
|
|
46
|
+
* @param name The _unique_ name of the resource.
|
|
47
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
48
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
49
|
+
*/
|
|
50
|
+
constructor(name: string, args: SecretArgs, opts?: pulumi.CustomResourceOptions);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The set of arguments for constructing a Secret resource.
|
|
54
|
+
*/
|
|
55
|
+
export interface SecretArgs {
|
|
56
|
+
/**
|
|
57
|
+
* The Modal environment the Secret lives in. Changing this forces a new resource.
|
|
58
|
+
*/
|
|
59
|
+
environment?: pulumi.Input<string | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* The unique Secret name. Changing this forces a new resource.
|
|
62
|
+
*/
|
|
63
|
+
name: pulumi.Input<string>;
|
|
64
|
+
/**
|
|
65
|
+
* Modal API token ID. Overrides the provider-level tokenId.
|
|
66
|
+
*/
|
|
67
|
+
tokenId?: pulumi.Input<string | undefined>;
|
|
68
|
+
/**
|
|
69
|
+
* Modal API token secret. Overrides the provider-level tokenSecret.
|
|
70
|
+
*/
|
|
71
|
+
tokenSecret?: pulumi.Input<string | undefined>;
|
|
72
|
+
/**
|
|
73
|
+
* Key/value pairs exposed as environment variables to Functions that mount this Secret.
|
|
74
|
+
*/
|
|
75
|
+
values: pulumi.Input<{
|
|
76
|
+
[key: string]: pulumi.Input<string>;
|
|
77
|
+
}>;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=secret.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret.d.ts","sourceRoot":"","sources":["../secret.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC;;GAEG;AACH,qBAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAC7C;;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AAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;KAAC,CAAC,CAAC;CAC/D"}
|
package/bin/secret.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Secret = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* A durable, named Modal Secret — a collection of key/value pairs Modal Functions mount as environment variables. See https://modal.com/docs/guide/secrets.
|
|
33
|
+
*/
|
|
34
|
+
class Secret extends pulumi.CustomResource {
|
|
35
|
+
/**
|
|
36
|
+
* Get an existing Secret resource's state with the given name, ID, and optional extra
|
|
37
|
+
* properties used to qualify the lookup.
|
|
38
|
+
*
|
|
39
|
+
* @param name The _unique_ name of the resulting resource.
|
|
40
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
41
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
42
|
+
*/
|
|
43
|
+
static get(name, id, opts) {
|
|
44
|
+
return new Secret(name, undefined, { ...opts, id: id });
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
static __pulumiType = 'modal:index:Secret';
|
|
48
|
+
/**
|
|
49
|
+
* Returns true if the given object is an instance of Secret. This is designed to work even
|
|
50
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
51
|
+
*/
|
|
52
|
+
static isInstance(obj) {
|
|
53
|
+
if (obj === undefined || obj === null) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
return obj['__pulumiType'] === Secret.__pulumiType;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a Secret resource with the given unique name, arguments, and options.
|
|
60
|
+
*
|
|
61
|
+
* @param name The _unique_ name of the resource.
|
|
62
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
63
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
64
|
+
*/
|
|
65
|
+
constructor(name, args, opts) {
|
|
66
|
+
let resourceInputs = {};
|
|
67
|
+
opts = opts || {};
|
|
68
|
+
if (!opts.id) {
|
|
69
|
+
if (args?.name === undefined && !opts.urn) {
|
|
70
|
+
throw new Error("Missing required property 'name'");
|
|
71
|
+
}
|
|
72
|
+
if (args?.values === undefined && !opts.urn) {
|
|
73
|
+
throw new Error("Missing required property 'values'");
|
|
74
|
+
}
|
|
75
|
+
resourceInputs["environment"] = args?.environment;
|
|
76
|
+
resourceInputs["name"] = args?.name;
|
|
77
|
+
resourceInputs["tokenId"] = args?.tokenId ? pulumi.secret(args.tokenId) : undefined;
|
|
78
|
+
resourceInputs["tokenSecret"] = args?.tokenSecret ? pulumi.secret(args.tokenSecret) : undefined;
|
|
79
|
+
resourceInputs["values"] = args?.values ? pulumi.secret(args.values) : undefined;
|
|
80
|
+
resourceInputs["secretId"] = undefined /*out*/;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
resourceInputs["environment"] = undefined /*out*/;
|
|
84
|
+
resourceInputs["name"] = undefined /*out*/;
|
|
85
|
+
resourceInputs["secretId"] = undefined /*out*/;
|
|
86
|
+
resourceInputs["tokenId"] = undefined /*out*/;
|
|
87
|
+
resourceInputs["tokenSecret"] = undefined /*out*/;
|
|
88
|
+
resourceInputs["values"] = undefined /*out*/;
|
|
89
|
+
}
|
|
90
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
91
|
+
const secretOpts = { additionalSecretOutputs: ["tokenId", "tokenSecret", "values"] };
|
|
92
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
93
|
+
super(Secret.__pulumiType, name, resourceInputs, opts);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.Secret = Secret;
|
|
97
|
+
//# sourceMappingURL=secret.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret.js","sourceRoot":"","sources":["../secret.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,uDAAyC;AAEzC;;GAEG;AACH,MAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAC7C;;;;;;;O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IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAChG,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACjF,cAAc,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAClD;aAAM;YACH,cAAc,CAAC,aAAa,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAClD,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC3C,cAAc,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC/C,cAAc,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC9C,cAAc,CAAC,aAAa,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAClD,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAChD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,CAAC;QACrF,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;;AApFL,wBAqFC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function getEnv(...vars: string[]): string | undefined;
|
|
2
|
+
export declare function getEnvBoolean(...vars: string[]): boolean | undefined;
|
|
3
|
+
export declare function getEnvNumber(...vars: string[]): number | undefined;
|
|
4
|
+
export declare function getVersion(): string;
|
|
5
|
+
//# sourceMappingURL=utilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../utilities.ts"],"names":[],"mappings":"AAOA,wBAAgB,MAAM,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAQ5D;AAED,wBAAgB,aAAa,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,GAAG,SAAS,CAapE;AAED,wBAAgB,YAAY,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CASlE;AAED,wBAAgB,UAAU,IAAI,MAAM,CAQnC"}
|
package/bin/utilities.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.callAsync = exports.lazyLoad = exports.resourceOptsDefaults = exports.getVersion = exports.getEnvNumber = exports.getEnvBoolean = exports.getEnv = void 0;
|
|
29
|
+
const runtime = __importStar(require("@pulumi/pulumi/runtime"));
|
|
30
|
+
function getEnv(...vars) {
|
|
31
|
+
for (const v of vars) {
|
|
32
|
+
const value = process.env[v];
|
|
33
|
+
if (value) {
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
exports.getEnv = getEnv;
|
|
40
|
+
function getEnvBoolean(...vars) {
|
|
41
|
+
const s = getEnv(...vars);
|
|
42
|
+
if (s !== undefined) {
|
|
43
|
+
// NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what
|
|
44
|
+
// Terraform uses internally when parsing boolean values.
|
|
45
|
+
if (["1", "t", "T", "true", "TRUE", "True"].find(v => v === s) !== undefined) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
if (["0", "f", "F", "false", "FALSE", "False"].find(v => v === s) !== undefined) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
exports.getEnvBoolean = getEnvBoolean;
|
|
55
|
+
function getEnvNumber(...vars) {
|
|
56
|
+
const s = getEnv(...vars);
|
|
57
|
+
if (s !== undefined) {
|
|
58
|
+
const f = parseFloat(s);
|
|
59
|
+
if (!isNaN(f)) {
|
|
60
|
+
return f;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
exports.getEnvNumber = getEnvNumber;
|
|
66
|
+
function getVersion() {
|
|
67
|
+
let version = require('./package.json').version;
|
|
68
|
+
// Node allows for the version to be prefixed by a "v", while semver doesn't.
|
|
69
|
+
// If there is a v, strip it off.
|
|
70
|
+
if (version.indexOf('v') === 0) {
|
|
71
|
+
version = version.slice(1);
|
|
72
|
+
}
|
|
73
|
+
return version;
|
|
74
|
+
}
|
|
75
|
+
exports.getVersion = getVersion;
|
|
76
|
+
/** @internal */
|
|
77
|
+
function resourceOptsDefaults() {
|
|
78
|
+
return { version: getVersion(), pluginDownloadURL: "github://api.github.com/pulumi-labs/pulumi-modal" };
|
|
79
|
+
}
|
|
80
|
+
exports.resourceOptsDefaults = resourceOptsDefaults;
|
|
81
|
+
/** @internal */
|
|
82
|
+
function lazyLoad(exports, props, loadModule) {
|
|
83
|
+
for (let property of props) {
|
|
84
|
+
Object.defineProperty(exports, property, {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return loadModule()[property];
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.lazyLoad = lazyLoad;
|
|
93
|
+
/** @internal */
|
|
94
|
+
async function callAsync(tok, props, res, opts) {
|
|
95
|
+
const o = runtime.call(tok, props, res);
|
|
96
|
+
const value = await o.promise(true /*withUnknowns*/);
|
|
97
|
+
const isKnown = await o.isKnown;
|
|
98
|
+
const isSecret = await o.isSecret;
|
|
99
|
+
const problem = !isKnown ? "an unknown value"
|
|
100
|
+
: isSecret ? "a secret value"
|
|
101
|
+
: undefined;
|
|
102
|
+
// Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency.
|
|
103
|
+
if (problem) {
|
|
104
|
+
throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` +
|
|
105
|
+
"This is an error in the provider, please report this to the provider developer.");
|
|
106
|
+
}
|
|
107
|
+
// Extract a single property if requested.
|
|
108
|
+
if (opts && opts.property) {
|
|
109
|
+
return value[opts.property];
|
|
110
|
+
}
|
|
111
|
+
return value;
|
|
112
|
+
}
|
|
113
|
+
exports.callAsync = callAsync;
|
|
114
|
+
//# sourceMappingURL=utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../utilities.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAGjF,gEAAkD;AAGlD,SAAgB,MAAM,CAAC,GAAG,IAAc;IACpC,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE;QAClB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,KAAK,EAAE;YACP,OAAO,KAAK,CAAC;SAChB;KACJ;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AARD,wBAQC;AAED,SAAgB,aAAa,CAAC,GAAG,IAAc;IAC3C,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;IAC1B,IAAI,CAAC,KAAK,SAAS,EAAE;QACjB,uGAAuG;QACvG,yDAAyD;QACzD,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,SAAS,EAAE;YAC1E,OAAO,IAAI,CAAC;SACf;QACD,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,SAAS,EAAE;YAC7E,OAAO,KAAK,CAAC;SAChB;KACJ;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAbD,sCAaC;A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EAAE,GAAG,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,OAAO,CAAC;IAChC,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,QAAQ,CAAC;IAClC,MAAM,OAAO,GACT,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB;QAC7B,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB;YAC7B,CAAC,CAAC,SAAS,CAAC;IAChB,sGAAsG;IACtG,IAAI,OAAO,EAAE;QACT,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,0BAA0B,OAAO,IAAI;YAC9E,iFAAiF,CAAC,CAAC;KAC1F;IACD,0CAA0C;IAC1C,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE;QACvB,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC/B;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAxBD,8BAwBC"}
|
package/bin/volume.d.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* A Modal Volume — a persistent, distributed filesystem mountable into Modal Functions and Sandboxes for caching model weights, datasets, or other large files across runs. See https://modal.com/docs/guide/volumes.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Volume extends pulumi.CustomResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get an existing Volume resource's state with the given name, ID, and optional extra
|
|
8
|
+
* properties used to qualify the lookup.
|
|
9
|
+
*
|
|
10
|
+
* @param name The _unique_ name of the resulting resource.
|
|
11
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
12
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
13
|
+
*/
|
|
14
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Volume;
|
|
15
|
+
/**
|
|
16
|
+
* Returns true if the given object is an instance of Volume. This is designed to work even
|
|
17
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
18
|
+
*/
|
|
19
|
+
static isInstance(obj: any): obj is Volume;
|
|
20
|
+
/**
|
|
21
|
+
* The Modal environment the volume lives in. Changing this forces a new resource.
|
|
22
|
+
*/
|
|
23
|
+
readonly environment: pulumi.Output<string | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* The volume's unique name. Changing this forces a new resource.
|
|
26
|
+
*/
|
|
27
|
+
readonly name: pulumi.Output<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Modal API token ID. Overrides the provider-level tokenId.
|
|
30
|
+
*/
|
|
31
|
+
readonly tokenId: pulumi.Output<string | undefined>;
|
|
32
|
+
/**
|
|
33
|
+
* Modal API token secret. Overrides the provider-level tokenSecret.
|
|
34
|
+
*/
|
|
35
|
+
readonly tokenSecret: pulumi.Output<string | undefined>;
|
|
36
|
+
/**
|
|
37
|
+
* Volume filesystem version: "v1" or "v2" (default). Changing this forces a new resource.
|
|
38
|
+
*/
|
|
39
|
+
readonly version: pulumi.Output<string | undefined>;
|
|
40
|
+
readonly volumeId: pulumi.Output<string>;
|
|
41
|
+
/**
|
|
42
|
+
* Create a Volume resource with the given unique name, arguments, and options.
|
|
43
|
+
*
|
|
44
|
+
* @param name The _unique_ name of the resource.
|
|
45
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
46
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
47
|
+
*/
|
|
48
|
+
constructor(name: string, args: VolumeArgs, opts?: pulumi.CustomResourceOptions);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The set of arguments for constructing a Volume resource.
|
|
52
|
+
*/
|
|
53
|
+
export interface VolumeArgs {
|
|
54
|
+
/**
|
|
55
|
+
* The Modal environment the volume lives in. Changing this forces a new resource.
|
|
56
|
+
*/
|
|
57
|
+
environment?: pulumi.Input<string | undefined>;
|
|
58
|
+
/**
|
|
59
|
+
* The volume's unique name. Changing this forces a new resource.
|
|
60
|
+
*/
|
|
61
|
+
name: pulumi.Input<string>;
|
|
62
|
+
/**
|
|
63
|
+
* Modal API token ID. Overrides the provider-level tokenId.
|
|
64
|
+
*/
|
|
65
|
+
tokenId?: pulumi.Input<string | undefined>;
|
|
66
|
+
/**
|
|
67
|
+
* Modal API token secret. Overrides the provider-level tokenSecret.
|
|
68
|
+
*/
|
|
69
|
+
tokenSecret?: pulumi.Input<string | undefined>;
|
|
70
|
+
/**
|
|
71
|
+
* Volume filesystem version: "v1" or "v2" (default). Changing this forces a new resource.
|
|
72
|
+
*/
|
|
73
|
+
version?: pulumi.Input<string | undefined>;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=volume.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"volume.d.ts","sourceRoot":"","sources":["../volume.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC;;GAEG;AACH,qBAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAC7C;;;;;;;OAOG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,MAAM;IAOzG;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,MAAM;IAOjD;;OAEG;IACH,SAAwB,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACvE;;OAEG;IACH,SAAwB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpD;;OAEG;IACH,SAAwB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACnE;;OAEG;IACH,SAAwB,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACvE;;OAEG;IACH,SAAwB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACnE,SAAgC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAEhE;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB;CA0BlF;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC9C"}
|
package/bin/volume.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Volume = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* A Modal Volume — a persistent, distributed filesystem mountable into Modal Functions and Sandboxes for caching model weights, datasets, or other large files across runs. See https://modal.com/docs/guide/volumes.
|
|
33
|
+
*/
|
|
34
|
+
class Volume extends pulumi.CustomResource {
|
|
35
|
+
/**
|
|
36
|
+
* Get an existing Volume resource's state with the given name, ID, and optional extra
|
|
37
|
+
* properties used to qualify the lookup.
|
|
38
|
+
*
|
|
39
|
+
* @param name The _unique_ name of the resulting resource.
|
|
40
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
41
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
42
|
+
*/
|
|
43
|
+
static get(name, id, opts) {
|
|
44
|
+
return new Volume(name, undefined, { ...opts, id: id });
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
static __pulumiType = 'modal:index:Volume';
|
|
48
|
+
/**
|
|
49
|
+
* Returns true if the given object is an instance of Volume. This is designed to work even
|
|
50
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
51
|
+
*/
|
|
52
|
+
static isInstance(obj) {
|
|
53
|
+
if (obj === undefined || obj === null) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
return obj['__pulumiType'] === Volume.__pulumiType;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a Volume resource with the given unique name, arguments, and options.
|
|
60
|
+
*
|
|
61
|
+
* @param name The _unique_ name of the resource.
|
|
62
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
63
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
64
|
+
*/
|
|
65
|
+
constructor(name, args, opts) {
|
|
66
|
+
let resourceInputs = {};
|
|
67
|
+
opts = opts || {};
|
|
68
|
+
if (!opts.id) {
|
|
69
|
+
if (args?.name === undefined && !opts.urn) {
|
|
70
|
+
throw new Error("Missing required property 'name'");
|
|
71
|
+
}
|
|
72
|
+
resourceInputs["environment"] = args?.environment;
|
|
73
|
+
resourceInputs["name"] = args?.name;
|
|
74
|
+
resourceInputs["tokenId"] = args?.tokenId ? pulumi.secret(args.tokenId) : undefined;
|
|
75
|
+
resourceInputs["tokenSecret"] = args?.tokenSecret ? pulumi.secret(args.tokenSecret) : undefined;
|
|
76
|
+
resourceInputs["version"] = args?.version;
|
|
77
|
+
resourceInputs["volumeId"] = undefined /*out*/;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
resourceInputs["environment"] = undefined /*out*/;
|
|
81
|
+
resourceInputs["name"] = undefined /*out*/;
|
|
82
|
+
resourceInputs["tokenId"] = undefined /*out*/;
|
|
83
|
+
resourceInputs["tokenSecret"] = undefined /*out*/;
|
|
84
|
+
resourceInputs["version"] = undefined /*out*/;
|
|
85
|
+
resourceInputs["volumeId"] = undefined /*out*/;
|
|
86
|
+
}
|
|
87
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
88
|
+
const secretOpts = { additionalSecretOutputs: ["tokenId", "tokenSecret"] };
|
|
89
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
90
|
+
super(Volume.__pulumiType, name, resourceInputs, opts);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.Volume = Volume;
|
|
94
|
+
//# sourceMappingURL=volume.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"volume.js","sourceRoot":"","sources":["../volume.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,uDAAyC;AAEzC;;GAEG;AACH,MAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAC7C;;;;;;;OAOG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,IAAmC;QAC5F,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,SAAgB,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,oBAAoB,CAAC;IAE3D;;;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,cAAc,CAAC,KAAK,MAAM,CAAC,YAAY,CAAC;IACvD,CAAC;IAwBD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAgB,EAAE,IAAmC;QAC3E,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACV,IAAI,IAAI,EAAE,IAAI,KAAK,SA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AY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;;AAjFL,wBAkFC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@pulumi-labs/modal",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Experimental: manage Modal (modal.com) serverless compute resources \u2014 Secrets, Volumes, and Queues \u2014 as infrastructure with Pulumi.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pulumi",
|
|
7
|
+
"modal",
|
|
8
|
+
"serverless",
|
|
9
|
+
"ai",
|
|
10
|
+
"compute",
|
|
11
|
+
"category/cloud"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://modal.com",
|
|
14
|
+
"repository": "https://github.com/pulumi-labs/pulumi-modal",
|
|
15
|
+
"license": "Apache-2.0",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc && cp package.json bin/"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@pulumi/pulumi": "^3.142.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "^20",
|
|
24
|
+
"typescript": "^4.7.0"
|
|
25
|
+
},
|
|
26
|
+
"pulumi": {
|
|
27
|
+
"resource": true,
|
|
28
|
+
"name": "modal",
|
|
29
|
+
"version": "0.1.0",
|
|
30
|
+
"server": "github://api.github.com/pulumi-labs/pulumi-modal"
|
|
31
|
+
},
|
|
32
|
+
"main": "bin/index.js",
|
|
33
|
+
"types": "bin/index.d.ts",
|
|
34
|
+
"files": [
|
|
35
|
+
"bin/"
|
|
36
|
+
]
|
|
37
|
+
}
|