@gradientedge/cdk-utils 9.88.0 → 10.0.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 (87) hide show
  1. package/dist/src/lib/azure/services/api-management/main.d.ts +2 -2
  2. package/dist/src/lib/azure/services/api-management/main.js +1 -1
  3. package/dist/src/lib/azure/services/redis/main.d.ts +5 -5
  4. package/dist/src/lib/azure/services/redis/main.js +10 -10
  5. package/dist/src/lib/azure/services/redis/types.d.ts +2 -2
  6. package/dist/src/lib/cloudflare/common/construct.d.ts +7 -19
  7. package/dist/src/lib/cloudflare/common/construct.js +12 -66
  8. package/dist/src/lib/cloudflare/common/index.d.ts +0 -1
  9. package/dist/src/lib/cloudflare/common/index.js +0 -1
  10. package/dist/src/lib/cloudflare/common/stack.d.ts +11 -21
  11. package/dist/src/lib/cloudflare/common/stack.js +55 -62
  12. package/dist/src/lib/cloudflare/common/types.d.ts +2 -14
  13. package/dist/src/lib/cloudflare/construct/pages-static-site/main.d.ts +8 -10
  14. package/dist/src/lib/cloudflare/construct/pages-static-site/main.js +18 -25
  15. package/dist/src/lib/cloudflare/construct/worker-site/main.d.ts +13 -10
  16. package/dist/src/lib/cloudflare/construct/worker-site/main.js +29 -41
  17. package/dist/src/lib/cloudflare/index.d.ts +0 -1
  18. package/dist/src/lib/cloudflare/index.js +0 -1
  19. package/dist/src/lib/cloudflare/services/access/main.d.ts +31 -43
  20. package/dist/src/lib/cloudflare/services/access/main.js +56 -83
  21. package/dist/src/lib/cloudflare/services/access/types.d.ts +12 -22
  22. package/dist/src/lib/cloudflare/services/api-shield/main.d.ts +10 -15
  23. package/dist/src/lib/cloudflare/services/api-shield/main.js +16 -36
  24. package/dist/src/lib/cloudflare/services/api-shield/types.d.ts +6 -10
  25. package/dist/src/lib/cloudflare/services/argo/main.d.ts +6 -8
  26. package/dist/src/lib/cloudflare/services/argo/main.js +9 -17
  27. package/dist/src/lib/cloudflare/services/argo/types.d.ts +3 -4
  28. package/dist/src/lib/cloudflare/services/filter/main.d.ts +3 -4
  29. package/dist/src/lib/cloudflare/services/filter/main.js +6 -10
  30. package/dist/src/lib/cloudflare/services/filter/types.d.ts +2 -2
  31. package/dist/src/lib/cloudflare/services/firewall/main.d.ts +2 -3
  32. package/dist/src/lib/cloudflare/services/firewall/main.js +4 -8
  33. package/dist/src/lib/cloudflare/services/firewall/types.d.ts +2 -2
  34. package/dist/src/lib/cloudflare/services/page/main.d.ts +7 -11
  35. package/dist/src/lib/cloudflare/services/page/main.js +13 -26
  36. package/dist/src/lib/cloudflare/services/page/types.d.ts +4 -6
  37. package/dist/src/lib/cloudflare/services/record/main.d.ts +2 -3
  38. package/dist/src/lib/cloudflare/services/record/main.js +4 -8
  39. package/dist/src/lib/cloudflare/services/record/types.d.ts +2 -2
  40. package/dist/src/lib/cloudflare/services/rule-set/main.d.ts +5 -6
  41. package/dist/src/lib/cloudflare/services/rule-set/main.js +7 -10
  42. package/dist/src/lib/cloudflare/services/rule-set/types.d.ts +2 -2
  43. package/dist/src/lib/cloudflare/services/worker/main.d.ts +12 -18
  44. package/dist/src/lib/cloudflare/services/worker/main.js +15 -39
  45. package/dist/src/lib/cloudflare/services/worker/types.d.ts +7 -12
  46. package/dist/src/lib/cloudflare/services/zone/main.d.ts +13 -30
  47. package/dist/src/lib/cloudflare/services/zone/main.js +31 -84
  48. package/dist/src/lib/cloudflare/services/zone/types.d.ts +10 -20
  49. package/dist/src/lib/common/types.d.ts +4 -0
  50. package/package.json +7 -1
  51. package/src/lib/azure/services/api-management/main.ts +3 -3
  52. package/src/lib/azure/services/redis/main.ts +11 -11
  53. package/src/lib/azure/services/redis/types.ts +2 -2
  54. package/src/lib/cloudflare/common/construct.ts +13 -70
  55. package/src/lib/cloudflare/common/index.ts +0 -1
  56. package/src/lib/cloudflare/common/stack.ts +58 -69
  57. package/src/lib/cloudflare/common/types.ts +2 -15
  58. package/src/lib/cloudflare/construct/pages-static-site/main.ts +22 -42
  59. package/src/lib/cloudflare/construct/worker-site/main.ts +38 -62
  60. package/src/lib/cloudflare/index.ts +0 -1
  61. package/src/lib/cloudflare/services/access/main.ts +57 -118
  62. package/src/lib/cloudflare/services/access/types.ts +24 -22
  63. package/src/lib/cloudflare/services/api-shield/main.ts +16 -63
  64. package/src/lib/cloudflare/services/api-shield/types.ts +12 -10
  65. package/src/lib/cloudflare/services/argo/main.ts +9 -23
  66. package/src/lib/cloudflare/services/argo/types.ts +3 -4
  67. package/src/lib/cloudflare/services/filter/main.ts +6 -13
  68. package/src/lib/cloudflare/services/filter/types.ts +2 -2
  69. package/src/lib/cloudflare/services/firewall/main.ts +4 -11
  70. package/src/lib/cloudflare/services/firewall/types.ts +2 -2
  71. package/src/lib/cloudflare/services/page/main.ts +19 -36
  72. package/src/lib/cloudflare/services/page/types.ts +4 -6
  73. package/src/lib/cloudflare/services/record/main.ts +4 -11
  74. package/src/lib/cloudflare/services/record/types.ts +2 -2
  75. package/src/lib/cloudflare/services/rule-set/main.ts +7 -12
  76. package/src/lib/cloudflare/services/rule-set/types.ts +2 -2
  77. package/src/lib/cloudflare/services/worker/main.ts +15 -52
  78. package/src/lib/cloudflare/services/worker/types.ts +14 -12
  79. package/src/lib/cloudflare/services/zone/main.ts +40 -103
  80. package/src/lib/cloudflare/services/zone/types.ts +20 -21
  81. package/src/lib/common/types.ts +5 -0
  82. package/dist/src/lib/cloudflare/common/constants.d.ts +0 -5
  83. package/dist/src/lib/cloudflare/common/constants.js +0 -6
  84. package/dist/src/lib/cloudflare/utils/index.d.ts +0 -3
  85. package/dist/src/lib/cloudflare/utils/index.js +0 -13
  86. package/src/lib/cloudflare/common/constants.ts +0 -5
  87. package/src/lib/cloudflare/utils/index.ts +0 -23
