@gradientedge/cdk-utils 10.2.0 → 10.4.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.
Files changed (33) hide show
  1. package/README.md +11 -11
  2. package/dist/src/lib/azure/index.d.ts +0 -1
  3. package/dist/src/lib/azure/index.js +0 -1
  4. package/dist/src/lib/cloudflare/services/access/main.js +23 -23
  5. package/dist/src/lib/cloudflare/services/api-shield/main.js +11 -11
  6. package/dist/src/lib/cloudflare/services/argo/main.js +5 -5
  7. package/dist/src/lib/cloudflare/services/filter/main.js +3 -3
  8. package/dist/src/lib/cloudflare/services/firewall/main.js +3 -3
  9. package/dist/src/lib/cloudflare/services/page/main.js +7 -7
  10. package/dist/src/lib/cloudflare/services/record/main.js +3 -3
  11. package/dist/src/lib/cloudflare/services/rule-set/main.d.ts +1 -1
  12. package/dist/src/lib/cloudflare/services/rule-set/main.js +4 -5
  13. package/dist/src/lib/cloudflare/services/worker/main.js +13 -13
  14. package/dist/src/lib/cloudflare/services/zone/main.js +18 -18
  15. package/dist/src/lib/common/stack.d.ts +3 -3
  16. package/package.json +10 -18
  17. package/src/lib/azure/index.ts +0 -1
  18. package/src/lib/cloudflare/services/access/main.ts +114 -58
  19. package/src/lib/cloudflare/services/api-shield/main.ts +48 -22
  20. package/src/lib/cloudflare/services/argo/main.ts +17 -9
  21. package/src/lib/cloudflare/services/filter/main.ts +9 -5
  22. package/src/lib/cloudflare/services/firewall/main.ts +9 -5
  23. package/src/lib/cloudflare/services/page/main.ts +27 -15
  24. package/src/lib/cloudflare/services/record/main.ts +9 -5
  25. package/src/lib/cloudflare/services/rule-set/main.ts +10 -8
  26. package/src/lib/cloudflare/services/worker/main.ts +60 -29
  27. package/src/lib/cloudflare/services/zone/main.ts +75 -35
  28. package/src/lib/common/stack.ts +3 -3
  29. package/vitest.config.ts +0 -1
  30. package/dist/src/lib/azure/utils/index.d.ts +0 -19
  31. package/dist/src/lib/azure/utils/index.js +0 -19
  32. package/setup.js +0 -3
  33. package/src/lib/azure/utils/index.ts +0 -21
package/README.md CHANGED
@@ -10,8 +10,10 @@
10
10
 
11
11
  [![AWS CLI][aws-cli-badge]][aws-cli-url]
12
12
  [![Node][node-badge]][node-url]
13
- [![Yarn][yarn-badge]][yarn-url]
14
13
  [![CDK][cdk-badge]][cdk-url]
14
+ [![Pulumi][pulumi-badge]][pulumi-url]
15
+ [![Pulumi Azure][pulumi-azure-badge]][pulumi-azure-url]
16
+ [![Pulumi Cloudflare][pulumi-cloudflare-badge]][pulumi-cloudflare-url]
15
17
 
16
18
  [![Builds][builds]][builds-url]
17
19
  [![Coverage][coverage]][codecov-url]
@@ -25,7 +27,7 @@
25
27
 
26
28
  ## Introduction
27
29
 
28
- Toolkit for working with CDK Constructs ([AWS CDK][aws-cdk] & [CDK for Terraform][cdktf]).
30
+ Toolkit for working with CDK Constructs ([AWS CDK][aws-cdk] & [Pulumi][pulumi]).
29
31
 
