@pulumi/cloudflare 4.0.0 → 4.1.0-alpha.1640022855
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 -1
- package/accessApplication.d.ts +24 -0
- package/accessApplication.js +11 -0
- package/accessApplication.js.map +1 -1
- package/accessCaCertificate.js +1 -0
- package/accessCaCertificate.js.map +1 -1
- package/accessGroup.js +1 -0
- package/accessGroup.js.map +1 -1
- package/accessIdentityProvider.js +1 -0
- package/accessIdentityProvider.js.map +1 -1
- package/accessKeysConfiguration.js +1 -0
- package/accessKeysConfiguration.js.map +1 -1
- package/accessMutualTlsCertificate.js +1 -0
- package/accessMutualTlsCertificate.js.map +1 -1
- package/accessPolicy.d.ts +3 -0
- package/accessPolicy.js +3 -0
- package/accessPolicy.js.map +1 -1
- package/accessRule.js +1 -0
- package/accessRule.js.map +1 -1
- package/accessServiceToken.js +1 -0
- package/accessServiceToken.js.map +1 -1
- package/accountMember.js +1 -0
- package/accountMember.js.map +1 -1
- package/apiToken.d.ts +8 -8
- package/apiToken.js +9 -8
- package/apiToken.js.map +1 -1
- package/argo.js +1 -0
- package/argo.js.map +1 -1
- package/argoTunnel.d.ts +8 -0
- package/argoTunnel.js +3 -0
- package/argoTunnel.js.map +1 -1
- package/authenticatedOriginPulls.js +1 -0
- package/authenticatedOriginPulls.js.map +1 -1
- package/authenticatedOriginPullsCertificate.js +1 -0
- package/authenticatedOriginPullsCertificate.js.map +1 -1
- package/byoIpPrefix.js +1 -0
- package/byoIpPrefix.js.map +1 -1
- package/certificatePack.js +1 -0
- package/certificatePack.js.map +1 -1
- package/config/index.js +11 -4
- package/config/index.js.map +1 -1
- package/config/vars.d.ts +18 -10
- package/config/vars.js +78 -41
- package/config/vars.js.map +1 -1
- package/customHostname.js +1 -0
- package/customHostname.js.map +1 -1
- package/customHostnameFallbackOrigin.js +1 -0
- package/customHostnameFallbackOrigin.js.map +1 -1
- package/customPages.js +1 -0
- package/customPages.js.map +1 -1
- package/customSsl.js +1 -0
- package/customSsl.js.map +1 -1
- package/devicePostureRule.js +1 -0
- package/devicePostureRule.js.map +1 -1
- package/filter.js +1 -0
- package/filter.js.map +1 -1
- package/firewallRule.d.ts +3 -0
- package/firewallRule.js +4 -0
- package/firewallRule.js.map +1 -1
- package/getAccessIdentityProvider.d.ts +80 -0
- package/getAccessIdentityProvider.js +50 -0
- package/getAccessIdentityProvider.js.map +1 -0
- package/getAccountRoles.d.ts +39 -0
- package/getAccountRoles.js +27 -0
- package/getAccountRoles.js.map +1 -0
- package/getApiTokenPermissionGroups.d.ts +1 -1
- package/getApiTokenPermissionGroups.js +2 -1
- package/getApiTokenPermissionGroups.js.map +1 -1
- package/getIpRanges.js +1 -0
- package/getIpRanges.js.map +1 -1
- package/getOriginCaRootCertificate.d.ts +10 -0
- package/getOriginCaRootCertificate.js +5 -0
- package/getOriginCaRootCertificate.js.map +1 -1
- package/getWafGroups.d.ts +36 -0
- package/getWafGroups.js +22 -0
- package/getWafGroups.js.map +1 -1
- package/getWafPackages.d.ts +34 -0
- package/getWafPackages.js +24 -0
- package/getWafPackages.js.map +1 -1
- package/getWafRules.d.ts +19 -0
- package/getWafRules.js +5 -0
- package/getWafRules.js.map +1 -1
- package/getZone.d.ts +117 -0
- package/getZone.js +68 -0
- package/getZone.js.map +1 -0
- package/getZoneDnssec.d.ts +10 -0
- package/getZoneDnssec.js +5 -0
- package/getZoneDnssec.js.map +1 -1
- package/getZones.d.ts +11 -36
- package/getZones.js +5 -36
- package/getZones.js.map +1 -1
- package/healthcheck.js +1 -0
- package/healthcheck.js.map +1 -1
- package/index.d.ts +4 -0
- package/index.js +88 -72
- package/index.js.map +1 -1
- package/ipList.js +1 -0
- package/ipList.js.map +1 -1
- package/loadBalancer.js +1 -0
- package/loadBalancer.js.map +1 -1
- package/loadBalancerMonitor.js +1 -0
- package/loadBalancerMonitor.js.map +1 -1
- package/loadBalancerPool.d.ts +15 -0
- package/loadBalancerPool.js +6 -0
- package/loadBalancerPool.js.map +1 -1
- package/logPushOwnershipChallenge.js +1 -0
- package/logPushOwnershipChallenge.js.map +1 -1
- package/logpullRetention.js +1 -0
- package/logpullRetention.js.map +1 -1
- package/logpushJob.js +1 -0
- package/logpushJob.js.map +1 -1
- package/magicFirewallRuleset.js +1 -0
- package/magicFirewallRuleset.js.map +1 -1
- package/notificationPolicy.js +1 -0
- package/notificationPolicy.js.map +1 -1
- package/notificationPolicyWebhooks.js +1 -0
- package/notificationPolicyWebhooks.js.map +1 -1
- package/originCaCertificate.d.ts +1 -1
- package/originCaCertificate.js +1 -0
- package/originCaCertificate.js.map +1 -1
- package/package.json +4 -3
- package/package.json.bak +3 -2
- package/package.json.dev +4 -3
- package/pageRule.js +1 -0
- package/pageRule.js.map +1 -1
- package/provider.d.ts +16 -0
- package/provider.js +8 -5
- package/provider.js.map +1 -1
- package/rateLimit.js +1 -0
- package/rateLimit.js.map +1 -1
- package/record.js +1 -0
- package/record.js.map +1 -1
- package/ruleset.d.ts +3 -176
- package/ruleset.js +1 -173
- package/ruleset.js.map +1 -1
- package/spectrumApplication.js +1 -0
- package/spectrumApplication.js.map +1 -1
- package/splitTunnel.d.ts +111 -0
- package/splitTunnel.js +102 -0
- package/splitTunnel.js.map +1 -0
- package/staticRoute.js +1 -0
- package/staticRoute.js.map +1 -1
- package/teamsAccount.js +1 -0
- package/teamsAccount.js.map +1 -1
- package/teamsList.js +1 -0
- package/teamsList.js.map +1 -1
- package/teamsLocation.js +1 -0
- package/teamsLocation.js.map +1 -1
- package/teamsRule.js +1 -0
- package/teamsRule.js.map +1 -1
- package/types/index.js +1 -0
- package/types/index.js.map +1 -1
- package/types/input.d.ts +195 -0
- package/types/output.d.ts +138 -0
- package/utilities.js +1 -0
- package/utilities.js.map +1 -1
- package/wafGroup.js +1 -0
- package/wafGroup.js.map +1 -1
- package/wafOverride.js +1 -0
- package/wafOverride.js.map +1 -1
- package/wafPackage.js +1 -0
- package/wafPackage.js.map +1 -1
- package/wafRule.js +1 -0
- package/wafRule.js.map +1 -1
- package/waitingRoom.js +1 -0
- package/waitingRoom.js.map +1 -1
- package/workerCronTrigger.js +1 -0
- package/workerCronTrigger.js.map +1 -1
- package/workerRoute.js +1 -0
- package/workerRoute.js.map +1 -1
- package/workerScript.d.ts +31 -0
- package/workerScript.js +32 -0
- package/workerScript.js.map +1 -1
- package/workersKv.js +1 -0
- package/workersKv.js.map +1 -1
- package/workersKvNamespace.js +1 -0
- package/workersKvNamespace.js.map +1 -1
- package/zone.js +1 -0
- package/zone.js.map +1 -1
- package/zoneDnssec.js +1 -0
- package/zoneDnssec.js.map +1 -1
- package/zoneLockdown.js +1 -0
- package/zoneLockdown.js.map +1 -1
- package/zoneSettingsOverride.d.ts +6 -0
- package/zoneSettingsOverride.js +1 -0
- package/zoneSettingsOverride.js.map +1 -1
package/ruleset.d.ts
CHANGED
|
@@ -1,179 +1,6 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
import { input as inputs, output as outputs } from "./types";
|
|
3
3
|
/**
|
|
4
|
-
* The [Cloudflare Ruleset Engine](https://developers.cloudflare.com/firewall/cf-rulesets)
|
|
5
|
-
* allows you to create and deploy rules and rulesets.
|
|
6
|
-
* The engine syntax, inspired by the Wireshark Display Filter language, is the
|
|
7
|
-
* same syntax used in custom Firewall Rules. Cloudflare uses the Ruleset Engine
|
|
8
|
-
* in different products, allowing you to configure several products using the same
|
|
9
|
-
* basic syntax.
|
|
10
|
-
*
|
|
11
|
-
* ## Example Usage
|
|
12
|
-
*
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
-
* import * as cloudflare from "@pulumi/cloudflare";
|
|
16
|
-
*
|
|
17
|
-
* // Magic Transit
|
|
18
|
-
* const magicTransitExample = new cloudflare.Ruleset("magic_transit_example", {
|
|
19
|
-
* accountId: "d41d8cd98f00b204e9800998ecf8427e",
|
|
20
|
-
* description: "example magic transit ruleset description",
|
|
21
|
-
* kind: "root",
|
|
22
|
-
* name: "account magic transit",
|
|
23
|
-
* phase: "magic_transit",
|
|
24
|
-
* rules: [{
|
|
25
|
-
* action: "allow",
|
|
26
|
-
* description: "Allow TCP Ephemeral Ports",
|
|
27
|
-
* expression: "tcp.dstport in { 32768..65535 }",
|
|
28
|
-
* }],
|
|
29
|
-
* });
|
|
30
|
-
* // Zone-level WAF Managed Ruleset
|
|
31
|
-
* const zoneLevelManagedWaf = new cloudflare.Ruleset("zone_level_managed_waf", {
|
|
32
|
-
* description: "managed WAF ruleset description",
|
|
33
|
-
* kind: "zone",
|
|
34
|
-
* name: "managed WAF",
|
|
35
|
-
* phase: "http_request_firewall_managed",
|
|
36
|
-
* rules: [{
|
|
37
|
-
* action: "execute",
|
|
38
|
-
* actionParameters: {
|
|
39
|
-
* id: "efb7b8c949ac4650a09736fc376e9aee",
|
|
40
|
-
* },
|
|
41
|
-
* description: "Execute Cloudflare Managed Ruleset on my zone-level phase entry point ruleset",
|
|
42
|
-
* enabled: true,
|
|
43
|
-
* expression: "true",
|
|
44
|
-
* }],
|
|
45
|
-
* zoneId: "cb029e245cfdd66dc8d2e570d5dd3322",
|
|
46
|
-
* });
|
|
47
|
-
* // Zone-level WAF with tag-based overrides
|
|
48
|
-
* const zoneLevelManagedWafWithCategoryBasedOverrides = new cloudflare.Ruleset("zone_level_managed_waf_with_category_based_overrides", {
|
|
49
|
-
* description: "managed WAF with tag-based overrides ruleset description",
|
|
50
|
-
* kind: "zone",
|
|
51
|
-
* name: "managed WAF with tag-based overrides",
|
|
52
|
-
* phase: "http_request_firewall_managed",
|
|
53
|
-
* rules: [{
|
|
54
|
-
* action: "execute",
|
|
55
|
-
* actionParameters: {
|
|
56
|
-
* id: "efb7b8c949ac4650a09736fc376e9aee",
|
|
57
|
-
* overrides: {
|
|
58
|
-
* categories: [
|
|
59
|
-
* {
|
|
60
|
-
* action: "block",
|
|
61
|
-
* category: "wordpress",
|
|
62
|
-
* enabled: true,
|
|
63
|
-
* },
|
|
64
|
-
* {
|
|
65
|
-
* action: "block",
|
|
66
|
-
* category: "joomla",
|
|
67
|
-
* enabled: true,
|
|
68
|
-
* },
|
|
69
|
-
* ],
|
|
70
|
-
* },
|
|
71
|
-
* },
|
|
72
|
-
* description: "overrides to only enable wordpress rules to block",
|
|
73
|
-
* enabled: false,
|
|
74
|
-
* expression: "true",
|
|
75
|
-
* }],
|
|
76
|
-
* zoneId: "cb029e245cfdd66dc8d2e570d5dd3322",
|
|
77
|
-
* });
|
|
78
|
-
* // Rewrite the URI path component to a static path
|
|
79
|
-
* const transformUriRulePath = new cloudflare.Ruleset("transform_uri_rule_path", {
|
|
80
|
-
* description: "change the URI path to a new static path",
|
|
81
|
-
* kind: "zone",
|
|
82
|
-
* name: "transform rule for URI path",
|
|
83
|
-
* phase: "http_request_transform",
|
|
84
|
-
* rules: [{
|
|
85
|
-
* action: "rewrite",
|
|
86
|
-
* actionParameters: {
|
|
87
|
-
* uri: {
|
|
88
|
-
* path: {
|
|
89
|
-
* value: "/my-new-route",
|
|
90
|
-
* },
|
|
91
|
-
* },
|
|
92
|
-
* },
|
|
93
|
-
* description: "example URI path transform rule",
|
|
94
|
-
* enabled: true,
|
|
95
|
-
* expression: "(http.host eq \"example.com\" and http.uri.path eq \"/old-path\")",
|
|
96
|
-
* }],
|
|
97
|
-
* zoneId: "cb029e245cfdd66dc8d2e570d5dd3322",
|
|
98
|
-
* });
|
|
99
|
-
* // Rewrite the URI query component to a static query
|
|
100
|
-
* const transformUriRuleQuery = new cloudflare.Ruleset("transform_uri_rule_query", {
|
|
101
|
-
* description: "change the URI query to a new static query",
|
|
102
|
-
* kind: "zone",
|
|
103
|
-
* name: "transform rule for URI query parameter",
|
|
104
|
-
* phase: "http_request_transform",
|
|
105
|
-
* rules: [{
|
|
106
|
-
* action: "rewrite",
|
|
107
|
-
* actionParameters: {
|
|
108
|
-
* uri: {
|
|
109
|
-
* query: {
|
|
110
|
-
* value: "old=new_again",
|
|
111
|
-
* },
|
|
112
|
-
* },
|
|
113
|
-
* },
|
|
114
|
-
* description: "URI transformation query example",
|
|
115
|
-
* enabled: true,
|
|
116
|
-
* expression: "true",
|
|
117
|
-
* }],
|
|
118
|
-
* zoneId: "cb029e245cfdd66dc8d2e570d5dd3322",
|
|
119
|
-
* });
|
|
120
|
-
* // Rewrite HTTP headers to a modified values
|
|
121
|
-
* const transformUriHttpHeaders = new cloudflare.Ruleset("transform_uri_http_headers", {
|
|
122
|
-
* description: "modify HTTP headers before reaching origin",
|
|
123
|
-
* kind: "zone",
|
|
124
|
-
* name: "transform rule for HTTP headers",
|
|
125
|
-
* phase: "http_request_late_transform",
|
|
126
|
-
* rules: [{
|
|
127
|
-
* action: "rewrite",
|
|
128
|
-
* actionParameters: {
|
|
129
|
-
* headers: [
|
|
130
|
-
* {
|
|
131
|
-
* name: "example-http-header-1",
|
|
132
|
-
* operation: "set",
|
|
133
|
-
* value: "my-http-header-value-1",
|
|
134
|
-
* },
|
|
135
|
-
* {
|
|
136
|
-
* expression: "cf.zone.name",
|
|
137
|
-
* name: "example-http-header-2",
|
|
138
|
-
* operation: "set",
|
|
139
|
-
* },
|
|
140
|
-
* {
|
|
141
|
-
* name: "example-http-header-3-to-remove",
|
|
142
|
-
* operation: "remove",
|
|
143
|
-
* },
|
|
144
|
-
* ],
|
|
145
|
-
* },
|
|
146
|
-
* description: "example request header transform rule",
|
|
147
|
-
* enabled: false,
|
|
148
|
-
* expression: "true",
|
|
149
|
-
* }],
|
|
150
|
-
* zoneId: "cb029e245cfdd66dc8d2e570d5dd3322",
|
|
151
|
-
* });
|
|
152
|
-
* // HTTP rate limit for an API route
|
|
153
|
-
* const rateLimitingExample = new cloudflare.Ruleset("rate_limiting_example", {
|
|
154
|
-
* description: "apply HTTP rate limiting for a route",
|
|
155
|
-
* kind: "zone",
|
|
156
|
-
* name: "restrict API requests count",
|
|
157
|
-
* phase: "http_ratelimit",
|
|
158
|
-
* rules: [{
|
|
159
|
-
* action: "block",
|
|
160
|
-
* description: "rate limit for API",
|
|
161
|
-
* enabled: true,
|
|
162
|
-
* expression: "(http.request.uri.path matches \"^/api/\")",
|
|
163
|
-
* ratelimit: {
|
|
164
|
-
* characteristics: [
|
|
165
|
-
* "cf.colo.id",
|
|
166
|
-
* "ip.src",
|
|
167
|
-
* ],
|
|
168
|
-
* mitigationTimeout: 600,
|
|
169
|
-
* period: 60,
|
|
170
|
-
* requestsPerPeriod: 100,
|
|
171
|
-
* },
|
|
172
|
-
* }],
|
|
173
|
-
* zoneId: "cb029e245cfdd66dc8d2e570d5dd3322",
|
|
174
|
-
* });
|
|
175
|
-
* ```
|
|
176
|
-
*
|
|
177
4
|
* ## Import
|
|
178
5
|
*
|
|
179
6
|
* Currently, you cannot import rulesets.
|
|
@@ -211,7 +38,7 @@ export declare class Ruleset extends pulumi.CustomResource {
|
|
|
211
38
|
*/
|
|
212
39
|
readonly name: pulumi.Output<string>;
|
|
213
40
|
/**
|
|
214
|
-
* Point in the request/response lifecycle where the ruleset will be created. Valid values are `"ddosL4"`, `"ddosL7"`, `"httpRequestFirewallCustom"`, `"httpRequestFirewallManaged"`, `"httpRequestLateTransform"`, `"httpRequestMain"`, `"httpRequestSanitize"`, `"httpRequestTransform"`, `"httpResponseFirewallManaged"`, `"magicTransit"`, or `"httpRatelimit"`.
|
|
41
|
+
* Point in the request/response lifecycle where the ruleset will be created. Valid values are `"ddosL4"`, `"ddosL7"`, `"httpRequestFirewallCustom"`, `"httpRequestFirewallManaged"`, `"httpRequestLateTransform"`, `"httpResponseHeadersTransform"`, `"httpRequestMain"`, `"httpRequestSanitize"`, `"httpRequestTransform"`, `"httpResponseFirewallManaged"`, `"magicTransit"`, or `"httpRatelimit"`.
|
|
215
42
|
*/
|
|
216
43
|
readonly phase: pulumi.Output<string>;
|
|
217
44
|
/**
|
|
@@ -256,7 +83,7 @@ export interface RulesetState {
|
|
|
256
83
|
*/
|
|
257
84
|
name?: pulumi.Input<string>;
|
|
258
85
|
/**
|
|
259
|
-
* Point in the request/response lifecycle where the ruleset will be created. Valid values are `"ddosL4"`, `"ddosL7"`, `"httpRequestFirewallCustom"`, `"httpRequestFirewallManaged"`, `"httpRequestLateTransform"`, `"httpRequestMain"`, `"httpRequestSanitize"`, `"httpRequestTransform"`, `"httpResponseFirewallManaged"`, `"magicTransit"`, or `"httpRatelimit"`.
|
|
86
|
+
* Point in the request/response lifecycle where the ruleset will be created. Valid values are `"ddosL4"`, `"ddosL7"`, `"httpRequestFirewallCustom"`, `"httpRequestFirewallManaged"`, `"httpRequestLateTransform"`, `"httpResponseHeadersTransform"`, `"httpRequestMain"`, `"httpRequestSanitize"`, `"httpRequestTransform"`, `"httpResponseFirewallManaged"`, `"magicTransit"`, or `"httpRatelimit"`.
|
|
260
87
|
*/
|
|
261
88
|
phase?: pulumi.Input<string>;
|
|
262
89
|
/**
|
|
@@ -293,7 +120,7 @@ export interface RulesetArgs {
|
|
|
293
120
|
*/
|
|
294
121
|
name: pulumi.Input<string>;
|
|
295
122
|
/**
|
|
296
|
-
* Point in the request/response lifecycle where the ruleset will be created. Valid values are `"ddosL4"`, `"ddosL7"`, `"httpRequestFirewallCustom"`, `"httpRequestFirewallManaged"`, `"httpRequestLateTransform"`, `"httpRequestMain"`, `"httpRequestSanitize"`, `"httpRequestTransform"`, `"httpResponseFirewallManaged"`, `"magicTransit"`, or `"httpRatelimit"`.
|
|
123
|
+
* Point in the request/response lifecycle where the ruleset will be created. Valid values are `"ddosL4"`, `"ddosL7"`, `"httpRequestFirewallCustom"`, `"httpRequestFirewallManaged"`, `"httpRequestLateTransform"`, `"httpResponseHeadersTransform"`, `"httpRequestMain"`, `"httpRequestSanitize"`, `"httpRequestTransform"`, `"httpResponseFirewallManaged"`, `"magicTransit"`, or `"httpRatelimit"`.
|
|
297
124
|
*/
|
|
298
125
|
phase: pulumi.Input<string>;
|
|
299
126
|
/**
|
package/ruleset.js
CHANGED
|
@@ -2,182 +2,10 @@
|
|
|
2
2
|
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
3
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Ruleset = void 0;
|
|
5
6
|
const pulumi = require("@pulumi/pulumi");
|
|
6
7
|
const utilities = require("./utilities");
|
|
7
8
|
/**
|
|
8
|
-
* The [Cloudflare Ruleset Engine](https://developers.cloudflare.com/firewall/cf-rulesets)
|
|
9
|
-
* allows you to create and deploy rules and rulesets.
|
|
10
|
-
* The engine syntax, inspired by the Wireshark Display Filter language, is the
|
|
11
|
-
* same syntax used in custom Firewall Rules. Cloudflare uses the Ruleset Engine
|
|
12
|
-
* in different products, allowing you to configure several products using the same
|
|
13
|
-
* basic syntax.
|
|
14
|
-
*
|
|
15
|
-
* ## Example Usage
|
|
16
|
-
*
|
|
17
|
-
* ```typescript
|
|
18
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
19
|
-
* import * as cloudflare from "@pulumi/cloudflare";
|
|
20
|
-
*
|
|
21
|
-
* // Magic Transit
|
|
22
|
-
* const magicTransitExample = new cloudflare.Ruleset("magic_transit_example", {
|
|
23
|
-
* accountId: "d41d8cd98f00b204e9800998ecf8427e",
|
|
24
|
-
* description: "example magic transit ruleset description",
|
|
25
|
-
* kind: "root",
|
|
26
|
-
* name: "account magic transit",
|
|
27
|
-
* phase: "magic_transit",
|
|
28
|
-
* rules: [{
|
|
29
|
-
* action: "allow",
|
|
30
|
-
* description: "Allow TCP Ephemeral Ports",
|
|
31
|
-
* expression: "tcp.dstport in { 32768..65535 }",
|
|
32
|
-
* }],
|
|
33
|
-
* });
|
|
34
|
-
* // Zone-level WAF Managed Ruleset
|
|
35
|
-
* const zoneLevelManagedWaf = new cloudflare.Ruleset("zone_level_managed_waf", {
|
|
36
|
-
* description: "managed WAF ruleset description",
|
|
37
|
-
* kind: "zone",
|
|
38
|
-
* name: "managed WAF",
|
|
39
|
-
* phase: "http_request_firewall_managed",
|
|
40
|
-
* rules: [{
|
|
41
|
-
* action: "execute",
|
|
42
|
-
* actionParameters: {
|
|
43
|
-
* id: "efb7b8c949ac4650a09736fc376e9aee",
|
|
44
|
-
* },
|
|
45
|
-
* description: "Execute Cloudflare Managed Ruleset on my zone-level phase entry point ruleset",
|
|
46
|
-
* enabled: true,
|
|
47
|
-
* expression: "true",
|
|
48
|
-
* }],
|
|
49
|
-
* zoneId: "cb029e245cfdd66dc8d2e570d5dd3322",
|
|
50
|
-
* });
|
|
51
|
-
* // Zone-level WAF with tag-based overrides
|
|
52
|
-
* const zoneLevelManagedWafWithCategoryBasedOverrides = new cloudflare.Ruleset("zone_level_managed_waf_with_category_based_overrides", {
|
|
53
|
-
* description: "managed WAF with tag-based overrides ruleset description",
|
|
54
|
-
* kind: "zone",
|
|
55
|
-
* name: "managed WAF with tag-based overrides",
|
|
56
|
-
* phase: "http_request_firewall_managed",
|
|
57
|
-
* rules: [{
|
|
58
|
-
* action: "execute",
|
|
59
|
-
* actionParameters: {
|
|
60
|
-
* id: "efb7b8c949ac4650a09736fc376e9aee",
|
|
61
|
-
* overrides: {
|
|
62
|
-
* categories: [
|
|
63
|
-
* {
|
|
64
|
-
* action: "block",
|
|
65
|
-
* category: "wordpress",
|
|
66
|
-
* enabled: true,
|
|
67
|
-
* },
|
|
68
|
-
* {
|
|
69
|
-
* action: "block",
|
|
70
|
-
* category: "joomla",
|
|
71
|
-
* enabled: true,
|
|
72
|
-
* },
|
|
73
|
-
* ],
|
|
74
|
-
* },
|
|
75
|
-
* },
|
|
76
|
-
* description: "overrides to only enable wordpress rules to block",
|
|
77
|
-
* enabled: false,
|
|
78
|
-
* expression: "true",
|
|
79
|
-
* }],
|
|
80
|
-
* zoneId: "cb029e245cfdd66dc8d2e570d5dd3322",
|
|
81
|
-
* });
|
|
82
|
-
* // Rewrite the URI path component to a static path
|
|
83
|
-
* const transformUriRulePath = new cloudflare.Ruleset("transform_uri_rule_path", {
|
|
84
|
-
* description: "change the URI path to a new static path",
|
|
85
|
-
* kind: "zone",
|
|
86
|
-
* name: "transform rule for URI path",
|
|
87
|
-
* phase: "http_request_transform",
|
|
88
|
-
* rules: [{
|
|
89
|
-
* action: "rewrite",
|
|
90
|
-
* actionParameters: {
|
|
91
|
-
* uri: {
|
|
92
|
-
* path: {
|
|
93
|
-
* value: "/my-new-route",
|
|
94
|
-
* },
|
|
95
|
-
* },
|
|
96
|
-
* },
|
|
97
|
-
* description: "example URI path transform rule",
|
|
98
|
-
* enabled: true,
|
|
99
|
-
* expression: "(http.host eq \"example.com\" and http.uri.path eq \"/old-path\")",
|
|
100
|
-
* }],
|
|
101
|
-
* zoneId: "cb029e245cfdd66dc8d2e570d5dd3322",
|
|
102
|
-
* });
|
|
103
|
-
* // Rewrite the URI query component to a static query
|
|
104
|
-
* const transformUriRuleQuery = new cloudflare.Ruleset("transform_uri_rule_query", {
|
|
105
|
-
* description: "change the URI query to a new static query",
|
|
106
|
-
* kind: "zone",
|
|
107
|
-
* name: "transform rule for URI query parameter",
|
|
108
|
-
* phase: "http_request_transform",
|
|
109
|
-
* rules: [{
|
|
110
|
-
* action: "rewrite",
|
|
111
|
-
* actionParameters: {
|
|
112
|
-
* uri: {
|
|
113
|
-
* query: {
|
|
114
|
-
* value: "old=new_again",
|
|
115
|
-
* },
|
|
116
|
-
* },
|
|
117
|
-
* },
|
|
118
|
-
* description: "URI transformation query example",
|
|
119
|
-
* enabled: true,
|
|
120
|
-
* expression: "true",
|
|
121
|
-
* }],
|
|
122
|
-
* zoneId: "cb029e245cfdd66dc8d2e570d5dd3322",
|
|
123
|
-
* });
|
|
124
|
-
* // Rewrite HTTP headers to a modified values
|
|
125
|
-
* const transformUriHttpHeaders = new cloudflare.Ruleset("transform_uri_http_headers", {
|
|
126
|
-
* description: "modify HTTP headers before reaching origin",
|
|
127
|
-
* kind: "zone",
|
|
128
|
-
* name: "transform rule for HTTP headers",
|
|
129
|
-
* phase: "http_request_late_transform",
|
|
130
|
-
* rules: [{
|
|
131
|
-
* action: "rewrite",
|
|
132
|
-
* actionParameters: {
|
|
133
|
-
* headers: [
|
|
134
|
-
* {
|
|
135
|
-
* name: "example-http-header-1",
|
|
136
|
-
* operation: "set",
|
|
137
|
-
* value: "my-http-header-value-1",
|
|
138
|
-
* },
|
|
139
|
-
* {
|
|
140
|
-
* expression: "cf.zone.name",
|
|
141
|
-
* name: "example-http-header-2",
|
|
142
|
-
* operation: "set",
|
|
143
|
-
* },
|
|
144
|
-
* {
|
|
145
|
-
* name: "example-http-header-3-to-remove",
|
|
146
|
-
* operation: "remove",
|
|
147
|
-
* },
|
|
148
|
-
* ],
|
|
149
|
-
* },
|
|
150
|
-
* description: "example request header transform rule",
|
|
151
|
-
* enabled: false,
|
|
152
|
-
* expression: "true",
|
|
153
|
-
* }],
|
|
154
|
-
* zoneId: "cb029e245cfdd66dc8d2e570d5dd3322",
|
|
155
|
-
* });
|
|
156
|
-
* // HTTP rate limit for an API route
|
|
157
|
-
* const rateLimitingExample = new cloudflare.Ruleset("rate_limiting_example", {
|
|
158
|
-
* description: "apply HTTP rate limiting for a route",
|
|
159
|
-
* kind: "zone",
|
|
160
|
-
* name: "restrict API requests count",
|
|
161
|
-
* phase: "http_ratelimit",
|
|
162
|
-
* rules: [{
|
|
163
|
-
* action: "block",
|
|
164
|
-
* description: "rate limit for API",
|
|
165
|
-
* enabled: true,
|
|
166
|
-
* expression: "(http.request.uri.path matches \"^/api/\")",
|
|
167
|
-
* ratelimit: {
|
|
168
|
-
* characteristics: [
|
|
169
|
-
* "cf.colo.id",
|
|
170
|
-
* "ip.src",
|
|
171
|
-
* ],
|
|
172
|
-
* mitigationTimeout: 600,
|
|
173
|
-
* period: 60,
|
|
174
|
-
* requestsPerPeriod: 100,
|
|
175
|
-
* },
|
|
176
|
-
* }],
|
|
177
|
-
* zoneId: "cb029e245cfdd66dc8d2e570d5dd3322",
|
|
178
|
-
* });
|
|
179
|
-
* ```
|
|
180
|
-
*
|
|
181
9
|
* ## Import
|
|
182
10
|
*
|
|
183
11
|
* Currently, you cannot import rulesets.
|
package/ruleset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ruleset.js","sourceRoot":"","sources":["../ruleset.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF
|
|
1
|
+
{"version":3,"file":"ruleset.js","sourceRoot":"","sources":["../ruleset.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC;;;;GAIG;AACH,MAAa,OAAQ,SAAQ,MAAM,CAAC,cAAc;IAqE9C,YAAY,IAAY,EAAE,WAAwC,EAAE,IAAmC;QACnG,IAAI,MAAM,GAAkB,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAuC,CAAC;YACtD,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,MAAM,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YAChD,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YAChD,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YAClD,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;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CAAC,YAAY,CAAC;IACxD,CAAC;;AA1BL,0BA8GC;AAhGG,gBAAgB;AACO,oBAAY,GAAG,kCAAkC,CAAC"}
|
package/spectrumApplication.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
3
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.SpectrumApplication = void 0;
|
|
5
6
|
const pulumi = require("@pulumi/pulumi");
|
|
6
7
|
const utilities = require("./utilities");
|
|
7
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spectrumApplication.js","sourceRoot":"","sources":["../spectrumApplication.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF
|
|
1
|
+
{"version":3,"file":"spectrumApplication.js","sourceRoot":"","sources":["../spectrumApplication.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAa,mBAAoB,SAAQ,MAAM,CAAC,cAAc;IA6F1D,YAAY,IAAY,EAAE,WAAgE,EAAE,IAAmC;QAC3H,IAAI,MAAM,GAAkB,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAmD,CAAC;YAClE,MAAM,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;YACxE,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9C,MAAM,CAAC,oBAAoB,CAAC,G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B,EAAE,KAAgC,EAAE,IAAmC;QAC9H,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC1E,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,mBAAmB,CAAC,YAAY,CAAC;IACpE,CAAC;;AA1BL,kDA+IC;AAjIG,gBAAgB;AACO,gCAAY,GAAG,0DAA0D,CAAC"}
|
package/splitTunnel.d.ts
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import { input as inputs, output as outputs } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Provides a Cloudflare Split Tunnel resource. Split tunnels are used to either
|
|
5
|
+
* include or exclude lists of routes from the WARP client's tunnel.
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as cloudflare from "@pulumi/cloudflare";
|
|
12
|
+
*
|
|
13
|
+
* // Excluding *.example.com from WARP routes
|
|
14
|
+
* const exampleSplitTunnelExclude = new cloudflare.SplitTunnel("example_split_tunnel_exclude", {
|
|
15
|
+
* accountId: "1d5fdc9e88c8a8c4518b068cd94331fe",
|
|
16
|
+
* mode: "exclude",
|
|
17
|
+
* tunnels: [{
|
|
18
|
+
* description: "example domain",
|
|
19
|
+
* host: "*.example.com",
|
|
20
|
+
* }],
|
|
21
|
+
* });
|
|
22
|
+
* // Including *.example.com in WARP routes
|
|
23
|
+
* const exampleSplitTunnelInclude = new cloudflare.SplitTunnel("example_split_tunnel_include", {
|
|
24
|
+
* accountId: "1d5fdc9e88c8a8c4518b068cd94331fe",
|
|
25
|
+
* mode: "include",
|
|
26
|
+
* tunnels: [{
|
|
27
|
+
* description: "example domain",
|
|
28
|
+
* host: "*.example.com",
|
|
29
|
+
* }],
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* ## Import
|
|
34
|
+
*
|
|
35
|
+
* Split Tunnels can be imported using the account identifer and mode.
|
|
36
|
+
*
|
|
37
|
+
* ```sh
|
|
38
|
+
* $ pulumi import cloudflare:index/splitTunnel:SplitTunnel example 1d5fdc9e88c8a8c4518b068cd94331fe/exclude
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare class SplitTunnel extends pulumi.CustomResource {
|
|
42
|
+
/**
|
|
43
|
+
* Get an existing SplitTunnel resource's state with the given name, ID, and optional extra
|
|
44
|
+
* properties used to qualify the lookup.
|
|
45
|
+
*
|
|
46
|
+
* @param name The _unique_ name of the resulting resource.
|
|
47
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
48
|
+
* @param state Any extra arguments used during the lookup.
|
|
49
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
50
|
+
*/
|
|
51
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SplitTunnelState, opts?: pulumi.CustomResourceOptions): SplitTunnel;
|
|
52
|
+
/**
|
|
53
|
+
* Returns true if the given object is an instance of SplitTunnel. This is designed to work even
|
|
54
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
55
|
+
*/
|
|
56
|
+
static isInstance(obj: any): obj is SplitTunnel;
|
|
57
|
+
/**
|
|
58
|
+
* The account to which the device posture rule should be added.
|
|
59
|
+
*/
|
|
60
|
+
readonly accountId: pulumi.Output<string>;
|
|
61
|
+
/**
|
|
62
|
+
* The split tunnel mode. Valid values are `include` or `exclude`.
|
|
63
|
+
*/
|
|
64
|
+
readonly mode: pulumi.Output<string>;
|
|
65
|
+
/**
|
|
66
|
+
* The value of the tunnel attributes (refer to the nested schema).
|
|
67
|
+
*/
|
|
68
|
+
readonly tunnels: pulumi.Output<outputs.SplitTunnelTunnel[]>;
|
|
69
|
+
/**
|
|
70
|
+
* Create a SplitTunnel resource with the given unique name, arguments, and options.
|
|
71
|
+
*
|
|
72
|
+
* @param name The _unique_ name of the resource.
|
|
73
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
74
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
75
|
+
*/
|
|
76
|
+
constructor(name: string, args: SplitTunnelArgs, opts?: pulumi.CustomResourceOptions);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Input properties used for looking up and filtering SplitTunnel resources.
|
|
80
|
+
*/
|
|
81
|
+
export interface SplitTunnelState {
|
|
82
|
+
/**
|
|
83
|
+
* The account to which the device posture rule should be added.
|
|
84
|
+
*/
|
|
85
|
+
accountId?: pulumi.Input<string>;
|
|
86
|
+
/**
|
|
87
|
+
* The split tunnel mode. Valid values are `include` or `exclude`.
|
|
88
|
+
*/
|
|
89
|
+
mode?: pulumi.Input<string>;
|
|
90
|
+
/**
|
|
91
|
+
* The value of the tunnel attributes (refer to the nested schema).
|
|
92
|
+
*/
|
|
93
|
+
tunnels?: pulumi.Input<pulumi.Input<inputs.SplitTunnelTunnel>[]>;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The set of arguments for constructing a SplitTunnel resource.
|
|
97
|
+
*/
|
|
98
|
+
export interface SplitTunnelArgs {
|
|
99
|
+
/**
|
|
100
|
+
* The account to which the device posture rule should be added.
|
|
101
|
+
*/
|
|
102
|
+
accountId: pulumi.Input<string>;
|
|
103
|
+
/**
|
|
104
|
+
* The split tunnel mode. Valid values are `include` or `exclude`.
|
|
105
|
+
*/
|
|
106
|
+
mode: pulumi.Input<string>;
|
|
107
|
+
/**
|
|
108
|
+
* The value of the tunnel attributes (refer to the nested schema).
|
|
109
|
+
*/
|
|
110
|
+
tunnels: pulumi.Input<pulumi.Input<inputs.SplitTunnelTunnel>[]>;
|
|
111
|
+
}
|
package/splitTunnel.js
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.SplitTunnel = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Provides a Cloudflare Split Tunnel resource. Split tunnels are used to either
|
|
10
|
+
* include or exclude lists of routes from the WARP client's tunnel.
|
|
11
|
+
*
|
|
12
|
+
* ## Example Usage
|
|
13
|
+
*
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
16
|
+
* import * as cloudflare from "@pulumi/cloudflare";
|
|
17
|
+
*
|
|
18
|
+
* // Excluding *.example.com from WARP routes
|
|
19
|
+
* const exampleSplitTunnelExclude = new cloudflare.SplitTunnel("example_split_tunnel_exclude", {
|
|
20
|
+
* accountId: "1d5fdc9e88c8a8c4518b068cd94331fe",
|
|
21
|
+
* mode: "exclude",
|
|
22
|
+
* tunnels: [{
|
|
23
|
+
* description: "example domain",
|
|
24
|
+
* host: "*.example.com",
|
|
25
|
+
* }],
|
|
26
|
+
* });
|
|
27
|
+
* // Including *.example.com in WARP routes
|
|
28
|
+
* const exampleSplitTunnelInclude = new cloudflare.SplitTunnel("example_split_tunnel_include", {
|
|
29
|
+
* accountId: "1d5fdc9e88c8a8c4518b068cd94331fe",
|
|
30
|
+
* mode: "include",
|
|
31
|
+
* tunnels: [{
|
|
32
|
+
* description: "example domain",
|
|
33
|
+
* host: "*.example.com",
|
|
34
|
+
* }],
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* ## Import
|
|
39
|
+
*
|
|
40
|
+
* Split Tunnels can be imported using the account identifer and mode.
|
|
41
|
+
*
|
|
42
|
+
* ```sh
|
|
43
|
+
* $ pulumi import cloudflare:index/splitTunnel:SplitTunnel example 1d5fdc9e88c8a8c4518b068cd94331fe/exclude
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
class SplitTunnel extends pulumi.CustomResource {
|
|
47
|
+
constructor(name, argsOrState, opts) {
|
|
48
|
+
let inputs = {};
|
|
49
|
+
opts = opts || {};
|
|
50
|
+
if (opts.id) {
|
|
51
|
+
const state = argsOrState;
|
|
52
|
+
inputs["accountId"] = state ? state.accountId : undefined;
|
|
53
|
+
inputs["mode"] = state ? state.mode : undefined;
|
|
54
|
+
inputs["tunnels"] = state ? state.tunnels : undefined;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
const args = argsOrState;
|
|
58
|
+
if ((!args || args.accountId === undefined) && !opts.urn) {
|
|
59
|
+
throw new Error("Missing required property 'accountId'");
|
|
60
|
+
}
|
|
61
|
+
if ((!args || args.mode === undefined) && !opts.urn) {
|
|
62
|
+
throw new Error("Missing required property 'mode'");
|
|
63
|
+
}
|
|
64
|
+
if ((!args || args.tunnels === undefined) && !opts.urn) {
|
|
65
|
+
throw new Error("Missing required property 'tunnels'");
|
|
66
|
+
}
|
|
67
|
+
inputs["accountId"] = args ? args.accountId : undefined;
|
|
68
|
+
inputs["mode"] = args ? args.mode : undefined;
|
|
69
|
+
inputs["tunnels"] = args ? args.tunnels : undefined;
|
|
70
|
+
}
|
|
71
|
+
if (!opts.version) {
|
|
72
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
|
|
73
|
+
}
|
|
74
|
+
super(SplitTunnel.__pulumiType, name, inputs, opts);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Get an existing SplitTunnel resource's state with the given name, ID, and optional extra
|
|
78
|
+
* properties used to qualify the lookup.
|
|
79
|
+
*
|
|
80
|
+
* @param name The _unique_ name of the resulting resource.
|
|
81
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
82
|
+
* @param state Any extra arguments used during the lookup.
|
|
83
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
84
|
+
*/
|
|
85
|
+
static get(name, id, state, opts) {
|
|
86
|
+
return new SplitTunnel(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Returns true if the given object is an instance of SplitTunnel. This is designed to work even
|
|
90
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
91
|
+
*/
|
|
92
|
+
static isInstance(obj) {
|
|
93
|
+
if (obj === undefined || obj === null) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
return obj['__pulumiType'] === SplitTunnel.__pulumiType;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.SplitTunnel = SplitTunnel;
|
|
100
|
+
/** @internal */
|
|
101
|
+
SplitTunnel.__pulumiType = 'cloudflare:index/splitTunnel:SplitTunnel';
|
|
102
|
+
//# sourceMappingURL=splitTunnel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitTunnel.js","sourceRoot":"","sources":["../splitTunnel.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAa,WAAY,SAAQ,MAAM,CAAC,cAAc;IAiDlD,YAAY,IAAY,EAAE,WAAgD,EAAE,IAAmC;QAC3G,IAAI,MAAM,GAAkB,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA2C,CAAC;YAC1D,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAA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,UAAU,EAAE,EAAC,CAAC,CAAC;SACxE;QACD,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;IA3ED;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAwB,EAAE,IAAmC;QACtH,OAAO,IAAI,WAAW,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAClE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,WAAW,CAAC,YAAY,CAAC;IAC5D,CAAC;;AA1BL,kCA6EC;AA/DG,gBAAgB;AACO,wBAAY,GAAG,0CAA0C,CAAC"}
|
package/staticRoute.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
3
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.StaticRoute = void 0;
|
|
5
6
|
const pulumi = require("@pulumi/pulumi");
|
|
6
7
|
const utilities = require("./utilities");
|
|
7
8
|
/**
|