@quantcdn/pulumi-quant 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/.gitattributes +1 -0
- package/Pulumi.yaml +3 -0
- package/README.md +4 -0
- package/application.ts +281 -0
- package/config/index.ts +5 -0
- package/config/vars.ts +108 -0
- package/crawler.ts +493 -0
- package/crawlerSchedule.ts +214 -0
- package/cronJob.ts +215 -0
- package/domain.ts +144 -0
- package/environment.ts +287 -0
- package/getProject.ts +54 -0
- package/getProjects.ts +29 -0
- package/header.ts +97 -0
- package/index.ts +189 -0
- package/kvItem.ts +165 -0
- package/kvStore.ts +122 -0
- package/package.json +31 -0
- package/project.ts +214 -0
- package/provider.ts +128 -0
- package/ruleAuth.ts +397 -0
- package/ruleBotChallenge.ts +406 -0
- package/ruleContentFilter.ts +378 -0
- package/ruleCustomResponse.ts +420 -0
- package/ruleFunction.ts +378 -0
- package/ruleHeaders.ts +378 -0
- package/ruleProxy.ts +687 -0
- package/ruleRedirect.ts +365 -0
- package/ruleServeStatic.ts +378 -0
- package/tsconfig.json +47 -0
- package/types/index.ts +13 -0
- package/types/input.ts +585 -0
- package/types/output.ts +591 -0
- package/utilities.ts +96 -0
- package/volume.ts +210 -0
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* linguist-generated
|
package/Pulumi.yaml
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
> This provider is a derived work of the [Terraform Provider](https://github.com/quantcdn/terraform-provider-quant)
|
|
2
|
+
> distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,
|
|
3
|
+
> first check the [`pulumi-quant` repo](https://github.com/quantcdn/pulumi-quant/issues); however, if that doesn't turn up anything,
|
|
4
|
+
> please consult the source [`terraform-provider-quant` repo](https://github.com/quantcdn/terraform-provider-quant/issues).
|
package/application.ts
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as utilities from "./utilities";
|
|
6
|
+
|
|
7
|
+
export class Application extends pulumi.CustomResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get an existing Application resource's state with the given name, ID, and optional extra
|
|
10
|
+
* properties used to qualify the lookup.
|
|
11
|
+
*
|
|
12
|
+
* @param name The _unique_ name of the resulting resource.
|
|
13
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
14
|
+
* @param state Any extra arguments used during the lookup.
|
|
15
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
16
|
+
*/
|
|
17
|
+
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ApplicationState, opts?: pulumi.CustomResourceOptions): Application {
|
|
18
|
+
return new Application(name, <any>state, { ...opts, id: id });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
public static readonly __pulumiType = 'quant:index:Application';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns true if the given object is an instance of Application. This is designed to work even
|
|
26
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
27
|
+
*/
|
|
28
|
+
public static isInstance(obj: any): obj is Application {
|
|
29
|
+
if (obj === undefined || obj === null) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return obj['__pulumiType'] === Application.__pulumiType;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Application name
|
|
37
|
+
*/
|
|
38
|
+
declare public readonly appName: pulumi.Output<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Compose definition as a JSON string. Defines containers, CPU, memory, networking, and other task configuration.
|
|
41
|
+
*/
|
|
42
|
+
declare public readonly composeDefinition: pulumi.Output<string>;
|
|
43
|
+
/**
|
|
44
|
+
* List of container names as a JSON array
|
|
45
|
+
*/
|
|
46
|
+
declare public /*out*/ readonly containerNames: pulumi.Output<string>;
|
|
47
|
+
/**
|
|
48
|
+
* Database engine type (mysql, postgres)
|
|
49
|
+
*/
|
|
50
|
+
declare public readonly databaseEngine: pulumi.Output<string>;
|
|
51
|
+
/**
|
|
52
|
+
* RDS instance class
|
|
53
|
+
*/
|
|
54
|
+
declare public readonly databaseInstanceClass: pulumi.Output<string>;
|
|
55
|
+
/**
|
|
56
|
+
* Enable Multi-AZ database deployment
|
|
57
|
+
*/
|
|
58
|
+
declare public readonly databaseMultiAz: pulumi.Output<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* Database allocated storage in GiB
|
|
61
|
+
*/
|
|
62
|
+
declare public readonly databaseStorageGb: pulumi.Output<number>;
|
|
63
|
+
/**
|
|
64
|
+
* Desired task count
|
|
65
|
+
*/
|
|
66
|
+
declare public /*out*/ readonly desiredCount: pulumi.Output<number>;
|
|
67
|
+
/**
|
|
68
|
+
* Initial environment variables as a JSON array of {name, value} objects
|
|
69
|
+
*/
|
|
70
|
+
declare public readonly environment: pulumi.Output<string>;
|
|
71
|
+
/**
|
|
72
|
+
* Mount path inside containers for the shared filesystem
|
|
73
|
+
*/
|
|
74
|
+
declare public readonly filesystemMountPath: pulumi.Output<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Whether to create a shared filesystem
|
|
77
|
+
*/
|
|
78
|
+
declare public readonly filesystemRequired: pulumi.Output<boolean>;
|
|
79
|
+
/**
|
|
80
|
+
* Maximum task count for auto-scaling
|
|
81
|
+
*/
|
|
82
|
+
declare public readonly maxCapacity: pulumi.Output<number>;
|
|
83
|
+
/**
|
|
84
|
+
* Minimum task count for auto-scaling
|
|
85
|
+
*/
|
|
86
|
+
declare public readonly minCapacity: pulumi.Output<number>;
|
|
87
|
+
/**
|
|
88
|
+
* Organization machine name. Defaults to the provider-level organization.
|
|
89
|
+
*/
|
|
90
|
+
declare public readonly organization: pulumi.Output<string>;
|
|
91
|
+
/**
|
|
92
|
+
* Currently running task count
|
|
93
|
+
*/
|
|
94
|
+
declare public /*out*/ readonly runningCount: pulumi.Output<number>;
|
|
95
|
+
/**
|
|
96
|
+
* Application status
|
|
97
|
+
*/
|
|
98
|
+
declare public /*out*/ readonly status: pulumi.Output<string>;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Create a Application resource with the given unique name, arguments, and options.
|
|
102
|
+
*
|
|
103
|
+
* @param name The _unique_ name of the resource.
|
|
104
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
105
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
106
|
+
*/
|
|
107
|
+
constructor(name: string, args: ApplicationArgs, opts?: pulumi.CustomResourceOptions)
|
|
108
|
+
constructor(name: string, argsOrState?: ApplicationArgs | ApplicationState, opts?: pulumi.CustomResourceOptions) {
|
|
109
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
110
|
+
opts = opts || {};
|
|
111
|
+
if (opts.id) {
|
|
112
|
+
const state = argsOrState as ApplicationState | undefined;
|
|
113
|
+
resourceInputs["appName"] = state?.appName;
|
|
114
|
+
resourceInputs["composeDefinition"] = state?.composeDefinition;
|
|
115
|
+
resourceInputs["containerNames"] = state?.containerNames;
|
|
116
|
+
resourceInputs["databaseEngine"] = state?.databaseEngine;
|
|
117
|
+
resourceInputs["databaseInstanceClass"] = state?.databaseInstanceClass;
|
|
118
|
+
resourceInputs["databaseMultiAz"] = state?.databaseMultiAz;
|
|
119
|
+
resourceInputs["databaseStorageGb"] = state?.databaseStorageGb;
|
|
120
|
+
resourceInputs["desiredCount"] = state?.desiredCount;
|
|
121
|
+
resourceInputs["environment"] = state?.environment;
|
|
122
|
+
resourceInputs["filesystemMountPath"] = state?.filesystemMountPath;
|
|
123
|
+
resourceInputs["filesystemRequired"] = state?.filesystemRequired;
|
|
124
|
+
resourceInputs["maxCapacity"] = state?.maxCapacity;
|
|
125
|
+
resourceInputs["minCapacity"] = state?.minCapacity;
|
|
126
|
+
resourceInputs["organization"] = state?.organization;
|
|
127
|
+
resourceInputs["runningCount"] = state?.runningCount;
|
|
128
|
+
resourceInputs["status"] = state?.status;
|
|
129
|
+
} else {
|
|
130
|
+
const args = argsOrState as ApplicationArgs | undefined;
|
|
131
|
+
if (args?.appName === undefined && !opts.urn) {
|
|
132
|
+
throw new Error("Missing required property 'appName'");
|
|
133
|
+
}
|
|
134
|
+
if (args?.composeDefinition === undefined && !opts.urn) {
|
|
135
|
+
throw new Error("Missing required property 'composeDefinition'");
|
|
136
|
+
}
|
|
137
|
+
resourceInputs["appName"] = args?.appName;
|
|
138
|
+
resourceInputs["composeDefinition"] = args?.composeDefinition;
|
|
139
|
+
resourceInputs["databaseEngine"] = args?.databaseEngine;
|
|
140
|
+
resourceInputs["databaseInstanceClass"] = args?.databaseInstanceClass;
|
|
141
|
+
resourceInputs["databaseMultiAz"] = args?.databaseMultiAz;
|
|
142
|
+
resourceInputs["databaseStorageGb"] = args?.databaseStorageGb;
|
|
143
|
+
resourceInputs["environment"] = args?.environment;
|
|
144
|
+
resourceInputs["filesystemMountPath"] = args?.filesystemMountPath;
|
|
145
|
+
resourceInputs["filesystemRequired"] = args?.filesystemRequired;
|
|
146
|
+
resourceInputs["maxCapacity"] = args?.maxCapacity;
|
|
147
|
+
resourceInputs["minCapacity"] = args?.minCapacity;
|
|
148
|
+
resourceInputs["organization"] = args?.organization;
|
|
149
|
+
resourceInputs["containerNames"] = undefined /*out*/;
|
|
150
|
+
resourceInputs["desiredCount"] = undefined /*out*/;
|
|
151
|
+
resourceInputs["runningCount"] = undefined /*out*/;
|
|
152
|
+
resourceInputs["status"] = undefined /*out*/;
|
|
153
|
+
}
|
|
154
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
155
|
+
super(Application.__pulumiType, name, resourceInputs, opts);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Input properties used for looking up and filtering Application resources.
|
|
161
|
+
*/
|
|
162
|
+
export interface ApplicationState {
|
|
163
|
+
/**
|
|
164
|
+
* Application name
|
|
165
|
+
*/
|
|
166
|
+
appName?: pulumi.Input<string>;
|
|
167
|
+
/**
|
|
168
|
+
* Compose definition as a JSON string. Defines containers, CPU, memory, networking, and other task configuration.
|
|
169
|
+
*/
|
|
170
|
+
composeDefinition?: pulumi.Input<string>;
|
|
171
|
+
/**
|
|
172
|
+
* List of container names as a JSON array
|
|
173
|
+
*/
|
|
174
|
+
containerNames?: pulumi.Input<string>;
|
|
175
|
+
/**
|
|
176
|
+
* Database engine type (mysql, postgres)
|
|
177
|
+
*/
|
|
178
|
+
databaseEngine?: pulumi.Input<string>;
|
|
179
|
+
/**
|
|
180
|
+
* RDS instance class
|
|
181
|
+
*/
|
|
182
|
+
databaseInstanceClass?: pulumi.Input<string>;
|
|
183
|
+
/**
|
|
184
|
+
* Enable Multi-AZ database deployment
|
|
185
|
+
*/
|
|
186
|
+
databaseMultiAz?: pulumi.Input<boolean>;
|
|
187
|
+
/**
|
|
188
|
+
* Database allocated storage in GiB
|
|
189
|
+
*/
|
|
190
|
+
databaseStorageGb?: pulumi.Input<number>;
|
|
191
|
+
/**
|
|
192
|
+
* Desired task count
|
|
193
|
+
*/
|
|
194
|
+
desiredCount?: pulumi.Input<number>;
|
|
195
|
+
/**
|
|
196
|
+
* Initial environment variables as a JSON array of {name, value} objects
|
|
197
|
+
*/
|
|
198
|
+
environment?: pulumi.Input<string>;
|
|
199
|
+
/**
|
|
200
|
+
* Mount path inside containers for the shared filesystem
|
|
201
|
+
*/
|
|
202
|
+
filesystemMountPath?: pulumi.Input<string>;
|
|
203
|
+
/**
|
|
204
|
+
* Whether to create a shared filesystem
|
|
205
|
+
*/
|
|
206
|
+
filesystemRequired?: pulumi.Input<boolean>;
|
|
207
|
+
/**
|
|
208
|
+
* Maximum task count for auto-scaling
|
|
209
|
+
*/
|
|
210
|
+
maxCapacity?: pulumi.Input<number>;
|
|
211
|
+
/**
|
|
212
|
+
* Minimum task count for auto-scaling
|
|
213
|
+
*/
|
|
214
|
+
minCapacity?: pulumi.Input<number>;
|
|
215
|
+
/**
|
|
216
|
+
* Organization machine name. Defaults to the provider-level organization.
|
|
217
|
+
*/
|
|
218
|
+
organization?: pulumi.Input<string>;
|
|
219
|
+
/**
|
|
220
|
+
* Currently running task count
|
|
221
|
+
*/
|
|
222
|
+
runningCount?: pulumi.Input<number>;
|
|
223
|
+
/**
|
|
224
|
+
* Application status
|
|
225
|
+
*/
|
|
226
|
+
status?: pulumi.Input<string>;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* The set of arguments for constructing a Application resource.
|
|
231
|
+
*/
|
|
232
|
+
export interface ApplicationArgs {
|
|
233
|
+
/**
|
|
234
|
+
* Application name
|
|
235
|
+
*/
|
|
236
|
+
appName: pulumi.Input<string>;
|
|
237
|
+
/**
|
|
238
|
+
* Compose definition as a JSON string. Defines containers, CPU, memory, networking, and other task configuration.
|
|
239
|
+
*/
|
|
240
|
+
composeDefinition: pulumi.Input<string>;
|
|
241
|
+
/**
|
|
242
|
+
* Database engine type (mysql, postgres)
|
|
243
|
+
*/
|
|
244
|
+
databaseEngine?: pulumi.Input<string>;
|
|
245
|
+
/**
|
|
246
|
+
* RDS instance class
|
|
247
|
+
*/
|
|
248
|
+
databaseInstanceClass?: pulumi.Input<string>;
|
|
249
|
+
/**
|
|
250
|
+
* Enable Multi-AZ database deployment
|
|
251
|
+
*/
|
|
252
|
+
databaseMultiAz?: pulumi.Input<boolean>;
|
|
253
|
+
/**
|
|
254
|
+
* Database allocated storage in GiB
|
|
255
|
+
*/
|
|
256
|
+
databaseStorageGb?: pulumi.Input<number>;
|
|
257
|
+
/**
|
|
258
|
+
* Initial environment variables as a JSON array of {name, value} objects
|
|
259
|
+
*/
|
|
260
|
+
environment?: pulumi.Input<string>;
|
|
261
|
+
/**
|
|
262
|
+
* Mount path inside containers for the shared filesystem
|
|
263
|
+
*/
|
|
264
|
+
filesystemMountPath?: pulumi.Input<string>;
|
|
265
|
+
/**
|
|
266
|
+
* Whether to create a shared filesystem
|
|
267
|
+
*/
|
|
268
|
+
filesystemRequired?: pulumi.Input<boolean>;
|
|
269
|
+
/**
|
|
270
|
+
* Maximum task count for auto-scaling
|
|
271
|
+
*/
|
|
272
|
+
maxCapacity?: pulumi.Input<number>;
|
|
273
|
+
/**
|
|
274
|
+
* Minimum task count for auto-scaling
|
|
275
|
+
*/
|
|
276
|
+
minCapacity?: pulumi.Input<number>;
|
|
277
|
+
/**
|
|
278
|
+
* Organization machine name. Defaults to the provider-level organization.
|
|
279
|
+
*/
|
|
280
|
+
organization?: pulumi.Input<string>;
|
|
281
|
+
}
|
package/config/index.ts
ADDED
package/config/vars.ts
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as utilities from "../utilities";
|
|
6
|
+
|
|
7
|
+
declare var exports: any;
|
|
8
|
+
const __config = new pulumi.Config("quant");
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Base delay in milliseconds for exponential backoff. Defaults to 500
|
|
12
|
+
*/
|
|
13
|
+
export declare const baseDelayMs: number | undefined;
|
|
14
|
+
Object.defineProperty(exports, "baseDelayMs", {
|
|
15
|
+
get() {
|
|
16
|
+
return __config.getObject<number>("baseDelayMs");
|
|
17
|
+
},
|
|
18
|
+
enumerable: true,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The base URL for the QuantCDN API. Can also be set via QUANTCDN_BASE_URL environment variable.
|
|
23
|
+
*/
|
|
24
|
+
export declare const baseUrl: string | undefined;
|
|
25
|
+
Object.defineProperty(exports, "baseUrl", {
|
|
26
|
+
get() {
|
|
27
|
+
return __config.get("baseUrl");
|
|
28
|
+
},
|
|
29
|
+
enumerable: true,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The QuantCDN API Bearer token used to authenticate requests. Can also be set via QUANTCDN_API_TOKEN environment variable.
|
|
34
|
+
*/
|
|
35
|
+
export declare const bearer: string | undefined;
|
|
36
|
+
Object.defineProperty(exports, "bearer", {
|
|
37
|
+
get() {
|
|
38
|
+
return __config.get("bearer");
|
|
39
|
+
},
|
|
40
|
+
enumerable: true,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Whether to add random jitter to retry delays to avoid thundering herd. Defaults to true
|
|
45
|
+
*/
|
|
46
|
+
export declare const enableJitter: boolean | undefined;
|
|
47
|
+
Object.defineProperty(exports, "enableJitter", {
|
|
48
|
+
get() {
|
|
49
|
+
return __config.getObject<boolean>("enableJitter");
|
|
50
|
+
},
|
|
51
|
+
enumerable: true,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Maximum delay in milliseconds for exponential backoff. Defaults to 30000 (30 seconds)
|
|
56
|
+
*/
|
|
57
|
+
export declare const maxDelayMs: number | undefined;
|
|
58
|
+
Object.defineProperty(exports, "maxDelayMs", {
|
|
59
|
+
get() {
|
|
60
|
+
return __config.getObject<number>("maxDelayMs");
|
|
61
|
+
},
|
|
62
|
+
enumerable: true,
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Maximum number of retry attempts for failed requests. Defaults to 3
|
|
67
|
+
*/
|
|
68
|
+
export declare const maxRetries: number | undefined;
|
|
69
|
+
Object.defineProperty(exports, "maxRetries", {
|
|
70
|
+
get() {
|
|
71
|
+
return __config.getObject<number>("maxRetries");
|
|
72
|
+
},
|
|
73
|
+
enumerable: true,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The QuantCDN organization machine name. Can also be set via QUANTCDN_ORGANIZATION environment variable.
|
|
78
|
+
*/
|
|
79
|
+
export declare const organization: string | undefined;
|
|
80
|
+
Object.defineProperty(exports, "organization", {
|
|
81
|
+
get() {
|
|
82
|
+
return __config.get("organization");
|
|
83
|
+
},
|
|
84
|
+
enumerable: true,
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Maximum number of requests per second to send to the API. Defaults to 10.0
|
|
89
|
+
*/
|
|
90
|
+
export declare const requestsPerSecond: number | undefined;
|
|
91
|
+
Object.defineProperty(exports, "requestsPerSecond", {
|
|
92
|
+
get() {
|
|
93
|
+
return __config.getObject<number>("requestsPerSecond");
|
|
94
|
+
},
|
|
95
|
+
enumerable: true,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* HTTP client timeout in seconds for API requests. Defaults to 120 seconds to handle slow operations and potential deadlocks. Can also be set via QUANTCDN_TIMEOUT_SECONDS environment variable.
|
|
100
|
+
*/
|
|
101
|
+
export declare const timeoutSeconds: number | undefined;
|
|
102
|
+
Object.defineProperty(exports, "timeoutSeconds", {
|
|
103
|
+
get() {
|
|
104
|
+
return __config.getObject<number>("timeoutSeconds");
|
|
105
|
+
},
|
|
106
|
+
enumerable: true,
|
|
107
|
+
});
|
|
108
|
+
|