@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,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
AccessRule,
|
|
3
|
+
ZeroTrustAccessApplication,
|
|
4
|
+
ZeroTrustAccessCustomPage,
|
|
5
|
+
ZeroTrustAccessGroup,
|
|
6
|
+
ZeroTrustAccessIdentityProvider,
|
|
7
|
+
ZeroTrustAccessMtlsCertificate,
|
|
8
|
+
ZeroTrustAccessPolicy,
|
|
9
|
+
ZeroTrustAccessServiceToken,
|
|
10
|
+
ZeroTrustAccessShortLivedCertificate,
|
|
11
|
+
ZeroTrustAccessTag,
|
|
12
|
+
ZeroTrustOrganization,
|
|
13
|
+
} from '@pulumi/cloudflare'
|
|
2
14
|
import { CommonCloudflareConstruct } from '../../common/construct.js'
|
|
3
15
|
import {
|
|
4
16
|
AccessRuleProps,
|
|
@@ -47,12 +59,16 @@ export class CloudflareAccessManager {
|
|
|
47
59
|
filter: { name: scope.props.domainName },
|
|
48
60
|
})?.id
|
|
49
61
|
|
|
50
|
-
return new
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
62
|
+
return new ZeroTrustAccessApplication(
|
|
63
|
+
`${id}`,
|
|
64
|
+
{
|
|
65
|
+
...props,
|
|
66
|
+
domain: `${props.domain}-${scope.props.domainName}`,
|
|
67
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
68
|
+
zoneId,
|
|
69
|
+
},
|
|
70
|
+
{ parent: scope }
|
|
71
|
+
)
|
|
56
72
|
}
|
|
57
73
|
|
|
58
74
|
/**
|
|
@@ -75,10 +91,14 @@ export class CloudflareAccessManager {
|
|
|
75
91
|
filter: { name: scope.props.domainName },
|
|
76
92
|
})?.id
|
|
77
93
|
|
|
78
|
-
return new
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
94
|
+
return new ZeroTrustAccessShortLivedCertificate(
|
|
95
|
+
`${id}`,
|
|
96
|
+
{
|
|
97
|
+
...props,
|
|
98
|
+
zoneId,
|
|
99
|
+
},
|
|
100
|
+
{ parent: scope }
|
|
101
|
+
)
|
|
82
102
|
}
|
|
83
103
|
|
|
84
104
|
/**
|
|
@@ -91,11 +111,15 @@ export class CloudflareAccessManager {
|
|
|
91
111
|
public createAccessCustomPage(id: string, scope: CommonCloudflareConstruct, props: ZeroTrustAccessCustomPageProps) {
|
|
92
112
|
if (!props) throw `Props undefined for ${id}`
|
|
93
113
|
|
|
94
|
-
return new
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
114
|
+
return new ZeroTrustAccessCustomPage(
|
|
115
|
+
`${id}`,
|
|
116
|
+
{
|
|
117
|
+
...props,
|
|
118
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
119
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
120
|
+
},
|
|
121
|
+
{ parent: scope }
|
|
122
|
+
)
|
|
99
123
|
}
|
|
100
124
|
|
|
101
125
|
/**
|
|
@@ -114,11 +138,15 @@ export class CloudflareAccessManager {
|
|
|
114
138
|
filter: { name: scope.props.domainName },
|
|
115
139
|
})?.id
|
|
116
140
|
|
|
117
|
-
return new
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
141
|
+
return new ZeroTrustAccessGroup(
|
|
142
|
+
`${id}`,
|
|
143
|
+
{
|
|
144
|
+
...props,
|
|
145
|
+
name: `${props.name} - ${scope.props.stage.toUpperCase()}`,
|
|
146
|
+
zoneId,
|
|
147
|
+
},
|
|
148
|
+
{ parent: scope }
|
|
149
|
+
)
|
|
122
150
|
}
|
|
123
151
|
|
|
124
152
|
/**
|
|
@@ -141,12 +169,16 @@ export class CloudflareAccessManager {
|
|
|
141
169
|
filter: { name: scope.props.domainName },
|
|
142
170
|
})?.id
|
|
143
171
|
|
|
144
|
-
return new
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
172
|
+
return new ZeroTrustAccessIdentityProvider(
|
|
173
|
+
`${id}`,
|
|
174
|
+
{
|
|
175
|
+
...props,
|
|
176
|
+
config: props.config ?? {},
|
|
177
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
178
|
+
zoneId,
|
|
179
|
+
},
|
|
180
|
+
{ parent: scope }
|
|
181
|
+
)
|
|
150
182
|
}
|
|
151
183
|
|
|
152
184
|
/**
|
|
@@ -169,11 +201,15 @@ export class CloudflareAccessManager {
|
|
|
169
201
|
filter: { name: scope.props.domainName },
|
|
170
202
|
})?.id
|
|
171
203
|
|
|
172
|
-
return new
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
204
|
+
return new ZeroTrustAccessMtlsCertificate(
|
|
205
|
+
`${id}`,
|
|
206
|
+
{
|
|
207
|
+
...props,
|
|
208
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
209
|
+
zoneId,
|
|
210
|
+
},
|
|
211
|
+
{ parent: scope }
|
|
212
|
+
)
|
|
177
213
|
}
|
|
178
214
|
|
|
179
215
|
/**
|
|
@@ -192,11 +228,15 @@ export class CloudflareAccessManager {
|
|
|
192
228
|
filter: { name: scope.props.domainName },
|
|
193
229
|
})?.id
|
|
194
230
|
|
|
195
|
-
return new
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
231
|
+
return new ZeroTrustOrganization(
|
|
232
|
+
`${id}`,
|
|
233
|
+
{
|
|
234
|
+
...props,
|
|
235
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
236
|
+
zoneId,
|
|
237
|
+
},
|
|
238
|
+
{ parent: scope }
|
|
239
|
+
)
|
|
200
240
|
}
|
|
201
241
|
|
|
202
242
|
/**
|
|
@@ -209,11 +249,15 @@ export class CloudflareAccessManager {
|
|
|
209
249
|
public createAccessPolicy(id: string, scope: CommonCloudflareConstruct, props: ZeroTrustAccessPolicyProps) {
|
|
210
250
|
if (!props) throw `Props undefined for ${id}`
|
|
211
251
|
|
|
212
|
-
return new
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
252
|
+
return new ZeroTrustAccessPolicy(
|
|
253
|
+
`${id}`,
|
|
254
|
+
{
|
|
255
|
+
...props,
|
|
256
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
257
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
258
|
+
},
|
|
259
|
+
{ parent: scope }
|
|
260
|
+
)
|
|
217
261
|
}
|
|
218
262
|
|
|
219
263
|
/**
|
|
@@ -232,11 +276,15 @@ export class CloudflareAccessManager {
|
|
|
232
276
|
filter: { name: scope.props.domainName },
|
|
233
277
|
})?.id
|
|
234
278
|
|
|
235
|
-
return new
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
279
|
+
return new AccessRule(
|
|
280
|
+
`${id}`,
|
|
281
|
+
{
|
|
282
|
+
...props,
|
|
283
|
+
zoneId,
|
|
284
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
285
|
+
},
|
|
286
|
+
{ parent: scope }
|
|
287
|
+
)
|
|
240
288
|
}
|
|
241
289
|
|
|
242
290
|
/**
|
|
@@ -259,12 +307,16 @@ export class CloudflareAccessManager {
|
|
|
259
307
|
filter: { name: scope.props.domainName },
|
|
260
308
|
})?.id
|
|
261
309
|
|
|
262
|
-
return new
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
310
|
+
return new ZeroTrustAccessServiceToken(
|
|
311
|
+
`${id}`,
|
|
312
|
+
{
|
|
313
|
+
...props,
|
|
314
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
315
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
316
|
+
zoneId,
|
|
317
|
+
},
|
|
318
|
+
{ parent: scope }
|
|
319
|
+
)
|
|
268
320
|
}
|
|
269
321
|
|
|
270
322
|
/**
|
|
@@ -277,10 +329,14 @@ export class CloudflareAccessManager {
|
|
|
277
329
|
public createAccessTag(id: string, scope: CommonCloudflareConstruct, props: ZeroTrustAccessTagProps) {
|
|
278
330
|
if (!props) throw `Props undefined for ${id}`
|
|
279
331
|
|
|
280
|
-
return new
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
332
|
+
return new ZeroTrustAccessTag(
|
|
333
|
+
`${id}`,
|
|
334
|
+
{
|
|
335
|
+
...props,
|
|
336
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
337
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
338
|
+
},
|
|
339
|
+
{ parent: scope }
|
|
340
|
+
)
|
|
285
341
|
}
|
|
286
342
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
ApiShield,
|
|
3
|
+
ApiShieldOperation,
|
|
4
|
+
ApiShieldOperationSchemaValidationSettings,
|
|
5
|
+
ApiShieldSchema,
|
|
6
|
+
ApiShieldSchemaValidationSettings,
|
|
7
|
+
} from '@pulumi/cloudflare'
|
|
2
8
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
9
|
import {
|
|
4
10
|
ApiShieldOperationProps,
|
|
@@ -39,10 +45,14 @@ export class CloudflareApiShieldManager {
|
|
|
39
45
|
const zoneId = props.zoneId
|
|
40
46
|
? props.zoneId
|
|
41
47
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
42
|
-
return new
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
return new ApiShield(
|
|
49
|
+
`${id}`,
|
|
50
|
+
{
|
|
51
|
+
...props,
|
|
52
|
+
zoneId,
|
|
53
|
+
},
|
|
54
|
+
{ parent: scope }
|
|
55
|
+
)
|
|
46
56
|
}
|
|
47
57
|
|
|
48
58
|
/**
|
|
@@ -58,11 +68,15 @@ export class CloudflareApiShieldManager {
|
|
|
58
68
|
const zoneId = props.zoneId
|
|
59
69
|
? props.zoneId
|
|
60
70
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
61
|
-
return new
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
return new ApiShieldSchema(
|
|
72
|
+
`${id}`,
|
|
73
|
+
{
|
|
74
|
+
...props,
|
|
75
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
76
|
+
zoneId,
|
|
77
|
+
},
|
|
78
|
+
{ parent: scope }
|
|
79
|
+
)
|
|
66
80
|
}
|
|
67
81
|
|
|
68
82
|
/**
|
|
@@ -82,10 +96,14 @@ export class CloudflareApiShieldManager {
|
|
|
82
96
|
const zoneId = props.zoneId
|
|
83
97
|
? props.zoneId
|
|
84
98
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
85
|
-
return new
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
99
|
+
return new ApiShieldSchemaValidationSettings(
|
|
100
|
+
`${id}`,
|
|
101
|
+
{
|
|
102
|
+
...props,
|
|
103
|
+
zoneId,
|
|
104
|
+
},
|
|
105
|
+
{ parent: scope }
|
|
106
|
+
)
|
|
89
107
|
}
|
|
90
108
|
|
|
91
109
|
/**
|
|
@@ -101,10 +119,14 @@ export class CloudflareApiShieldManager {
|
|
|
101
119
|
const zoneId = props.zoneId
|
|
102
120
|
? props.zoneId
|
|
103
121
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
104
|
-
return new
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
122
|
+
return new ApiShieldOperation(
|
|
123
|
+
`${id}`,
|
|
124
|
+
{
|
|
125
|
+
...props,
|
|
126
|
+
zoneId,
|
|
127
|
+
},
|
|
128
|
+
{ parent: scope }
|
|
129
|
+
)
|
|
108
130
|
}
|
|
109
131
|
|
|
110
132
|
/**
|
|
@@ -124,9 +146,13 @@ export class CloudflareApiShieldManager {
|
|
|
124
146
|
const zoneId = props.zoneId
|
|
125
147
|
? props.zoneId
|
|
126
148
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
127
|
-
return new
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
149
|
+
return new ApiShieldOperationSchemaValidationSettings(
|
|
150
|
+
`${id}`,
|
|
151
|
+
{
|
|
152
|
+
...props,
|
|
153
|
+
zoneId,
|
|
154
|
+
},
|
|
155
|
+
{ parent: scope }
|
|
156
|
+
)
|
|
131
157
|
}
|
|
132
158
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ArgoSmartRouting, ArgoTieredCaching } from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
3
|
import { ArgoSmartRoutingProps, ArgoTieredCachingProps } from './types.js'
|
|
4
4
|
|
|
@@ -33,10 +33,14 @@ export class CloudflareArgoManager {
|
|
|
33
33
|
const zoneId = props.zoneId
|
|
34
34
|
? props.zoneId
|
|
35
35
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
-
return new
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
return new ArgoSmartRouting(
|
|
37
|
+
`${id}`,
|
|
38
|
+
{
|
|
39
|
+
...props,
|
|
40
|
+
zoneId,
|
|
41
|
+
},
|
|
42
|
+
{ parent: scope }
|
|
43
|
+
)
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
/**
|
|
@@ -52,9 +56,13 @@ export class CloudflareArgoManager {
|
|
|
52
56
|
const zoneId = props.zoneId
|
|
53
57
|
? props.zoneId
|
|
54
58
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
55
|
-
return new
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
return new ArgoTieredCaching(
|
|
60
|
+
`${id}`,
|
|
61
|
+
{
|
|
62
|
+
...props,
|
|
63
|
+
zoneId,
|
|
64
|
+
},
|
|
65
|
+
{ parent: scope }
|
|
66
|
+
)
|
|
59
67
|
}
|
|
60
68
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Filter } from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
3
|
import { FilterProps } from './types.js'
|
|
4
4
|
|
|
@@ -33,9 +33,13 @@ export class CloudflareFilterManager {
|
|
|
33
33
|
const zoneId = props.zoneId
|
|
34
34
|
? props.zoneId
|
|
35
35
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
-
return new
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
return new Filter(
|
|
37
|
+
`${id}`,
|
|
38
|
+
{
|
|
39
|
+
...props,
|
|
40
|
+
zoneId,
|
|
41
|
+
},
|
|
42
|
+
{ parent: scope }
|
|
43
|
+
)
|
|
40
44
|
}
|
|
41
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FirewallRule } from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
3
|
import { FirewallRuleProps } from './types.js'
|
|
4
4
|
|
|
@@ -33,9 +33,13 @@ export class CloudflareFirewallManager {
|
|
|
33
33
|
const zoneId = props.zoneId
|
|
34
34
|
? props.zoneId
|
|
35
35
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
-
return new
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
return new FirewallRule(
|
|
37
|
+
`${id}`,
|
|
38
|
+
{
|
|
39
|
+
...props,
|
|
40
|
+
zoneId,
|
|
41
|
+
},
|
|
42
|
+
{ parent: scope }
|
|
43
|
+
)
|
|
40
44
|
}
|
|
41
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PageRule, PagesDomain, PagesProject } from '@pulumi/cloudflare'
|
|
2
2
|
import { local } from '@pulumi/command'
|
|
3
3
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
4
4
|
import { PageRuleProps, PagesDomainProps, PagesProjectDeployProps, PagesProjectProps } from './types.js'
|
|
@@ -31,11 +31,15 @@ export class CloudflarePageManager {
|
|
|
31
31
|
public createPagesProject(id: string, scope: CommonCloudflareConstruct, props: PagesProjectProps) {
|
|
32
32
|
if (!props) throw `Props undefined for ${id}`
|
|
33
33
|
|
|
34
|
-
return new
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
return new PagesProject(
|
|
35
|
+
`${id}`,
|
|
36
|
+
{
|
|
37
|
+
...props,
|
|
38
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
39
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
40
|
+
},
|
|
41
|
+
{ parent: scope }
|
|
42
|
+
)
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
/**
|
|
@@ -48,11 +52,15 @@ export class CloudflarePageManager {
|
|
|
48
52
|
public createPagesDomain(id: string, scope: CommonCloudflareConstruct, props: PagesDomainProps) {
|
|
49
53
|
if (!props) throw `Props undefined for ${id}`
|
|
50
54
|
|
|
51
|
-
return new
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
return new PagesDomain(
|
|
56
|
+
`${id}`,
|
|
57
|
+
{
|
|
58
|
+
...props,
|
|
59
|
+
accountId: props.accountId ?? scope.props.accountId,
|
|
60
|
+
name: props.name ?? scope.props.domainName,
|
|
61
|
+
},
|
|
62
|
+
{ parent: scope }
|
|
63
|
+
)
|
|
56
64
|
}
|
|
57
65
|
|
|
58
66
|
/**
|
|
@@ -68,10 +76,14 @@ export class CloudflarePageManager {
|
|
|
68
76
|
const zoneId = props.zoneId
|
|
69
77
|
? props.zoneId
|
|
70
78
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
71
|
-
return new
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
79
|
+
return new PageRule(
|
|
80
|
+
`${id}`,
|
|
81
|
+
{
|
|
82
|
+
...props,
|
|
83
|
+
zoneId,
|
|
84
|
+
},
|
|
85
|
+
{ parent: scope }
|
|
86
|
+
)
|
|
75
87
|
}
|
|
76
88
|
|
|
77
89
|
public deployPagesProject(id: string, scope: CommonCloudflareConstruct, props: PagesProjectDeployProps) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DnsRecord } from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
3
|
import { DnsRecordProps } from './types.js'
|
|
4
4
|
|
|
@@ -33,9 +33,13 @@ export class CloudflareRecordManager {
|
|
|
33
33
|
const zoneId = props.zoneId
|
|
34
34
|
? props.zoneId
|
|
35
35
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
-
return new
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
return new DnsRecord(
|
|
37
|
+
id,
|
|
38
|
+
{
|
|
39
|
+
...props,
|
|
40
|
+
zoneId,
|
|
41
|
+
},
|
|
42
|
+
{ parent: scope }
|
|
43
|
+
)
|
|
40
44
|
}
|
|
41
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Ruleset } from '@pulumi/cloudflare'
|
|
2
2
|
import { CommonCloudflareConstruct } from '../../common/index.js'
|
|
3
3
|
import { RulesetProps } from './types.js'
|
|
4
4
|
|
|
@@ -25,7 +25,7 @@ export class CloudflareRuleSetManager {
|
|
|
25
25
|
* @param id scoped id of the resource
|
|
26
26
|
* @param scope scope in which this resource is defined
|
|
27
27
|
* @param props rule set properties
|
|
28
|
-
* @see [Pulumi Cloudflare Ruleset]{@link https://www.pulumi.com/registry/packages
|
|
28
|
+
* @see [Pulumi Cloudflare Ruleset]{@link https://www.pulumi.com/registry/packages//api-docs/ruleset/}
|
|
29
29
|
*/
|
|
30
30
|
public createRuleSet(id: string, scope: CommonCloudflareConstruct, props: RulesetProps) {
|
|
31
31
|
if (!props) throw `Props undefined for ${id}`
|
|
@@ -33,11 +33,13 @@ export class CloudflareRuleSetManager {
|
|
|
33
33
|
const zoneId = props.zoneId
|
|
34
34
|
? props.zoneId
|
|
35
35
|
: scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
return new Ruleset(
|
|
37
|
+
`${id}`,
|
|
38
|
+
{
|
|
39
|
+
...props,
|
|
40
|
+
zoneId,
|
|
41
|
+
},
|
|
42
|
+
{ parent: scope }
|
|
43
|
+
)
|
|
42
44
|
}
|
|
43
45
|
}
|