30
32
  For more details, see the full [API documentation](https://gradientedge.github.io/cdk-utils/).
31
33
 
@@ -39,12 +41,6 @@ With **npm**:
39
41
  npm install --save @gradientedge/cdk-utils
40
42
  ```
41
43
 
42
- With **yarn**:
43
-
44
- ```shell
45
- yarn add @gradientedge/cdk-utils
46
- ```
47
-
48
44
  With **pnpm**:
49
45
 
50
46
  ```shell
@@ -87,7 +83,7 @@ There is a debug utility that can be used to print out the contents of a `templa
87
83
  [builds]: https://img.shields.io/github/actions/workflow/status/gradientedge/cdk-utils/ci.yml?branch=main
88
84
  [builds-url]: https://github.com/gradientedge/cdk-utils/actions
89
85
  [cdk-badge]: https://img.shields.io/github/package-json/dependency-version/gradientedge/cdk-utils/aws-cdk-lib
90
- [cdktf]: https://developer.hashicorp.com/terraform/cdktf
86
+ [pulumi]: https://www.pulumi.com/docs/
91
87
  [cdk-url]: https://aws.amazon.com/cdk/
92
88
  [checks]: https://img.shields.io/github/checks-status/gradientedge/cdk-utils/main
93
89
  [cmd]: https://img.shields.io/badge/command--line-4D4D4D?logo=windows-terminal&style=for-the-badge
@@ -103,6 +99,12 @@ There is a debug utility that can be used to print out the contents of a `templa
103
99
  [issues-url]: https://github.com/gradientedge/cdk-utils/issues
104
100
  [pr]: https://img.shields.io/github/issues-pr/gradientedge/cdk-utils.svg
105
101
  [pr-url]: https://github.com/gradientedge/cdk-utils/pulls
102
+ [pulumi-badge]: https://img.shields.io/github/package-json/dependency-version/gradientedge/cdk-utils/@pulumi/pulumi
103
+ [pulumi-azure-badge]: https://img.shields.io/github/package-json/dependency-version/gradientedge/cdk-utils/@pulumi/azure-native
104
+ [pulumi-cloudflare-badge]: https://img.shields.io/github/package-json/dependency-version/gradientedge/cdk-utils/@pulumi/cloudflare
105
+ [pulumi-url]: https://www.pulumi.com/
106
+ [pulumi-azure-url]: https://www.pulumi.com/registry/packages/azure-native/
107
+ [pulumi-cloudflare-url]: https://www.pulumi.com/registry/packages/cloudflare/
106
108
  [last-commit]: https://img.shields.io/github/last-commit/gradientedge/cdk-utils
107
109
  [license]: https://img.shields.io/github/license/gradientedge/cdk-utils
108
110
  [license-url]: https://github.com/gradientedge/cdk-utils/blob/main/LICENSE
@@ -118,5 +120,3 @@ There is a debug utility that can be used to print out the contents of a `templa
118
120
  [twitter-url]: https://twitter.com/gradientedge
119
121
  [version]: https://img.shields.io/npm/v/@gradientedge/cdk-utils
120
122
  [version-url]: https://www.npmjs.com/package/@gradientedge/cdk-utils
121
- [yarn-badge]: https://img.shields.io/badge/yarn-1.22.10-green?logo=yarn
122
- [yarn-url]: https://yarnpkg.com
@@ -1,4 +1,3 @@
1
1
  export * from './common/index.js';
2
2
  export * from './services/index.js';
3
3
  export * from './types/index.js';
4
- export * from './utils/index.js';
@@ -1,4 +1,3 @@
1
1
  export * from './common/index.js';
2
2
  export * from './services/index.js';
3
3
  export * from './types/index.js';
4
- export * from './utils/index.js';
@@ -1,4 +1,4 @@
1
- import * as cloudflare from '@pulumi/cloudflare';
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 cloudflare.ZeroTrustAccessApplication(`${id}`, {
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 cloudflare.ZeroTrustAccessShortLivedCertificate(`${id}`, {
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 cloudflare.ZeroTrustAccessCustomPage(`${id}`, {
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 cloudflare.ZeroTrustAccessGroup(`${id}`, {
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 cloudflare.ZeroTrustAccessIdentityProvider(`${id}`, {
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 cloudflare.ZeroTrustAccessMtlsCertificate(`${id}`, {
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 cloudflare.ZeroTrustOrganization(`${id}`, {
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 cloudflare.ZeroTrustAccessPolicy(`${id}`, {
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 cloudflare.AccessRule(`${id}`, {
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 cloudflare.ZeroTrustAccessServiceToken(`${id}`, {
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 cloudflare.ZeroTrustAccessTag(`${id}`, {
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 * as cloudflare from '@pulumi/cloudflare';
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 cloudflare.ApiShield(`${id}`, {
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 cloudflare.ApiShieldSchema(`${id}`, {
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 cloudflare.ApiShieldSchemaValidationSettings(`${id}`, {
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 cloudflare.ApiShieldOperation(`${id}`, {
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 cloudflare.ApiShieldOperationSchemaValidationSettings(`${id}`, {
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 * as cloudflare from '@pulumi/cloudflare';
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 cloudflare.ArgoSmartRouting(`${id}`, {
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 cloudflare.ArgoTieredCaching(`${id}`, {
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 * as cloudflare from '@pulumi/cloudflare';
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 cloudflare.Filter(`${id}`, {
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 * as cloudflare from '@pulumi/cloudflare';
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 cloudflare.FirewallRule(`${id}`, {
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 * as cloudflare from '@pulumi/cloudflare';
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 cloudflare.PagesProject(`${id}`, {
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 cloudflare.PagesDomain(`${id}`, {
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 cloudflare.PageRule(`${id}`, {
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 * as cloudflare from '@pulumi/cloudflare';
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 cloudflare.DnsRecord(id, {
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/cloudflare/api-docs/ruleset/}
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 * as cloudflare from '@pulumi/cloudflare';
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/cloudflare/api-docs/ruleset/}
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
- const ruleSet = new cloudflare.Ruleset(`${id}`, {
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 * as cloudflare from '@pulumi/cloudflare';
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 cloudflare.WorkersCustomDomain(id, {
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 cloudflare.WorkersRoute(id, {
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 cloudflare.WorkersScript(id, {
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 cloudflare.WorkersKvNamespace(id, {
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 cloudflare.WorkersKv(id, {
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 cloudflare.WorkersCronTrigger(id, {
115
+ return new WorkersCronTrigger(id, {
116
116
  ...props,
117
117
  accountId: props.accountId ?? scope.props.accountId,
118
- });
118
+ }, { parent: scope });
119
119
  }
120
120
  }