@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/types/output.ts
ADDED
|
@@ -0,0 +1,591 @@
|
|
|
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 inputs from "../types/input";
|
|
6
|
+
import * as outputs from "../types/output";
|
|
7
|
+
|
|
8
|
+
export interface CrawlerAssets {
|
|
9
|
+
/**
|
|
10
|
+
* Network intercept configuration for asset collection
|
|
11
|
+
*/
|
|
12
|
+
networkIntercept: outputs.CrawlerAssetsNetworkIntercept;
|
|
13
|
+
/**
|
|
14
|
+
* Parser configuration for asset extraction
|
|
15
|
+
*/
|
|
16
|
+
parser: outputs.CrawlerAssetsParser;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CrawlerAssetsNetworkIntercept {
|
|
20
|
+
/**
|
|
21
|
+
* Enable network intercept
|
|
22
|
+
*/
|
|
23
|
+
enabled: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Execute JavaScript during asset collection
|
|
26
|
+
*/
|
|
27
|
+
executeJs: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Request timeout in seconds
|
|
30
|
+
*/
|
|
31
|
+
timeout: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface CrawlerAssetsParser {
|
|
35
|
+
/**
|
|
36
|
+
* Enable parser
|
|
37
|
+
*/
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface CrawlerSitemap {
|
|
42
|
+
/**
|
|
43
|
+
* Recursively follow sitemap links
|
|
44
|
+
*/
|
|
45
|
+
recursive: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Sitemap URL
|
|
48
|
+
*/
|
|
49
|
+
url: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface DomainDnsGoLiveRecord {
|
|
53
|
+
/**
|
|
54
|
+
* Human-readable instructions for configuring this DNS record
|
|
55
|
+
*/
|
|
56
|
+
description: string;
|
|
57
|
+
/**
|
|
58
|
+
* DNS record name/host (@ for apex/root domains, subdomain name for subdomains)
|
|
59
|
+
*/
|
|
60
|
+
name: string;
|
|
61
|
+
/**
|
|
62
|
+
* DNS record type (CNAME, A, or ALIAS)
|
|
63
|
+
*/
|
|
64
|
+
type: string;
|
|
65
|
+
/**
|
|
66
|
+
* DNS record value (IP addresses for A records, domain name for CNAME/ALIAS)
|
|
67
|
+
*/
|
|
68
|
+
value: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface DomainDnsValidationRecord {
|
|
72
|
+
/**
|
|
73
|
+
* DNS record name (host/subdomain)
|
|
74
|
+
*/
|
|
75
|
+
name: string;
|
|
76
|
+
/**
|
|
77
|
+
* DNS record type (typically CNAME)
|
|
78
|
+
*/
|
|
79
|
+
type: string;
|
|
80
|
+
/**
|
|
81
|
+
* DNS record value to point to
|
|
82
|
+
*/
|
|
83
|
+
value: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface GetProjectsProject {
|
|
87
|
+
machineName: string;
|
|
88
|
+
name: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface RuleAuthActionConfig {
|
|
92
|
+
/**
|
|
93
|
+
* Authentication password
|
|
94
|
+
*/
|
|
95
|
+
authPass: string;
|
|
96
|
+
/**
|
|
97
|
+
* Authentication username
|
|
98
|
+
*/
|
|
99
|
+
authUser: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface RuleBotChallengeActionConfig {
|
|
103
|
+
/**
|
|
104
|
+
* Challenge TTL in seconds
|
|
105
|
+
*/
|
|
106
|
+
robotChallengeChallengeTtl: number;
|
|
107
|
+
/**
|
|
108
|
+
* Challenge type (invisible or checkbox)
|
|
109
|
+
*/
|
|
110
|
+
robotChallengeType: string;
|
|
111
|
+
/**
|
|
112
|
+
* Verification TTL in seconds
|
|
113
|
+
*/
|
|
114
|
+
robotChallengeVerificationTtl: number;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface RuleContentFilterActionConfig {
|
|
118
|
+
/**
|
|
119
|
+
* Function UUID
|
|
120
|
+
*/
|
|
121
|
+
fnUuid: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface RuleCustomResponseActionConfig {
|
|
125
|
+
/**
|
|
126
|
+
* Custom response body content
|
|
127
|
+
*/
|
|
128
|
+
customResponseBody: string;
|
|
129
|
+
/**
|
|
130
|
+
* HTTP status code for custom response
|
|
131
|
+
*/
|
|
132
|
+
customResponseStatusCode: number;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface RuleFunctionActionConfig {
|
|
136
|
+
/**
|
|
137
|
+
* Function UUID
|
|
138
|
+
*/
|
|
139
|
+
fnUuid: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface RuleHeadersActionConfig {
|
|
143
|
+
/**
|
|
144
|
+
* Headers to set
|
|
145
|
+
*/
|
|
146
|
+
headers: {[key: string]: string};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface RuleProxyActionConfig {
|
|
150
|
+
/**
|
|
151
|
+
* Quant Cloud application container (required when applicationProxy is true)
|
|
152
|
+
*/
|
|
153
|
+
applicationContainer: string;
|
|
154
|
+
/**
|
|
155
|
+
* Quant Cloud application environment (required when applicationProxy is true)
|
|
156
|
+
*/
|
|
157
|
+
applicationEnvironment: string;
|
|
158
|
+
/**
|
|
159
|
+
* Quant Cloud application name (required when applicationProxy is true)
|
|
160
|
+
*/
|
|
161
|
+
applicationName: string;
|
|
162
|
+
/**
|
|
163
|
+
* Quant Cloud application port (required when applicationProxy is true)
|
|
164
|
+
*/
|
|
165
|
+
applicationPort: number;
|
|
166
|
+
/**
|
|
167
|
+
* Enable Quant Cloud application proxy mode
|
|
168
|
+
*/
|
|
169
|
+
applicationProxy: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Basic auth password
|
|
172
|
+
*/
|
|
173
|
+
authPass: string;
|
|
174
|
+
/**
|
|
175
|
+
* Basic auth username
|
|
176
|
+
*/
|
|
177
|
+
authUser: string;
|
|
178
|
+
/**
|
|
179
|
+
* Cache lifetime
|
|
180
|
+
*/
|
|
181
|
+
cacheLifetime: string;
|
|
182
|
+
/**
|
|
183
|
+
* Disable SSL verification
|
|
184
|
+
*/
|
|
185
|
+
disableSslVerify: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Failover cache lifetime
|
|
188
|
+
*/
|
|
189
|
+
failoverLifetime: string;
|
|
190
|
+
/**
|
|
191
|
+
* Enable failover mode
|
|
192
|
+
*/
|
|
193
|
+
failoverMode: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Status codes for failover (default: 200,404,301,302,304)
|
|
196
|
+
*/
|
|
197
|
+
failoverOriginStatusCodes: string[];
|
|
198
|
+
/**
|
|
199
|
+
* Failover TTFB threshold
|
|
200
|
+
*/
|
|
201
|
+
failoverOriginTtfb: string;
|
|
202
|
+
/**
|
|
203
|
+
* Host header override
|
|
204
|
+
*/
|
|
205
|
+
host: string;
|
|
206
|
+
/**
|
|
207
|
+
* Headers to inject
|
|
208
|
+
*/
|
|
209
|
+
injectHeaders: {[key: string]: string};
|
|
210
|
+
/**
|
|
211
|
+
* Notification type (none, slack)
|
|
212
|
+
*/
|
|
213
|
+
notify: string;
|
|
214
|
+
/**
|
|
215
|
+
* Notification configuration (required when notify is slack)
|
|
216
|
+
*/
|
|
217
|
+
notifyConfig: outputs.RuleProxyActionConfigNotifyConfig;
|
|
218
|
+
/**
|
|
219
|
+
* Only proxy 404 responses
|
|
220
|
+
*/
|
|
221
|
+
onlyProxy404: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Origin timeout
|
|
224
|
+
*/
|
|
225
|
+
originTimeout: string;
|
|
226
|
+
/**
|
|
227
|
+
* Proxy alert enabled
|
|
228
|
+
*/
|
|
229
|
+
proxyAlertEnabled: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* Proxy inline function enabled
|
|
232
|
+
*/
|
|
233
|
+
proxyInlineFnEnabled: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Headers to strip from response
|
|
236
|
+
*/
|
|
237
|
+
proxyStripHeaders: string[];
|
|
238
|
+
/**
|
|
239
|
+
* Headers to strip from request
|
|
240
|
+
*/
|
|
241
|
+
proxyStripRequestHeaders: string[];
|
|
242
|
+
/**
|
|
243
|
+
* Quant Cloud application proxy selection (populated automatically when applicationProxy is enabled)
|
|
244
|
+
*/
|
|
245
|
+
quantCloudSelection: outputs.RuleProxyActionConfigQuantCloudSelection;
|
|
246
|
+
/**
|
|
247
|
+
* Static error page content (HTML) to serve on origin errors
|
|
248
|
+
*/
|
|
249
|
+
staticErrorPage: string;
|
|
250
|
+
/**
|
|
251
|
+
* Origin status codes that trigger static error page
|
|
252
|
+
*/
|
|
253
|
+
staticErrorPageStatusCodes: string[];
|
|
254
|
+
/**
|
|
255
|
+
* Target URL to proxy to
|
|
256
|
+
*/
|
|
257
|
+
to: string;
|
|
258
|
+
/**
|
|
259
|
+
* Web Application Firewall configuration
|
|
260
|
+
*/
|
|
261
|
+
wafConfig: outputs.RuleProxyActionConfigWafConfig;
|
|
262
|
+
/**
|
|
263
|
+
* WAF enabled
|
|
264
|
+
*/
|
|
265
|
+
wafEnabled: boolean;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export interface RuleProxyActionConfigNotifyConfig {
|
|
269
|
+
/**
|
|
270
|
+
* Slack webhook URL
|
|
271
|
+
*/
|
|
272
|
+
webhookUrl: string;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export interface RuleProxyActionConfigQuantCloudSelection {
|
|
276
|
+
/**
|
|
277
|
+
* Application name
|
|
278
|
+
*/
|
|
279
|
+
app: string;
|
|
280
|
+
/**
|
|
281
|
+
* Container name
|
|
282
|
+
*/
|
|
283
|
+
container: string;
|
|
284
|
+
/**
|
|
285
|
+
* Environment name
|
|
286
|
+
*/
|
|
287
|
+
env: string;
|
|
288
|
+
/**
|
|
289
|
+
* Container port
|
|
290
|
+
*/
|
|
291
|
+
port: number;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export interface RuleProxyActionConfigWafConfig {
|
|
295
|
+
/**
|
|
296
|
+
* IP addresses to allow
|
|
297
|
+
*/
|
|
298
|
+
allowIps: string[];
|
|
299
|
+
/**
|
|
300
|
+
* WAF rule IDs to allow/whitelist
|
|
301
|
+
*/
|
|
302
|
+
allowRules: string[];
|
|
303
|
+
/**
|
|
304
|
+
* ASN numbers to block
|
|
305
|
+
*/
|
|
306
|
+
blockAsns: string[];
|
|
307
|
+
/**
|
|
308
|
+
* IP addresses to block
|
|
309
|
+
*/
|
|
310
|
+
blockIps: string[];
|
|
311
|
+
/**
|
|
312
|
+
* Enable predefined block lists
|
|
313
|
+
*/
|
|
314
|
+
blockLists: outputs.RuleProxyActionConfigWafConfigBlockLists;
|
|
315
|
+
/**
|
|
316
|
+
* Referer patterns to block
|
|
317
|
+
*/
|
|
318
|
+
blockReferers: string[];
|
|
319
|
+
/**
|
|
320
|
+
* User agent patterns to block
|
|
321
|
+
*/
|
|
322
|
+
blockUas: string[];
|
|
323
|
+
/**
|
|
324
|
+
* Project Honey Pot HTTP:BL configuration
|
|
325
|
+
*/
|
|
326
|
+
httpbl: outputs.RuleProxyActionConfigWafConfigHttpbl;
|
|
327
|
+
/**
|
|
328
|
+
* WAF operation mode
|
|
329
|
+
*/
|
|
330
|
+
mode: string;
|
|
331
|
+
/**
|
|
332
|
+
* Email addresses for notifications
|
|
333
|
+
*/
|
|
334
|
+
notifyEmails: string[];
|
|
335
|
+
/**
|
|
336
|
+
* Slack webhook URL for notifications
|
|
337
|
+
*/
|
|
338
|
+
notifySlack: string;
|
|
339
|
+
/**
|
|
340
|
+
* Minimum hits per minute to trigger Slack notification
|
|
341
|
+
*/
|
|
342
|
+
notifySlackHitsRpm: number;
|
|
343
|
+
/**
|
|
344
|
+
* OWASP paranoia level
|
|
345
|
+
*/
|
|
346
|
+
paranoiaLevel: number;
|
|
347
|
+
/**
|
|
348
|
+
* Rate limiting thresholds
|
|
349
|
+
*/
|
|
350
|
+
thresholds: outputs.RuleProxyActionConfigWafConfigThreshold[];
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export interface RuleProxyActionConfigWafConfigBlockLists {
|
|
354
|
+
/**
|
|
355
|
+
* Block AI crawlers
|
|
356
|
+
*/
|
|
357
|
+
ai: boolean;
|
|
358
|
+
/**
|
|
359
|
+
* Block known bad IPs
|
|
360
|
+
*/
|
|
361
|
+
ip: boolean;
|
|
362
|
+
/**
|
|
363
|
+
* Block known bad referers
|
|
364
|
+
*/
|
|
365
|
+
referer: boolean;
|
|
366
|
+
/**
|
|
367
|
+
* Block known bad user agents
|
|
368
|
+
*/
|
|
369
|
+
userAgent: boolean;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export interface RuleProxyActionConfigWafConfigHttpbl {
|
|
373
|
+
/**
|
|
374
|
+
* Block email harvesters
|
|
375
|
+
*/
|
|
376
|
+
blockHarvester: boolean;
|
|
377
|
+
/**
|
|
378
|
+
* Block search engines
|
|
379
|
+
*/
|
|
380
|
+
blockSearchEngine: boolean;
|
|
381
|
+
/**
|
|
382
|
+
* Block spam sources
|
|
383
|
+
*/
|
|
384
|
+
blockSpam: boolean;
|
|
385
|
+
/**
|
|
386
|
+
* Block suspicious IPs
|
|
387
|
+
*/
|
|
388
|
+
blockSuspicious: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* Enable HTTP:BL
|
|
391
|
+
*/
|
|
392
|
+
httpblEnabled: boolean;
|
|
393
|
+
/**
|
|
394
|
+
* HTTP:BL API key
|
|
395
|
+
*/
|
|
396
|
+
httpblKey: string;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export interface RuleProxyActionConfigWafConfigThreshold {
|
|
400
|
+
/**
|
|
401
|
+
* Cooldown period in seconds
|
|
402
|
+
*/
|
|
403
|
+
cooldown: number;
|
|
404
|
+
/**
|
|
405
|
+
* Hit count limit (for waf_hit_by_ip)
|
|
406
|
+
*/
|
|
407
|
+
hits: number;
|
|
408
|
+
/**
|
|
409
|
+
* Time window in minutes (for waf_hit_by_ip)
|
|
410
|
+
*/
|
|
411
|
+
minutes: number;
|
|
412
|
+
/**
|
|
413
|
+
* Threshold enforcement mode
|
|
414
|
+
*/
|
|
415
|
+
mode: string;
|
|
416
|
+
/**
|
|
417
|
+
* Slack webhook for this threshold
|
|
418
|
+
*/
|
|
419
|
+
notifySlack: string;
|
|
420
|
+
/**
|
|
421
|
+
* Requests per second limit (for ip/header)
|
|
422
|
+
*/
|
|
423
|
+
rps: number;
|
|
424
|
+
/**
|
|
425
|
+
* Threshold type
|
|
426
|
+
*/
|
|
427
|
+
type: string;
|
|
428
|
+
/**
|
|
429
|
+
* Header name (for header type)
|
|
430
|
+
*/
|
|
431
|
+
value: string;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export interface RuleProxyWafConfig {
|
|
435
|
+
/**
|
|
436
|
+
* IP addresses to allow
|
|
437
|
+
*/
|
|
438
|
+
allowIps: string[];
|
|
439
|
+
/**
|
|
440
|
+
* WAF rule IDs to allow/whitelist
|
|
441
|
+
*/
|
|
442
|
+
allowRules: string[];
|
|
443
|
+
/**
|
|
444
|
+
* ASN numbers to block
|
|
445
|
+
*/
|
|
446
|
+
blockAsns: string[];
|
|
447
|
+
/**
|
|
448
|
+
* IP addresses to block
|
|
449
|
+
*/
|
|
450
|
+
blockIps: string[];
|
|
451
|
+
/**
|
|
452
|
+
* Enable predefined block lists
|
|
453
|
+
*/
|
|
454
|
+
blockLists: outputs.RuleProxyWafConfigBlockLists;
|
|
455
|
+
/**
|
|
456
|
+
* Referer patterns to block
|
|
457
|
+
*/
|
|
458
|
+
blockReferers: string[];
|
|
459
|
+
/**
|
|
460
|
+
* User agent patterns to block
|
|
461
|
+
*/
|
|
462
|
+
blockUas: string[];
|
|
463
|
+
/**
|
|
464
|
+
* Project Honey Pot HTTP:BL configuration
|
|
465
|
+
*/
|
|
466
|
+
httpbl: outputs.RuleProxyWafConfigHttpbl;
|
|
467
|
+
/**
|
|
468
|
+
* WAF operation mode
|
|
469
|
+
*/
|
|
470
|
+
mode: string;
|
|
471
|
+
/**
|
|
472
|
+
* Email addresses for notifications
|
|
473
|
+
*/
|
|
474
|
+
notifyEmails: string[];
|
|
475
|
+
/**
|
|
476
|
+
* Slack webhook URL for notifications
|
|
477
|
+
*/
|
|
478
|
+
notifySlack: string;
|
|
479
|
+
/**
|
|
480
|
+
* Minimum hits per minute to trigger Slack notification
|
|
481
|
+
*/
|
|
482
|
+
notifySlackHitsRpm: number;
|
|
483
|
+
/**
|
|
484
|
+
* OWASP paranoia level
|
|
485
|
+
*/
|
|
486
|
+
paranoiaLevel: number;
|
|
487
|
+
/**
|
|
488
|
+
* Rate limiting thresholds
|
|
489
|
+
*/
|
|
490
|
+
thresholds: outputs.RuleProxyWafConfigThreshold[];
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export interface RuleProxyWafConfigBlockLists {
|
|
494
|
+
/**
|
|
495
|
+
* Block AI crawlers
|
|
496
|
+
*/
|
|
497
|
+
ai: boolean;
|
|
498
|
+
/**
|
|
499
|
+
* Block known bad IPs
|
|
500
|
+
*/
|
|
501
|
+
ip: boolean;
|
|
502
|
+
/**
|
|
503
|
+
* Block known bad referers
|
|
504
|
+
*/
|
|
505
|
+
referer: boolean;
|
|
506
|
+
/**
|
|
507
|
+
* Block known bad user agents
|
|
508
|
+
*/
|
|
509
|
+
userAgent: boolean;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export interface RuleProxyWafConfigHttpbl {
|
|
513
|
+
/**
|
|
514
|
+
* Block email harvesters
|
|
515
|
+
*/
|
|
516
|
+
blockHarvester: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* Block search engines
|
|
519
|
+
*/
|
|
520
|
+
blockSearchEngine: boolean;
|
|
521
|
+
/**
|
|
522
|
+
* Block spam sources
|
|
523
|
+
*/
|
|
524
|
+
blockSpam: boolean;
|
|
525
|
+
/**
|
|
526
|
+
* Block suspicious IPs
|
|
527
|
+
*/
|
|
528
|
+
blockSuspicious: boolean;
|
|
529
|
+
/**
|
|
530
|
+
* Enable HTTP:BL
|
|
531
|
+
*/
|
|
532
|
+
httpblEnabled: boolean;
|
|
533
|
+
/**
|
|
534
|
+
* HTTP:BL API key
|
|
535
|
+
*/
|
|
536
|
+
httpblKey: string;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export interface RuleProxyWafConfigThreshold {
|
|
540
|
+
/**
|
|
541
|
+
* Cooldown period in seconds
|
|
542
|
+
*/
|
|
543
|
+
cooldown: number;
|
|
544
|
+
/**
|
|
545
|
+
* Hit count limit (for waf_hit_by_ip)
|
|
546
|
+
*/
|
|
547
|
+
hits: number;
|
|
548
|
+
/**
|
|
549
|
+
* Time window in minutes (for waf_hit_by_ip)
|
|
550
|
+
*/
|
|
551
|
+
minutes: number;
|
|
552
|
+
/**
|
|
553
|
+
* Threshold enforcement mode
|
|
554
|
+
*/
|
|
555
|
+
mode: string;
|
|
556
|
+
/**
|
|
557
|
+
* Slack webhook for this threshold
|
|
558
|
+
*/
|
|
559
|
+
notifySlack: string;
|
|
560
|
+
/**
|
|
561
|
+
* Requests per second limit (for ip/header)
|
|
562
|
+
*/
|
|
563
|
+
rps: number;
|
|
564
|
+
/**
|
|
565
|
+
* Threshold type
|
|
566
|
+
*/
|
|
567
|
+
type: string;
|
|
568
|
+
/**
|
|
569
|
+
* Header name (for header type)
|
|
570
|
+
*/
|
|
571
|
+
value: string;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export interface RuleRedirectActionConfig {
|
|
575
|
+
/**
|
|
576
|
+
* HTTP status code for redirect
|
|
577
|
+
*/
|
|
578
|
+
statusCode: string;
|
|
579
|
+
/**
|
|
580
|
+
* Redirect destination URL
|
|
581
|
+
*/
|
|
582
|
+
to: string;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
export interface RuleServeStaticActionConfig {
|
|
586
|
+
/**
|
|
587
|
+
* Path to the static file to serve
|
|
588
|
+
*/
|
|
589
|
+
staticFilePath: string;
|
|
590
|
+
}
|
|
591
|
+
|
package/utilities.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
|
|
5
|
+
import * as runtime from "@pulumi/pulumi/runtime";
|
|
6
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
7
|
+
|
|
8
|
+
export function getEnv(...vars: string[]): string | undefined {
|
|
9
|
+
for (const v of vars) {
|
|
10
|
+
const value = process.env[v];
|
|
11
|
+
if (value) {
|
|
12
|
+
return value;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function getEnvBoolean(...vars: string[]): boolean | undefined {
|
|
19
|
+
const s = getEnv(...vars);
|
|
20
|
+
if (s !== undefined) {
|
|
21
|
+
// NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what
|
|
22
|
+
// Terraform uses internally when parsing boolean values.
|
|
23
|
+
if (["1", "t", "T", "true", "TRUE", "True"].find(v => v === s) !== undefined) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
if (["0", "f", "F", "false", "FALSE", "False"].find(v => v === s) !== undefined) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function getEnvNumber(...vars: string[]): number | undefined {
|
|
34
|
+
const s = getEnv(...vars);
|
|
35
|
+
if (s !== undefined) {
|
|
36
|
+
const f = parseFloat(s);
|
|
37
|
+
if (!isNaN(f)) {
|
|
38
|
+
return f;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function getVersion(): string {
|
|
45
|
+
let version = require('./package.json').version;
|
|
46
|
+
// Node allows for the version to be prefixed by a "v", while semver doesn't.
|
|
47
|
+
// If there is a v, strip it off.
|
|
48
|
+
if (version.indexOf('v') === 0) {
|
|
49
|
+
version = version.slice(1);
|
|
50
|
+
}
|
|
51
|
+
return version;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export function resourceOptsDefaults(): any {
|
|
56
|
+
return { version: getVersion(), pluginDownloadURL: "github://api.github.com/quantcdn/pulumi-quant" };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export function lazyLoad(exports: any, props: string[], loadModule: any) {
|
|
61
|
+
for (let property of props) {
|
|
62
|
+
Object.defineProperty(exports, property, {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function() {
|
|
65
|
+
return loadModule()[property];
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export async function callAsync<T>(
|
|
73
|
+
tok: string,
|
|
74
|
+
props: pulumi.Inputs,
|
|
75
|
+
res?: pulumi.Resource,
|
|
76
|
+
opts?: {property?: string},
|
|
77
|
+
): Promise<T> {
|
|
78
|
+
const o: any = runtime.call<T>(tok, props, res);
|
|
79
|
+
const value = await o.promise(true /*withUnknowns*/);
|
|
80
|
+
const isKnown = await o.isKnown;
|
|
81
|
+
const isSecret = await o.isSecret;
|
|
82
|
+
const problem: string|undefined =
|
|
83
|
+
!isKnown ? "an unknown value"
|
|
84
|
+
: isSecret ? "a secret value"
|
|
85
|
+
: undefined;
|
|
86
|
+
// Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency.
|
|
87
|
+
if (problem) {
|
|
88
|
+
throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` +
|
|
89
|
+
"This is an error in the provider, please report this to the provider developer.");
|
|
90
|
+
}
|
|
91
|
+
// Extract a single property if requested.
|
|
92
|
+
if (opts && opts.property) {
|
|
93
|
+
return value[opts.property];
|
|
94
|
+
}
|
|
95
|
+
return value;
|
|
96
|
+
}
|