@gradientedge/cdk-utils 10.2.0 → 10.3.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/dist/src/lib/cloudflare/services/access/main.js +23 -23
- package/dist/src/lib/cloudflare/services/api-shield/main.js +11 -11
- package/dist/src/lib/cloudflare/services/argo/main.js +5 -5
- package/dist/src/lib/cloudflare/services/filter/main.js +3 -3
- package/dist/src/lib/cloudflare/services/firewall/main.js +3 -3
- package/dist/src/lib/cloudflare/services/page/main.js +7 -7
- package/dist/src/lib/cloudflare/services/record/main.js +3 -3
- package/dist/src/lib/cloudflare/services/rule-set/main.d.ts +1 -1
- package/dist/src/lib/cloudflare/services/rule-set/main.js +4 -5
- package/dist/src/lib/cloudflare/services/worker/main.js +13 -13
- package/dist/src/lib/cloudflare/services/zone/main.js +18 -18
- package/package.json +1 -1
- package/src/lib/cloudflare/services/access/main.ts +114 -58
- package/src/lib/cloudflare/services/api-shield/main.ts +48 -22
- package/src/lib/cloudflare/services/argo/main.ts +17 -9
- package/src/lib/cloudflare/services/filter/main.ts +9 -5
- package/src/lib/cloudflare/services/firewall/main.ts +9 -5
- package/src/lib/cloudflare/services/page/main.ts +27 -15
- package/src/lib/cloudflare/services/record/main.ts +9 -5
- package/src/lib/cloudflare/services/rule-set/main.ts +10 -8
- package/src/lib/cloudflare/services/worker/main.ts +60 -29
- package/src/lib/cloudflare/services/zone/main.ts +75 -35
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AccessRule, ZeroTrustAccessApplication, ZeroTrustAccessCustomPage, ZeroTrustAccessGroup, ZeroTrustAccessIdentityProvider, ZeroTrustAccessMtlsCertificate, ZeroTrustAccessPolicy, ZeroTrustAccessServiceToken, ZeroTrustAccessShortLivedCertificate, ZeroTrustAccessTag, ZeroTrustOrganization, } from '@pulumi/cloudflare';
|
|
2
2
|
/**
|
|
3
3
|
* @classdesc Provides operations on Cloudflare Access
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonCloudflareComponent} constructor.
|
|
@@ -31,12 +31,12 @@ export class CloudflareAccessManager {
|
|
|
31
31
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, {
|
|
32
32
|
filter: { name: scope.props.domainName },
|
|
33
33
|
})?.id;
|
|
34
|
-
return new
|
|
34
|
+
return new ZeroTrustAccessApplication(`${id}`, {
|
|
35
35
|
...props,
|
|
36
36
|
domain: `${props.domain}-${scope.props.domainName}`,
|
|
37
37
|
name: `${props.name}-${scope.props.stage}`,
|
|
38
38
|
zoneId,
|
|
39
|
-
});
|
|
39
|
+
}, { parent: scope });
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* @summary Method to create a new Cloudflare Application Access Short Lived Certificate
|
|
@@ -53,10 +53,10 @@ export class CloudflareAccessManager {
|
|
|
53
53
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, {
|
|
54
54
|
filter: { name: scope.props.domainName },
|
|
55
55
|
})?.id;
|
|
56
|
-
return new
|
|
56
|
+
return new ZeroTrustAccessShortLivedCertificate(`${id}`, {
|
|
57
57
|
...props,
|
|
58
58
|
zoneId,
|
|
59
|
-
});
|
|
59
|
+
}, { parent: scope });
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* @summary Method to create a new Cloudflare Application Access Custom Page
|
|
@@ -68,11 +68,11 @@ export class CloudflareAccessManager {
|
|
|
68
68
|
createAccessCustomPage(id, scope, props) {
|
|
69
69
|
if (!props)
|
|
70
70
|
throw `Props undefined for ${id}`;
|
|
71
|
-
return new
|
|
71
|
+
return new ZeroTrustAccessCustomPage(`${id}`, {
|
|
72
72
|
...props,
|
|
73
73
|
accountId: props.accountId ?? scope.props.accountId,
|
|
74
74
|
name: `${props.name}-${scope.props.stage}`,
|
|
75
|
-
});
|
|
75
|
+
}, { parent: scope });
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* @summary Method to create a new Cloudflare Application Access Group
|
|
@@ -89,11 +89,11 @@ export class CloudflareAccessManager {
|
|
|
89
89
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, {
|
|
90
90
|
filter: { name: scope.props.domainName },
|
|
91
91
|
})?.id;
|
|
92
|
-
return new
|
|
92
|
+
return new ZeroTrustAccessGroup(`${id}`, {
|
|
93
93
|
...props,
|
|
94
94
|
name: `${props.name} - ${scope.props.stage.toUpperCase()}`,
|
|
95
95
|
zoneId,
|
|
96
|
-
});
|
|
96
|
+
}, { parent: scope });
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* @summary Method to create a new Cloudflare Application Access Identity Provider
|
|
@@ -110,12 +110,12 @@ export class CloudflareAccessManager {
|
|
|
110
110
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, {
|
|
111
111
|
filter: { name: scope.props.domainName },
|
|
112
112
|
})?.id;
|
|
113
|
-
return new
|
|
113
|
+
return new ZeroTrustAccessIdentityProvider(`${id}`, {
|
|
114
114
|
...props,
|
|
115
115
|
config: props.config ?? {},
|
|
116
116
|
name: `${props.name}-${scope.props.stage}`,
|
|
117
117
|
zoneId,
|
|
118
|
-
});
|
|
118
|
+
}, { parent: scope });
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
121
|
* @summary Method to create a new Cloudflare Application Access Mutual Tls Certificate
|
|
@@ -132,11 +132,11 @@ export class CloudflareAccessManager {
|
|
|
132
132
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, {
|
|
133
133
|
filter: { name: scope.props.domainName },
|
|
134
134
|
})?.id;
|
|
135
|
-
return new
|
|
135
|
+
return new ZeroTrustAccessMtlsCertificate(`${id}`, {
|
|
136
136
|
...props,
|
|
137
137
|
name: `${props.name}-${scope.props.stage}`,
|
|
138
138
|
zoneId,
|
|
139
|
-
});
|
|
139
|
+
}, { parent: scope });
|
|
140
140
|
}
|
|
141
141
|
/**
|
|
142
142
|
* @summary Method to create a new Cloudflare Application Access Organisation
|
|
@@ -153,11 +153,11 @@ export class CloudflareAccessManager {
|
|
|
153
153
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, {
|
|
154
154
|
filter: { name: scope.props.domainName },
|
|
155
155
|
})?.id;
|
|
156
|
-
return new
|
|
156
|
+
return new ZeroTrustOrganization(`${id}`, {
|
|
157
157
|
...props,
|
|
158
158
|
name: `${props.name}-${scope.props.stage}`,
|
|
159
159
|
zoneId,
|
|
160
|
-
});
|
|
160
|
+
}, { parent: scope });
|
|
161
161
|
}
|
|
162
162
|
/**
|
|
163
163
|
* @summary Method to create a new Cloudflare Application Access Policy
|
|
@@ -169,11 +169,11 @@ export class CloudflareAccessManager {
|
|
|
169
169
|
createAccessPolicy(id, scope, props) {
|
|
170
170
|
if (!props)
|
|
171
171
|
throw `Props undefined for ${id}`;
|
|
172
|
-
return new
|
|
172
|
+
return new ZeroTrustAccessPolicy(`${id}`, {
|
|
173
173
|
...props,
|
|
174
174
|
name: `${props.name}-${scope.props.stage}`,
|
|
175
175
|
accountId: props.accountId ?? scope.props.accountId,
|
|
176
|
-
});
|
|
176
|
+
}, { parent: scope });
|
|
177
177
|
}
|
|
178
178
|
/**
|
|
179
179
|
* @summary Method to create a new Cloudflare Application Access Rule
|
|
@@ -190,11 +190,11 @@ export class CloudflareAccessManager {
|
|
|
190
190
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, {
|
|
191
191
|
filter: { name: scope.props.domainName },
|
|
192
192
|
})?.id;
|
|
193
|
-
return new
|
|
193
|
+
return new AccessRule(`${id}`, {
|
|
194
194
|
...props,
|
|
195
195
|
zoneId,
|
|
196
196
|
accountId: props.accountId ?? scope.props.accountId,
|
|
197
|
-
});
|
|
197
|
+
}, { parent: scope });
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
200
|
* @summary Method to create a new Cloudflare Application Access Service Token
|
|
@@ -211,12 +211,12 @@ export class CloudflareAccessManager {
|
|
|
211
211
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, {
|
|
212
212
|
filter: { name: scope.props.domainName },
|
|
213
213
|
})?.id;
|
|
214
|
-
return new
|
|
214
|
+
return new ZeroTrustAccessServiceToken(`${id}`, {
|
|
215
215
|
...props,
|
|
216
216
|
name: `${props.name}-${scope.props.stage}`,
|
|
217
217
|
accountId: props.accountId ?? scope.props.accountId,
|
|
218
218
|
zoneId,
|
|
219
|
-
});
|
|
219
|
+
}, { parent: scope });
|
|
220
220
|
}
|
|
221
221
|
/**
|
|
222
222
|
* @summary Method to create a new Cloudflare Application Access Tag
|
|
@@ -228,10 +228,10 @@ export class CloudflareAccessManager {
|
|
|
228
228
|
createAccessTag(id, scope, props) {
|
|
229
229
|
if (!props)
|
|
230
230
|
throw `Props undefined for ${id}`;
|
|
231
|
-
return new
|
|
231
|
+
return new ZeroTrustAccessTag(`${id}`, {
|
|
232
232
|
...props,
|
|
233
233
|
name: `${props.name}-${scope.props.stage}`,
|
|
234
234
|
accountId: props.accountId ?? scope.props.accountId,
|
|
235
|
-
});
|
|
235
|
+
}, { parent: scope });
|
|
236
236
|
}
|
|
237
237
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ApiShield, ApiShieldOperation, ApiShieldOperationSchemaValidationSettings, ApiShieldSchema, ApiShieldSchemaValidationSettings, } from '@pulumi/cloudflare';
|
|
2
2
|
/**
|
|
3
3
|
* @classdesc Provides operations on Cloudflare Api Shield
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonCloudflareConstruct} constructor.
|
|
@@ -30,10 +30,10 @@ export class CloudflareApiShieldManager {
|
|
|
30
30
|
const zoneId = props.zoneId
|
|
31
31
|
? props.zoneId
|
|
32
32
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
33
|
-
return new
|
|
33
|
+
return new ApiShield(`${id}`, {
|
|
34
34
|
...props,
|
|
35
35
|
zoneId,
|
|
36
|
-
});
|
|
36
|
+
}, { parent: scope });
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* @summary Method to create a new Cloudflare Api Shield Schema
|
|
@@ -48,11 +48,11 @@ export class CloudflareApiShieldManager {
|
|
|
48
48
|
const zoneId = props.zoneId
|
|
49
49
|
? props.zoneId
|
|
50
50
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
51
|
-
return new
|
|
51
|
+
return new ApiShieldSchema(`${id}`, {
|
|
52
52
|
...props,
|
|
53
53
|
name: `${props.name}-${scope.props.stage}`,
|
|
54
54
|
zoneId,
|
|
55
|
-
});
|
|
55
|
+
}, { parent: scope });
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* @summary Method to create a new Cloudflare Api Shield Schema Validation Settings
|
|
@@ -67,10 +67,10 @@ export class CloudflareApiShieldManager {
|
|
|
67
67
|
const zoneId = props.zoneId
|
|
68
68
|
? props.zoneId
|
|
69
69
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
70
|
-
return new
|
|
70
|
+
return new ApiShieldSchemaValidationSettings(`${id}`, {
|
|
71
71
|
...props,
|
|
72
72
|
zoneId,
|
|
73
|
-
});
|
|
73
|
+
}, { parent: scope });
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* @summary Method to create a new Cloudflare Api Shield Operation
|
|
@@ -85,10 +85,10 @@ export class CloudflareApiShieldManager {
|
|
|
85
85
|
const zoneId = props.zoneId
|
|
86
86
|
? props.zoneId
|
|
87
87
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
88
|
-
return new
|
|
88
|
+
return new ApiShieldOperation(`${id}`, {
|
|
89
89
|
...props,
|
|
90
90
|
zoneId,
|
|
91
|
-
});
|
|
91
|
+
}, { parent: scope });
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
94
|
* @summary Method to create a new Cloudflare Api Shield Operation Schema Validation Settings
|
|
@@ -103,9 +103,9 @@ export class CloudflareApiShieldManager {
|
|
|
103
103
|
const zoneId = props.zoneId
|
|
104
104
|
? props.zoneId
|
|
105
105
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
106
|
-
return new
|
|
106
|
+
return new ApiShieldOperationSchemaValidationSettings(`${id}`, {
|
|
107
107
|
...props,
|
|
108
108
|
zoneId,
|
|
109
|
-
});
|
|
109
|
+
}, { parent: scope });
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ArgoSmartRouting, ArgoTieredCaching } from '@pulumi/cloudflare';
|
|
2
2
|
/**
|
|
3
3
|
* @classdesc Provides operations on Cloudflare Argo
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonCloudflareConstruct} constructor.
|
|
@@ -30,10 +30,10 @@ export class CloudflareArgoManager {
|
|
|
30
30
|
const zoneId = props.zoneId
|
|
31
31
|
? props.zoneId
|
|
32
32
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
33
|
-
return new
|
|
33
|
+
return new ArgoSmartRouting(`${id}`, {
|
|
34
34
|
...props,
|
|
35
35
|
zoneId,
|
|
36
|
-
});
|
|
36
|
+
}, { parent: scope });
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* @summary Method to create a new Cloudflare Argo Tiered Caching
|
|
@@ -48,9 +48,9 @@ export class CloudflareArgoManager {
|
|
|
48
48
|
const zoneId = props.zoneId
|
|
49
49
|
? props.zoneId
|
|
50
50
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
51
|
-
return new
|
|
51
|
+
return new ArgoTieredCaching(`${id}`, {
|
|
52
52
|
...props,
|
|
53
53
|
zoneId,
|
|
54
|
-
});
|
|
54
|
+
}, { parent: scope });
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Filter } from '@pulumi/cloudflare';
|
|
2
2
|
/**
|
|
3
3
|
* @classdesc Provides operations on Cloudflare Filters
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonCloudflareConstruct} constructor.
|
|
@@ -30,9 +30,9 @@ export class CloudflareFilterManager {
|
|
|
30
30
|
const zoneId = props.zoneId
|
|
31
31
|
? props.zoneId
|
|
32
32
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
33
|
-
return new
|
|
33
|
+
return new Filter(`${id}`, {
|
|
34
34
|
...props,
|
|
35
35
|
zoneId,
|
|
36
|
-
});
|
|
36
|
+
}, { parent: scope });
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FirewallRule } from '@pulumi/cloudflare';
|
|
2
2
|
/**
|
|
3
3
|
* @classdesc Provides operations on Cloudflare Firewall Rules
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonCloudflareConstruct} constructor.
|
|
@@ -30,9 +30,9 @@ export class CloudflareFirewallManager {
|
|
|
30
30
|
const zoneId = props.zoneId
|
|
31
31
|
? props.zoneId
|
|
32
32
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
33
|
-
return new
|
|
33
|
+
return new FirewallRule(`${id}`, {
|
|
34
34
|
...props,
|
|
35
35
|
zoneId,
|
|
36
|
-
});
|
|
36
|
+
}, { parent: scope });
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PageRule, PagesDomain, PagesProject } from '@pulumi/cloudflare';
|
|
2
2
|
import { local } from '@pulumi/command';
|
|
3
3
|
/**
|
|
4
4
|
* @classdesc Provides operations on Cloudflare Pages
|
|
@@ -28,11 +28,11 @@ export class CloudflarePageManager {
|
|
|
28
28
|
createPagesProject(id, scope, props) {
|
|
29
29
|
if (!props)
|
|
30
30
|
throw `Props undefined for ${id}`;
|
|
31
|
-
return new
|
|
31
|
+
return new PagesProject(`${id}`, {
|
|
32
32
|
...props,
|
|
33
33
|
accountId: props.accountId ?? scope.props.accountId,
|
|
34
34
|
name: `${props.name}-${scope.props.stage}`,
|
|
35
|
-
});
|
|
35
|
+
}, { parent: scope });
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* @summary Method to create a new Cloudflare Pages Domain
|
|
@@ -44,11 +44,11 @@ export class CloudflarePageManager {
|
|
|
44
44
|
createPagesDomain(id, scope, props) {
|
|
45
45
|
if (!props)
|
|
46
46
|
throw `Props undefined for ${id}`;
|
|
47
|
-
return new
|
|
47
|
+
return new PagesDomain(`${id}`, {
|
|
48
48
|
...props,
|
|
49
49
|
accountId: props.accountId ?? scope.props.accountId,
|
|
50
50
|
name: props.name ?? scope.props.domainName,
|
|
51
|
-
});
|
|
51
|
+
}, { parent: scope });
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* @summary Method to create a new Cloudflare Page Rule
|
|
@@ -63,10 +63,10 @@ export class CloudflarePageManager {
|
|
|
63
63
|
const zoneId = props.zoneId
|
|
64
64
|
? props.zoneId
|
|
65
65
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
66
|
-
return new
|
|
66
|
+
return new PageRule(`${id}`, {
|
|
67
67
|
...props,
|
|
68
68
|
zoneId,
|
|
69
|
-
});
|
|
69
|
+
}, { parent: scope });
|
|
70
70
|
}
|
|
71
71
|
deployPagesProject(id, scope, props) {
|
|
72
72
|
if (!props)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DnsRecord } from '@pulumi/cloudflare';
|
|
2
2
|
/**
|
|
3
3
|
* @classdesc Provides operations on Cloudflare Records
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonCloudflareConstruct} constructor.
|
|
@@ -30,9 +30,9 @@ export class CloudflareRecordManager {
|
|
|
30
30
|
const zoneId = props.zoneId
|
|
31
31
|
? props.zoneId
|
|
32
32
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
33
|
-
return new
|
|
33
|
+
return new DnsRecord(id, {
|
|
34
34
|
...props,
|
|
35
35
|
zoneId,
|
|
36
|
-
});
|
|
36
|
+
}, { parent: scope });
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -23,7 +23,7 @@ export declare class CloudflareRuleSetManager {
|
|
|
23
23
|
* @param id scoped id of the resource
|
|
24
24
|
* @param scope scope in which this resource is defined
|
|
25
25
|
* @param props rule set properties
|
|
26
|
-
* @see [Pulumi Cloudflare Ruleset]{@link https://www.pulumi.com/registry/packages
|
|
26
|
+
* @see [Pulumi Cloudflare Ruleset]{@link https://www.pulumi.com/registry/packages//api-docs/ruleset/}
|
|
27
27
|
*/
|
|
28
28
|
createRuleSet(id: string, scope: CommonCloudflareConstruct, props: RulesetProps): import("@pulumi/cloudflare/ruleset.js").Ruleset;
|
|
29
29
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Ruleset } from '@pulumi/cloudflare';
|
|
2
2
|
/**
|
|
3
3
|
* @classdesc Provides operations on Cloudflare Rule Sets
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonCloudflareConstruct} constructor.
|
|
@@ -22,7 +22,7 @@ export class CloudflareRuleSetManager {
|
|
|
22
22
|
* @param id scoped id of the resource
|
|
23
23
|
* @param scope scope in which this resource is defined
|
|
24
24
|
* @param props rule set properties
|
|
25
|
-
* @see [Pulumi Cloudflare Ruleset]{@link https://www.pulumi.com/registry/packages
|
|
25
|
+
* @see [Pulumi Cloudflare Ruleset]{@link https://www.pulumi.com/registry/packages//api-docs/ruleset/}
|
|
26
26
|
*/
|
|
27
27
|
createRuleSet(id, scope, props) {
|
|
28
28
|
if (!props)
|
|
@@ -30,10 +30,9 @@ export class CloudflareRuleSetManager {
|
|
|
30
30
|
const zoneId = props.zoneId
|
|
31
31
|
? props.zoneId
|
|
32
32
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
33
|
-
|
|
33
|
+
return new Ruleset(`${id}`, {
|
|
34
34
|
...props,
|
|
35
35
|
zoneId,
|
|
36
|
-
});
|
|
37
|
-
return ruleSet;
|
|
36
|
+
}, { parent: scope });
|
|
38
37
|
}
|
|
39
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { WorkersCronTrigger, WorkersCustomDomain, WorkersKv, WorkersKvNamespace, WorkersRoute, WorkersScript, } from '@pulumi/cloudflare';
|
|
2
2
|
/**
|
|
3
3
|
* @classdesc Provides operations on Cloudflare Worker
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonCloudflareConstruct} constructor.
|
|
@@ -30,11 +30,11 @@ export class CloudflareWorkerManager {
|
|
|
30
30
|
const zoneId = props.zoneId
|
|
31
31
|
? props.zoneId
|
|
32
32
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
33
|
-
return new
|
|
33
|
+
return new WorkersCustomDomain(id, {
|
|
34
34
|
...props,
|
|
35
35
|
accountId: props.accountId ?? scope.props.accountId,
|
|
36
36
|
zoneId,
|
|
37
|
-
});
|
|
37
|
+
}, { parent: scope });
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* @summary Method to create a new Cloudflare Worker Route
|
|
@@ -49,11 +49,11 @@ export class CloudflareWorkerManager {
|
|
|
49
49
|
const zoneId = props.zoneId
|
|
50
50
|
? props.zoneId
|
|
51
51
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id;
|
|
52
|
-
return new
|
|
52
|
+
return new WorkersRoute(id, {
|
|
53
53
|
...props,
|
|
54
54
|
script: `${props.script}-${scope.props.stage}`,
|
|
55
55
|
zoneId,
|
|
56
|
-
});
|
|
56
|
+
}, { parent: scope });
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
59
|
* @summary Method to create a new Cloudflare Worker Script
|
|
@@ -65,11 +65,11 @@ export class CloudflareWorkerManager {
|
|
|
65
65
|
createWorkerScript(id, scope, props) {
|
|
66
66
|
if (!props)
|
|
67
67
|
throw `Props undefined for ${id}`;
|
|
68
|
-
return new
|
|
68
|
+
return new WorkersScript(id, {
|
|
69
69
|
...props,
|
|
70
70
|
accountId: props.accountId ?? scope.props.accountId,
|
|
71
71
|
scriptName: `${props.scriptName}-${scope.props.stage}`,
|
|
72
|
-
});
|
|
72
|
+
}, { parent: scope });
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
75
|
* @summary Method to create a new Cloudflare Workers KV Namespace
|
|
@@ -81,11 +81,11 @@ export class CloudflareWorkerManager {
|
|
|
81
81
|
createWorkersKvNamespace(id, scope, props) {
|
|
82
82
|
if (!props)
|
|
83
83
|
throw `Props undefined for ${id}`;
|
|
84
|
-
return new
|
|
84
|
+
return new WorkersKvNamespace(id, {
|
|
85
85
|
...props,
|
|
86
86
|
accountId: props.accountId ?? scope.props.accountId,
|
|
87
87
|
title: scope.isProductionStage() ? props.title : `${props.title}-${scope.props.stage}`,
|
|
88
|
-
});
|
|
88
|
+
}, { parent: scope });
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* @summary Method to create a new Cloudflare Workers KV
|
|
@@ -97,10 +97,10 @@ export class CloudflareWorkerManager {
|
|
|
97
97
|
createWorkersKv(id, scope, props) {
|
|
98
98
|
if (!props)
|
|
99
99
|
throw `Props undefined for ${id}`;
|
|
100
|
-
return new
|
|
100
|
+
return new WorkersKv(id, {
|
|
101
101
|
...props,
|
|
102
102
|
accountId: props.accountId ?? scope.props.accountId,
|
|
103
|
-
});
|
|
103
|
+
}, { parent: scope });
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* @summary Method to create a new Cloudflare Worker Cron Trigger
|
|
@@ -112,9 +112,9 @@ export class CloudflareWorkerManager {
|
|
|
112
112
|
createWorkerCronTrigger(id, scope, props) {
|
|
113
113
|
if (!props)
|
|
114
114
|
throw `Props undefined for ${id}`;
|
|
115
|
-
return new
|
|
115
|
+
return new WorkersCronTrigger(id, {
|
|
116
116
|
...props,
|
|
117
117
|
accountId: props.accountId ?? scope.props.accountId,
|
|
118
|
-
});
|
|
118
|
+
}, { parent: scope });
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Zone, ZoneCacheReserve, ZoneCacheVariants, ZoneDnssec, ZoneHold, ZoneLockdown, ZoneSetting, } from '@pulumi/cloudflare';
|
|
2
2
|
import * as pulumi from '@pulumi/pulumi';
|
|
3
3
|
/**
|
|
4
4
|
* @classdesc Provides operations on Cloudflare Zone using Pulumi
|
|
@@ -27,15 +27,15 @@ export class CloudflareZoneManager {
|
|
|
27
27
|
createZone(id, scope, props) {
|
|
28
28
|
if (!props)
|
|
29
29
|
throw `Props undefined for ${id}`;
|
|
30
|
-
return new
|
|
30
|
+
return new Zone(id, {
|
|
31
31
|
...props,
|
|
32
32
|
account: props.account ?? scope.props.accountId,
|
|
33
33
|
name: scope.props.domainName,
|
|
34
|
-
});
|
|
34
|
+
}, { parent: scope });
|
|
35
35
|
}
|
|
36
36
|
resolveZone(id, scope, options) {
|
|
37
37
|
const name = options?.filter?.name ?? scope.props.domainName;
|
|
38
|
-
return
|
|
38
|
+
return Zone.get(name, id);
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* @summary Method to create a new zone cache reserve
|
|
@@ -48,10 +48,10 @@ export class CloudflareZoneManager {
|
|
|
48
48
|
throw `Props undefined for ${id}`;
|
|
49
49
|
const zoneId = props.zoneId ??
|
|
50
50
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id;
|
|
51
|
-
return new
|
|
51
|
+
return new ZoneCacheReserve(id, {
|
|
52
52
|
...props,
|
|
53
53
|
zoneId,
|
|
54
|
-
});
|
|
54
|
+
}, { parent: scope });
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* @summary Method to create a new zone cache variants
|
|
@@ -64,10 +64,10 @@ export class CloudflareZoneManager {
|
|
|
64
64
|
throw `Props undefined for ${id}`;
|
|
65
65
|
const zoneId = props.zoneId ??
|
|
66
66
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id;
|
|
67
|
-
return new
|
|
67
|
+
return new ZoneCacheVariants(id, {
|
|
68
68
|
...props,
|
|
69
69
|
zoneId,
|
|
70
|
-
});
|
|
70
|
+
}, { parent: scope });
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* @summary Method to create a new zone dnssec
|
|
@@ -80,10 +80,10 @@ export class CloudflareZoneManager {
|
|
|
80
80
|
throw `Props undefined for ${id}`;
|
|
81
81
|
const zoneId = props.zoneId ??
|
|
82
82
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id;
|
|
83
|
-
return new
|
|
83
|
+
return new ZoneDnssec(id, {
|
|
84
84
|
...props,
|
|
85
85
|
zoneId,
|
|
86
|
-
});
|
|
86
|
+
}, { parent: scope });
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* @summary Method to create a new zone hold
|
|
@@ -96,10 +96,10 @@ export class CloudflareZoneManager {
|
|
|
96
96
|
throw `Props undefined for ${id}`;
|
|
97
97
|
const zoneId = props.zoneId ??
|
|
98
98
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id;
|
|
99
|
-
return new
|
|
99
|
+
return new ZoneHold(id, {
|
|
100
100
|
...props,
|
|
101
101
|
zoneId,
|
|
102
|
-
});
|
|
102
|
+
}, { parent: scope });
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* @summary Method to create a new zone lockdown
|
|
@@ -112,10 +112,10 @@ export class CloudflareZoneManager {
|
|
|
112
112
|
throw `Props undefined for ${id}`;
|
|
113
113
|
const zoneId = props.zoneId ??
|
|
114
114
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id;
|
|
115
|
-
return new
|
|
115
|
+
return new ZoneLockdown(id, {
|
|
116
116
|
...props,
|
|
117
117
|
zoneId,
|
|
118
|
-
});
|
|
118
|
+
}, { parent: scope });
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
121
|
* @summary Method to create new zone dns settings
|
|
@@ -128,10 +128,10 @@ export class CloudflareZoneManager {
|
|
|
128
128
|
throw `Props undefined for ${id}`;
|
|
129
129
|
const zoneId = props.zoneId ??
|
|
130
130
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id;
|
|
131
|
-
const zoneDnsSettings = new
|
|
131
|
+
const zoneDnsSettings = new ZoneSetting(id, {
|
|
132
132
|
...props,
|
|
133
133
|
zoneId,
|
|
134
|
-
});
|
|
134
|
+
}, { parent: scope });
|
|
135
135
|
return zoneDnsSettings;
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
@@ -145,9 +145,9 @@ export class CloudflareZoneManager {
|
|
|
145
145
|
throw `Props undefined for ${id}`;
|
|
146
146
|
const zoneId = props.zoneId ??
|
|
147
147
|
pulumi.output(this.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })).id;
|
|
148
|
-
return new
|
|
148
|
+
return new ZoneSetting(id, {
|
|
149
149
|
...props,
|
|
150
150
|
zoneId,
|
|
151
|
-
});
|
|
151
|
+
}, { parent: scope });
|
|
152
152
|
}
|
|
153
153
|
}
|