@@ -1,10 +1,5 @@
1
- import { ApiShieldOperationSchemaValidationSettings } from '@cdktf/provider-cloudflare/lib/api-shield-operation-schema-validation-settings/index.js'
2
- import { ApiShieldOperation } from '@cdktf/provider-cloudflare/lib/api-shield-operation/index.js'
3
- import { ApiShieldSchemaValidationSettings } from '@cdktf/provider-cloudflare/lib/api-shield-schema-validation-settings/index.js'
4
- import { ApiShieldSchema } from '@cdktf/provider-cloudflare/lib/api-shield-schema/index.js'
5
- import { ApiShield } from '@cdktf/provider-cloudflare/lib/api-shield/index.js'
1
+ import * as cloudflare from '@pulumi/cloudflare'
6
2
  import { CommonCloudflareConstruct } from '../../common/index.js'
7
- import { createCloudflareTfOutput } from '../../utils/index.js'
8
3
  import {
9
4
  ApiShieldOperationProps,
10
5
  ApiShieldOperationSchemaValidationSettingsProps,
@@ -36,24 +31,18 @@ export class CloudflareApiShieldManager {
36
31
  * @param id scoped id of the resource
37
32
  * @param scope scope in which this resource is defined
38
33
  * @param props api shield properties
39
- * @see [CDKTF API Shield Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/apiShield.typescript.md}
34
+ * @see [Pulumi API Shield]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/apishield/}
40
35
  */
41
36
  public createApiShield(id: string, scope: CommonCloudflareConstruct, props: ApiShieldProps) {
42
37
  if (!props) throw `Props undefined for ${id}`
43
38
 
44
39
  const zoneId = props.zoneId
45
40
  ? props.zoneId
46
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.zoneId
47
-
48
- const apiShield = new ApiShield(scope, `${id}`, {
41
+ : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
42
+ return new cloudflare.ApiShield(`${id}`, {
49
43
  ...props,
50
44
  zoneId,
51
45
  })
52
-
53
- createCloudflareTfOutput(`${id}-apiShieldFriendlyUniqueId`, scope, apiShield.friendlyUniqueId)
54
- createCloudflareTfOutput(`${id}-apiShieldId`, scope, apiShield.id)
55
-
56
- return apiShield
57
46
  }
58
47
 
59
48
  /**
@@ -61,25 +50,19 @@ export class CloudflareApiShieldManager {
61
50
  * @param id scoped id of the resource
62
51
  * @param scope scope in which this resource is defined
63
52
  * @param props api shield schema properties
64
- * @see [CDKTF API Shield Schema Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/apiShieldSchema.typescript.md}
53
+ * @see [Pulumi API Shield Schema]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/apishieldschema/}
65
54
  */
66
55
  public createApiShieldSchema(id: string, scope: CommonCloudflareConstruct, props: ApiShieldSchemaProps) {
67
56
  if (!props) throw `Props undefined for ${id}`
68
57
 
69
58
  const zoneId = props.zoneId
70
59
  ? props.zoneId
71
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.zoneId
72
-
73
- const apiShieldSchema = new ApiShieldSchema(scope, `${id}`, {
60
+ : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
61
+ return new cloudflare.ApiShieldSchema(`${id}`, {
74
62
  ...props,
75
63
  name: `${props.name}-${scope.props.stage}`,
76
64
  zoneId,
77
65
  })
78
-
79
- createCloudflareTfOutput(`${id}-apiShieldSchemaFriendlyUniqueId`, scope, apiShieldSchema.friendlyUniqueId)
80
- createCloudflareTfOutput(`${id}-apiShieldSchemaId`, scope, apiShieldSchema.schemaId)
81
-
82
- return apiShieldSchema
83
66
  }
84
67
 
85
68
  /**
@@ -87,7 +70,7 @@ export class CloudflareApiShieldManager {
87
70
  * @param id scoped id of the resource
88
71
  * @param scope scope in which this resource is defined
89
72
  * @param props api shield schema validation settings properties
90
- * @see [CDKTF API Shield Schema Validation Settings Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/apiShieldSchema.typescript.md}
73
+ * @see [Pulumi API Shield Schema Validation Settings]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/apishieldschemavalidationsettings/}
91
74
  */
92
75
  public createApiShieldSchemaValidationSettings(
93
76
  id: string,
@@ -98,21 +81,11 @@ export class CloudflareApiShieldManager {
98
81
 
99
82
  const zoneId = props.zoneId
100
83
  ? props.zoneId
101
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.zoneId
102
-
103
- const apiShieldSchemaValidationSettings = new ApiShieldSchemaValidationSettings(scope, `${id}`, {
84
+ : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
85
+ return new cloudflare.ApiShieldSchemaValidationSettings(`${id}`, {
104
86
  ...props,
105
87
  zoneId,
106
88
  })
107
-
108
- createCloudflareTfOutput(
109
- `${id}-apiShieldSchemaValidationSettingsFriendlyUniqueId`,
110
- scope,
111
- apiShieldSchemaValidationSettings.friendlyUniqueId
112
- )
113
- createCloudflareTfOutput(`${id}-apiShieldSchemaValidationSettingsId`, scope, apiShieldSchemaValidationSettings.id)
114
-
115
- return apiShieldSchemaValidationSettings
116
89
  }
117
90
 
118
91
  /**
@@ -120,24 +93,18 @@ export class CloudflareApiShieldManager {
120
93
  * @param id scoped id of the resource
121
94
  * @param scope scope in which this resource is defined
122
95
  * @param props api shield operation properties
123
- * @see [CDKTF API Shield Operation Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/apiShieldOperation.typescript.md}
96
+ * @see [Pulumi API Shield Operation]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/apishieldoperation/}
124
97
  */
125
98
  public createApiShieldOperation(id: string, scope: CommonCloudflareConstruct, props: ApiShieldOperationProps) {
126
99
  if (!props) throw `Props undefined for ${id}`
127
100
 
128
101
  const zoneId = props.zoneId
129
102
  ? props.zoneId
130
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.zoneId
131
-
132
- const apiShieldOperation = new ApiShieldOperation(scope, `${id}`, {
103
+ : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
104
+ return new cloudflare.ApiShieldOperation(`${id}`, {
133
105
  ...props,
134
106
  zoneId,
135
107
  })
136
-
137
- createCloudflareTfOutput(`${id}-apiShieldOperationFriendlyUniqueId`, scope, apiShieldOperation.friendlyUniqueId)
138
- createCloudflareTfOutput(`${id}-apiShieldOperationId`, scope, apiShieldOperation.id)
139
-
140
- return apiShieldOperation
141
108
  }
142
109
 
143
110
  /**
@@ -145,7 +112,7 @@ export class CloudflareApiShieldManager {
145
112
  * @param id scoped id of the resource
146
113
  * @param scope scope in which this resource is defined
147
114
  * @param props api shield operation schema validation settings properties
148
- * @see [CDKTF API Shield Operation Schema Validation Settings Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/apiShieldOperationSchemaValidationSettings.typescript.md}
115
+ * @see [Pulumi API Shield Operation Schema Validation Settings]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/apishieldoperationschemavalidationsettings/}
149
116
  */
150
117
  public createApiShieldOperationSchemaValidationSettings(
151
118
  id: string,
@@ -156,24 +123,10 @@ export class CloudflareApiShieldManager {
156
123
 
157
124
  const zoneId = props.zoneId
158
125
  ? props.zoneId
159
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.zoneId
160
-
161
- const apiShieldOperationSchemaValidationSettings = new ApiShieldOperationSchemaValidationSettings(scope, `${id}`, {
126
+ : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
127
+ return new cloudflare.ApiShieldOperationSchemaValidationSettings(`${id}`, {
162
128
  ...props,
163
129
  zoneId,
164
130
  })
165
-
166
- createCloudflareTfOutput(
167
- `${id}-apiShieldOperationSchemaValidationSettingsFriendlyUniqueId`,
168
- scope,
169
- apiShieldOperationSchemaValidationSettings.friendlyUniqueId
170
- )
171
- createCloudflareTfOutput(
172
- `${id}-apiShieldOperationSchemaValidationSettingsId`,
173
- scope,
174
- apiShieldOperationSchemaValidationSettings.id
175
- )
176
-
177
- return apiShieldOperationSchemaValidationSettings
178
131
  }
179
132
  }
@@ -1,11 +1,13 @@
1
- import { ApiShieldConfig } from '@cdktf/provider-cloudflare/lib/api-shield/index.js'
2
- import { ApiShieldOperationConfig } from '@cdktf/provider-cloudflare/lib/api-shield-operation/index.js'
3
- import { ApiShieldOperationSchemaValidationSettingsConfig } from '@cdktf/provider-cloudflare/lib/api-shield-operation-schema-validation-settings/index.js'
4
- import { ApiShieldSchemaConfig } from '@cdktf/provider-cloudflare/lib/api-shield-schema/index.js'
5
- import { ApiShieldSchemaValidationSettingsConfig } from '@cdktf/provider-cloudflare/lib/api-shield-schema-validation-settings/index.js'
1
+ import {
2
+ ApiShieldArgs,
3
+ ApiShieldOperationArgs,
4
+ ApiShieldOperationSchemaValidationSettingsArgs,
5
+ ApiShieldSchemaArgs,
6
+ ApiShieldSchemaValidationSettingsArgs,
7
+ } from '@pulumi/cloudflare'
6
8
 
7
- export interface ApiShieldProps extends ApiShieldConfig {}
8
- export interface ApiShieldSchemaProps extends ApiShieldSchemaConfig {}
9
- export interface ApiShieldSchemaValidationSettingsProps extends ApiShieldSchemaValidationSettingsConfig {}
10
- export interface ApiShieldOperationProps extends ApiShieldOperationConfig {}
11
- export interface ApiShieldOperationSchemaValidationSettingsProps extends ApiShieldOperationSchemaValidationSettingsConfig {}
9
+ export interface ApiShieldProps extends ApiShieldArgs {}
10
+ export interface ApiShieldSchemaProps extends ApiShieldSchemaArgs {}
11
+ export interface ApiShieldSchemaValidationSettingsProps extends ApiShieldSchemaValidationSettingsArgs {}
12
+ export interface ApiShieldOperationProps extends ApiShieldOperationArgs {}
13
+ export interface ApiShieldOperationSchemaValidationSettingsProps extends ApiShieldOperationSchemaValidationSettingsArgs {}
@@ -1,7 +1,5 @@
1
- import { ArgoSmartRouting } from '@cdktf/provider-cloudflare/lib/argo-smart-routing/index.js'
2
- import { ArgoTieredCaching } from '@cdktf/provider-cloudflare/lib/argo-tiered-caching/index.js'
1
+ import * as cloudflare from '@pulumi/cloudflare'
3
2
  import { CommonCloudflareConstruct } from '../../common/index.js'
4
- import { createCloudflareTfOutput } from '../../utils/index.js'
5
3
  import { ArgoSmartRoutingProps, ArgoTieredCachingProps } from './types.js'
6
4
 
7
5
  /**
@@ -23,52 +21,40 @@ import { ArgoSmartRoutingProps, ArgoTieredCachingProps } from './types.js'
23
21
  */
24
22
  export class CloudflareArgoManager {
25
23
  /**
26
- * @summary Method to create a new Cloudflare Argo
24
+ * @summary Method to create a new Cloudflare Argo Smart Routing
27
25
  * @param id scoped id of the resource
28
26
  * @param scope scope in which this resource is defined
29
27
  * @param props argo properties
30
- * @see [CDKTF Argo Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/argoSmartRouting.typescript.md}
28
+ * @see [Pulumi Cloudflare ArgoSmartRouting]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/argosmartrouting/}
31
29
  */
32
30
  public createArgoSmartRouting(id: string, scope: CommonCloudflareConstruct, props: ArgoSmartRoutingProps) {
33
31
  if (!props) throw `Props undefined for ${id}`
34
32
 
35
33
  const zoneId = props.zoneId
36
34
  ? props.zoneId
37
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.zoneId
38
-
39
- const argoSmartRouting = new ArgoSmartRouting(scope, `${id}`, {
35
+ : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
36
+ return new cloudflare.ArgoSmartRouting(`${id}`, {
40
37
  ...props,
41
38
  zoneId,
42
39
  })
43
-
44
- createCloudflareTfOutput(`${id}-argoSmartRoutingFriendlyUniqueId`, scope, argoSmartRouting.friendlyUniqueId)
45
- createCloudflareTfOutput(`${id}-argoSmartRoutingId`, scope, argoSmartRouting.id)
46
-
47
- return argoSmartRouting
48
40
  }
49
41
 
50
42
  /**
51
- * @summary Method to create a new Cloudflare Argo
43
+ * @summary Method to create a new Cloudflare Argo Tiered Caching
52
44
  * @param id scoped id of the resource
53
45
  * @param scope scope in which this resource is defined
54
46
  * @param props argo properties
55
- * @see [CDKTF Argo Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/argoTieredCaching.typescript.md}
47
+ * @see [Pulumi Cloudflare ArgoTieredCaching]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/argotieredcaching/}
56
48
  */
57
49
  public createArgoTieredCaching(id: string, scope: CommonCloudflareConstruct, props: ArgoTieredCachingProps) {
58
50
  if (!props) throw `Props undefined for ${id}`
59
51
 
60
52
  const zoneId = props.zoneId
61
53
  ? props.zoneId
62
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.zoneId
63
-
64
- const argoTieredCaching = new ArgoTieredCaching(scope, `${id}`, {
54
+ : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
55
+ return new cloudflare.ArgoTieredCaching(`${id}`, {
65
56
  ...props,
66
57
  zoneId,
67
58
  })
68
-
69
- createCloudflareTfOutput(`${id}-argoTieredCachingFriendlyUniqueId`, scope, argoTieredCaching.friendlyUniqueId)
70
- createCloudflareTfOutput(`${id}-argoTieredCachingId`, scope, argoTieredCaching.id)
71
-
72
- return argoTieredCaching
73
59
  }
74
60
  }
@@ -1,5 +1,4 @@
1
- import { ArgoSmartRoutingConfig } from '@cdktf/provider-cloudflare/lib/argo-smart-routing/index.js'
2
- import { ArgoTieredCachingConfig } from '@cdktf/provider-cloudflare/lib/argo-tiered-caching/index.js'
1
+ import { ArgoSmartRoutingArgs, ArgoTieredCachingArgs } from '@pulumi/cloudflare'
3
2
 
4
- export interface ArgoSmartRoutingProps extends ArgoSmartRoutingConfig {}
5
- export interface ArgoTieredCachingProps extends ArgoTieredCachingConfig {}
3
+ export interface ArgoSmartRoutingProps extends ArgoSmartRoutingArgs {}
4
+ export interface ArgoTieredCachingProps extends ArgoTieredCachingArgs {}
@@ -1,6 +1,5 @@
1
- import { Filter } from '@cdktf/provider-cloudflare/lib/filter/index.js'
1
+ import * as cloudflare from '@pulumi/cloudflare'
2
2
  import { CommonCloudflareConstruct } from '../../common/index.js'
3
- import { createCloudflareTfOutput } from '../../utils/index.js'
4
3
  import { FilterProps } from './types.js'
5
4
 
6
5
  /**
@@ -15,7 +14,7 @@ import { FilterProps } from './types.js'
15
14
  * constructor(parent: Construct, id: string, props: CommonCloudflareStackProps) {
16
15
  * super(parent, id, props)
17
16
  * this.props = props
18
- * this.filterManager.createApiShield('MyFilter', this, props)
17
+ * this.filterManager.createFilter('MyFilter', this, props)
19
18
  * }
20
19
  * }
21
20
  * ```
@@ -26,23 +25,17 @@ export class CloudflareFilterManager {
26
25
  * @param id scoped id of the resource
27
26
  * @param scope scope in which this resource is defined
28
27
  * @param props filter properties
29
- * @see [CDKTF Filter Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/filter.typescript.md}
28
+ * @see [Pulumi Cloudflare Filter]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/filter/}
30
29
  */
31
- public createApiShield(id: string, scope: CommonCloudflareConstruct, props: FilterProps) {
30
+ public createFilter(id: string, scope: CommonCloudflareConstruct, props: FilterProps) {
32
31
  if (!props) throw `Props undefined for ${id}`
33
32
 
34
33
  const zoneId = props.zoneId
35
34
  ? props.zoneId
36
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.zoneId
37
-
38
- const filter = new Filter(scope, `${id}`, {
35
+ : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
36
+ return new cloudflare.Filter(`${id}`, {
39
37
  ...props,
40
38
  zoneId,
41
39
  })
42
-
43
- createCloudflareTfOutput(`${id}-filterFriendlyUniqueId`, scope, filter.friendlyUniqueId)
44
- createCloudflareTfOutput(`${id}-filterId`, scope, filter.id)
45
-
46
- return filter
47
40
  }
48
41
  }
@@ -1,3 +1,3 @@
1
- import { FilterConfig } from '@cdktf/provider-cloudflare/lib/filter/index.js'
1
+ import { FilterArgs } from '@pulumi/cloudflare'
2
2
 
3
- export interface FilterProps extends FilterConfig {}
3
+ export interface FilterProps extends FilterArgs {}
@@ -1,6 +1,5 @@
1
- import { FirewallRule } from '@cdktf/provider-cloudflare/lib/firewall-rule/index.js'
1
+ import * as cloudflare from '@pulumi/cloudflare'
2
2
  import { CommonCloudflareConstruct } from '../../common/index.js'
3
- import { createCloudflareTfOutput } from '../../utils/index.js'
4
3
  import { FirewallRuleProps } from './types.js'
5
4
 
6
5
  /**
@@ -26,23 +25,17 @@ export class CloudflareFirewallManager {
26
25
  * @param id scoped id of the resource
27
26
  * @param scope scope in which this resource is defined
28
27
  * @param props firewall rule properties
29
- * @see [CDKTF Firewall Rule Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/firewallRule.typescript.md}
28
+ * @see [Pulumi Cloudflare Firewall Rule]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/firewallrule/}
30
29
  */
31
30
  public createFirewallRule(id: string, scope: CommonCloudflareConstruct, props: FirewallRuleProps) {
32
31
  if (!props) throw `Props undefined for ${id}`
33
32
 
34
33
  const zoneId = props.zoneId
35
34
  ? props.zoneId
36
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.zoneId
37
-
38
- const firewallRule = new FirewallRule(scope, `${id}`, {
35
+ : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
36
+ return new cloudflare.FirewallRule(`${id}`, {
39
37
  ...props,
40
38
  zoneId,
41
39
  })
42
-
43
- createCloudflareTfOutput(`${id}-firewallRuleFriendlyUniqueId`, scope, firewallRule.friendlyUniqueId)
44
- createCloudflareTfOutput(`${id}-firewallRuleId`, scope, firewallRule.id)
45
-
46
- return firewallRule
47
40
  }
48
41
  }
@@ -1,3 +1,3 @@
1
- import { FirewallRuleConfig } from '@cdktf/provider-cloudflare/lib/firewall-rule/index.js'
1
+ import { FirewallRuleArgs } from '@pulumi/cloudflare'
2
2
 
3
- export interface FirewallRuleProps extends FirewallRuleConfig {}
3
+ export interface FirewallRuleProps extends FirewallRuleArgs {}
@@ -1,9 +1,6 @@
1
- import { PageRule } from '@cdktf/provider-cloudflare/lib/page-rule/index.js'
2
- import { PagesDomain } from '@cdktf/provider-cloudflare/lib/pages-domain/index.js'
3
- import { PagesProject } from '@cdktf/provider-cloudflare/lib/pages-project/index.js'
4
- import { LocalExec, Provider } from 'cdktf-local-exec'
1
+ import * as cloudflare from '@pulumi/cloudflare'
2
+ import { local } from '@pulumi/command'
5
3
  import { CommonCloudflareConstruct } from '../../common/index.js'
6
- import { createCloudflareTfOutput } from '../../utils/index.js'
7
4
  import { PageRuleProps, PagesDomainProps, PagesProjectDeployProps, PagesProjectProps } from './types.js'
8
5
 
9
6
  /**
@@ -29,21 +26,16 @@ export class CloudflarePageManager {
29
26
  * @param id scoped id of the resource
30
27
  * @param scope scope in which this resource is defined
31
28
  * @param props pages project properties
32
- * @see [CDKTF Pages Project Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/pagesProject.typescript.md}
29
+ * @see [Pulumi Cloudflare Pages Project]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/pagesproject/}
33
30
  */
34
31
  public createPagesProject(id: string, scope: CommonCloudflareConstruct, props: PagesProjectProps) {
35
32
  if (!props) throw `Props undefined for ${id}`
36
33
 
37
- const pagesProject = new PagesProject(scope, `${id}`, {
34
+ return new cloudflare.PagesProject(`${id}`, {
38
35
  ...props,
39
36
  accountId: props.accountId ?? scope.props.accountId,
40
37
  name: `${props.name}-${scope.props.stage}`,
41
38
  })
42
-
43
- createCloudflareTfOutput(`${id}-pagesProjectFriendlyUniqueId`, scope, pagesProject.friendlyUniqueId)
44
- createCloudflareTfOutput(`${id}-pagesProjectId`, scope, pagesProject.id)
45
-
46
- return pagesProject
47
39
  }
48
40
 
49
41
  /**
@@ -51,21 +43,16 @@ export class CloudflarePageManager {
51
43
  * @param id scoped id of the resource
52
44
  * @param scope scope in which this resource is defined
53
45
  * @param props pages domain properties
54
- * @see [CDKTF Pages Domain Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/pagesDomain.typescript.md}
46
+ * @see [Pulumi Cloudflare Pages Domain]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/pagesdomain/}
55
47
  */
56
48
  public createPagesDomain(id: string, scope: CommonCloudflareConstruct, props: PagesDomainProps) {
57
49
  if (!props) throw `Props undefined for ${id}`
58
50
 
59
- const pagesDomain = new PagesDomain(scope, `${id}`, {
51
+ return new cloudflare.PagesDomain(`${id}`, {
60
52
  ...props,
61
53
  accountId: props.accountId ?? scope.props.accountId,
62
54
  name: props.name ?? scope.props.domainName,
63
55
  })
64
-
65
- createCloudflareTfOutput(`${id}-pagesDomainFriendlyUniqueId`, scope, pagesDomain.friendlyUniqueId)
66
- createCloudflareTfOutput(`${id}-pagesDomainId`, scope, pagesDomain.id)
67
-
68
- return pagesDomain
69
56
  }
70
57
 
71
58
  /**
@@ -73,37 +60,33 @@ export class CloudflarePageManager {
73
60
  * @param id scoped id of the resource
74
61
  * @param scope scope in which this resource is defined
75
62
  * @param props page rule properties
76
- * @see [CDKTF Page Rule Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/pageRule.typescript.md}
63
+ * @see [Pulumi Cloudflare Page Rule]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/pagerule/}
77
64
  */
78
65
  public createPageRule(id: string, scope: CommonCloudflareConstruct, props: PageRuleProps) {
79
66
  if (!props) throw `Props undefined for ${id}`
80
67
 
81
68
  const zoneId = props.zoneId
82
69
  ? props.zoneId
83
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.zoneId
84
-
85
- const pageRule = new PageRule(scope, `${id}`, {
70
+ : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
71
+ return new cloudflare.PageRule(`${id}`, {
86
72
  ...props,
87
73
  zoneId,
88
74
  })
89
-
90
- createCloudflareTfOutput(`${id}-pageRuleFriendlyUniqueId`, scope, pageRule.friendlyUniqueId)
91
- createCloudflareTfOutput(`${id}-pageRuleId`, scope, pageRule.id)
92
-
93
- return pageRule
94
75
  }
95
76
 
96
77
  public deployPagesProject(id: string, scope: CommonCloudflareConstruct, props: PagesProjectDeployProps) {
97
78
  if (!props) throw `Props undefined for ${id}`
98
79
 
99
- new Provider(scope, `${id}`)
100
80
  const message = process.env.BUILD_NUMBER ?? props.message
101
- const deployment = new LocalExec(scope, `${id}-deploy-${new Date().toISOString()}`, {
102
- command: `CLOUDFLARE_ACCOUNT_ID=${scope.props.accountId} CLOUDFLARE_API_TOKEN=${scope.props.apiToken} npx wrangler pages deploy ${props.directory} --project-name=${props.projectName} --branch=${props.branch} --commit-message=${message}`,
103
- cwd: '',
104
- dependsOn: props.dependsOn,
105
- })
106
-
107
- return deployment
81
+ return new local.Command(
82
+ `${id}-deploy-${new Date().toISOString()}`,
83
+ {
84
+ create: `CLOUDFLARE_ACCOUNT_ID=${scope.props.accountId} CLOUDFLARE_API_TOKEN=${scope.props.apiToken} npx wrangler pages deploy ${props.directory} --project-name=${props.projectName} --branch=${props.branch} --commit-message=${message}`,
85
+ dir: '',
86
+ },
87
+ {
88
+ dependsOn: props.dependsOn,
89
+ }
90
+ )
108
91
  }
109
92
  }
@@ -1,10 +1,8 @@
1
- import { PageRuleConfig } from '@cdktf/provider-cloudflare/lib/page-rule/index.js'
2
- import { PagesDomainConfig } from '@cdktf/provider-cloudflare/lib/pages-domain/index.js'
3
- import { PagesProjectConfig } from '@cdktf/provider-cloudflare/lib/pages-project/index.js'
1
+ import { PageRuleArgs, PagesDomainArgs, PagesProjectArgs } from '@pulumi/cloudflare'
4
2
 
5
- export interface PagesProjectProps extends PagesProjectConfig {}
6
- export interface PagesDomainProps extends PagesDomainConfig {}
7
- export interface PageRuleProps extends PageRuleConfig {}
3
+ export interface PagesProjectProps extends PagesProjectArgs {}
4
+ export interface PagesDomainProps extends PagesDomainArgs {}
5
+ export interface PageRuleProps extends PageRuleArgs {}
8
6
  export interface PagesProjectDeployProps {
9
7
  branch: string
10
8
  directory: string
@@ -1,6 +1,5 @@
1
- import { DnsRecord } from '@cdktf/provider-cloudflare/lib/dns-record/index.js'
1
+ import * as cloudflare from '@pulumi/cloudflare'
2
2
  import { CommonCloudflareConstruct } from '../../common/index.js'
3
- import { createCloudflareTfOutput } from '../../utils/index.js'
4
3
  import { DnsRecordProps } from './types.js'
5
4
 
6
5
  /**
@@ -26,23 +25,17 @@ export class CloudflareRecordManager {
26
25
  * @param id scoped id of the resource
27
26
  * @param scope scope in which this resource is defined
28
27
  * @param props record properties
29
- * @see [CDKTF Record Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/dnsRecord.typescript.md}
28
+ * @see [Pulumi Cloudflare Record]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/record/}
30
29
  */
31
30
  public createRecord(id: string, scope: CommonCloudflareConstruct, props: DnsRecordProps) {
32
31
  if (!props) throw `Props undefined for ${id}`
33
32
 
34
33
  const zoneId = props.zoneId
35
34
  ? props.zoneId
36
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.zoneId
37
-
38
- const record = new DnsRecord(scope, `${id}`, {
35
+ : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
36
+ return new cloudflare.DnsRecord(id, {
39
37
  ...props,
40
38
  zoneId,
41
39
  })
42
-
43
- createCloudflareTfOutput(`${id}-recordFriendlyUniqueId`, scope, record.friendlyUniqueId)
44
- createCloudflareTfOutput(`${id}-recordId`, scope, record.id)
45
-
46
- return record
47
40
  }
48
41
  }
@@ -1,3 +1,3 @@
1
- import { DnsRecordConfig } from '@cdktf/provider-cloudflare/lib/dns-record/index.js'
1
+ import { DnsRecordArgs } from '@pulumi/cloudflare'
2
2
 
3
- export interface DnsRecordProps extends DnsRecordConfig {}
3
+ export interface DnsRecordProps extends DnsRecordArgs {}
@@ -1,6 +1,5 @@
1
- import { Ruleset } from '@cdktf/provider-cloudflare/lib/ruleset/index.js'
1
+ import * as cloudflare from '@pulumi/cloudflare'
2
2
  import { CommonCloudflareConstruct } from '../../common/index.js'
3
- import { createCloudflareTfOutput } from '../../utils/index.js'
4
3
  import { RulesetProps } from './types.js'
5
4
 
6
5
  /**
@@ -9,11 +8,11 @@ import { RulesetProps } from './types.js'
9
8
  * - If a custom construct extends {@link CommonCloudflareConstruct}, an instance is available within the context.
10
9
  * @example
11
10
  * ```
12
- * import { CommonCloudflareConstruct, CommonCloudflareConstruct } from '@gradientedge/cdk-utils'
11
+ * import { CommonCloudflareConstruct } from '@gradientedge/cdk-utils'
13
12
  *
14
13
  * class CustomConstruct extends CommonCloudflareConstruct {
15
- * constructor(parent: Construct, id: string, props: CommonCloudflareStackProps) {
16
- * super(parent, id, props)
14
+ * constructor(parent: pulumi.ComponentResource, name: string, props: CommonCloudflareStackProps) {
15
+ * super(parent, name, props)
17
16
  * this.props = props
18
17
  * this.ruleSetManager.createRuleSet('MyRule', this, props)
19
18
  * }
@@ -26,23 +25,19 @@ export class CloudflareRuleSetManager {
26
25
  * @param id scoped id of the resource
27
26
  * @param scope scope in which this resource is defined
28
27
  * @param props rule set properties
29
- * @see [CDKTF Ruleset Module]{@link https://github.com/cdktf/cdktf-provider-cloudflare/blob/main/docs/ruleset.typescript.md}
28
+ * @see [Pulumi Cloudflare Ruleset]{@link https://www.pulumi.com/registry/packages/cloudflare/api-docs/ruleset/}
30
29
  */
31
30
  public createRuleSet(id: string, scope: CommonCloudflareConstruct, props: RulesetProps) {
32
31
  if (!props) throw `Props undefined for ${id}`
33
32
 
34
33
  const zoneId = props.zoneId
35
34
  ? props.zoneId
36
- : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { name: scope.props.domainName })?.zoneId
37
-
38
- const ruleSet = new Ruleset(scope, `${id}`, {
35
+ : scope.zoneManager.resolveZone(`${id}-data-zone`, scope, { filter: { name: scope.props.domainName } })?.id
36
+ const ruleSet = new cloudflare.Ruleset(`${id}`, {
39
37
  ...props,
40
38
  zoneId,
41
39
  })
42
40
 
43
- createCloudflareTfOutput(`${id}-ruleSetFriendlyUniqueId`, scope, ruleSet.friendlyUniqueId)
44
- createCloudflareTfOutput(`${id}-ruleSetId`, scope, ruleSet.id)
45
-
46
41
  return ruleSet
47
42
  }
48
43
  }
@@ -1,3 +1,3 @@
1
- import { RulesetConfig } from '@cdktf/provider-cloudflare/lib/ruleset/index.js'
1
+ import * as cloudflare from '@pulumi/cloudflare'
2
2
 
3
- export interface RulesetProps extends RulesetConfig {}
3
+ export interface RulesetProps extends cloudflare.RulesetArgs {}