@gradientedge/cdk-utils 10.1.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.
Files changed (133) hide show
  1. package/dist/src/lib/azure/common/constants.d.ts +3 -2
  2. package/dist/src/lib/azure/common/constants.js +2 -1
  3. package/dist/src/lib/azure/common/construct.d.ts +26 -12
  4. package/dist/src/lib/azure/common/construct.js +31 -45
  5. package/dist/src/lib/azure/common/resource-name-formatter.d.ts +9 -4
  6. package/dist/src/lib/azure/common/resource-name-formatter.js +9 -5
  7. package/dist/src/lib/azure/common/stack.d.ts +18 -32
  8. package/dist/src/lib/azure/common/stack.js +77 -74
  9. package/dist/src/lib/azure/common/tagging.d.ts +29 -8
  10. package/dist/src/lib/azure/common/tagging.js +72 -26
  11. package/dist/src/lib/azure/common/types.d.ts +19 -4
  12. package/dist/src/lib/azure/services/api-management/main.d.ts +29 -32
  13. package/dist/src/lib/azure/services/api-management/main.js +100 -121
  14. package/dist/src/lib/azure/services/api-management/types.d.ts +33 -18
  15. package/dist/src/lib/azure/services/app-configuration/main.d.ts +6 -7
  16. package/dist/src/lib/azure/services/app-configuration/main.js +23 -26
  17. package/dist/src/lib/azure/services/app-configuration/types.d.ts +2 -2
  18. package/dist/src/lib/azure/services/app-service/main.d.ts +10 -12
  19. package/dist/src/lib/azure/services/app-service/main.js +37 -49
  20. package/dist/src/lib/azure/services/app-service/types.d.ts +4 -4
  21. package/dist/src/lib/azure/services/application-insights/main.d.ts +7 -8
  22. package/dist/src/lib/azure/services/application-insights/main.js +20 -26
  23. package/dist/src/lib/azure/services/application-insights/types.d.ts +2 -4
  24. package/dist/src/lib/azure/services/cosmosdb/main.d.ts +12 -15
  25. package/dist/src/lib/azure/services/cosmosdb/main.js +42 -61
  26. package/dist/src/lib/azure/services/cosmosdb/types.d.ts +4 -6
  27. package/dist/src/lib/azure/services/dns/main.d.ts +13 -17
  28. package/dist/src/lib/azure/services/dns/main.js +33 -51
  29. package/dist/src/lib/azure/services/dns/types.d.ts +5 -8
  30. package/dist/src/lib/azure/services/eventgrid/main.d.ts +20 -22
  31. package/dist/src/lib/azure/services/eventgrid/main.js +61 -89
  32. package/dist/src/lib/azure/services/eventgrid/types.d.ts +7 -8
  33. package/dist/src/lib/azure/services/function/main.d.ts +15 -15
  34. package/dist/src/lib/azure/services/function/main.js +54 -59
  35. package/dist/src/lib/azure/services/function/types.d.ts +18 -6
  36. package/dist/src/lib/azure/services/index.d.ts +1 -1
  37. package/dist/src/lib/azure/services/index.js +1 -1
  38. package/dist/src/lib/azure/services/key-vault/main.d.ts +6 -7
  39. package/dist/src/lib/azure/services/key-vault/main.js +29 -28
  40. package/dist/src/lib/azure/services/key-vault/types.d.ts +3 -2
  41. package/dist/src/lib/azure/services/monitor/main.d.ts +7 -8
  42. package/dist/src/lib/azure/services/monitor/main.js +10 -15
  43. package/dist/src/lib/azure/services/monitor/types.d.ts +2 -2
  44. package/dist/src/lib/azure/services/operational-insights/main.d.ts +29 -0
  45. package/dist/src/lib/azure/services/operational-insights/main.js +50 -0
  46. package/dist/src/lib/azure/services/operational-insights/types.d.ts +3 -0
  47. package/dist/src/lib/azure/services/redis/main.d.ts +8 -9
  48. package/dist/src/lib/azure/services/redis/main.js +24 -26
  49. package/dist/src/lib/azure/services/redis/types.d.ts +2 -2
  50. package/dist/src/lib/azure/services/resource-group/main.d.ts +6 -7
  51. package/dist/src/lib/azure/services/resource-group/main.js +9 -14
  52. package/dist/src/lib/azure/services/resource-group/types.d.ts +2 -2
  53. package/dist/src/lib/azure/services/servicebus/main.d.ts +17 -22
  54. package/dist/src/lib/azure/services/servicebus/main.js +47 -70
  55. package/dist/src/lib/azure/services/servicebus/types.d.ts +6 -10
  56. package/dist/src/lib/azure/services/storage/main.d.ts +24 -27
  57. package/dist/src/lib/azure/services/storage/main.js +70 -88
  58. package/dist/src/lib/azure/services/storage/types.d.ts +10 -8
  59. package/dist/src/lib/azure/types/index.d.ts +2 -1
  60. package/dist/src/lib/azure/utils/index.d.ts +19 -3
  61. package/dist/src/lib/azure/utils/index.js +19 -13
  62. package/dist/src/lib/cloudflare/common/stack.js +1 -1
  63. package/dist/src/lib/cloudflare/services/access/main.js +23 -23
  64. package/dist/src/lib/cloudflare/services/api-shield/main.js +11 -11
  65. package/dist/src/lib/cloudflare/services/argo/main.js +5 -5
  66. package/dist/src/lib/cloudflare/services/filter/main.js +3 -3
  67. package/dist/src/lib/cloudflare/services/firewall/main.js +3 -3
  68. package/dist/src/lib/cloudflare/services/page/main.js +7 -7
  69. package/dist/src/lib/cloudflare/services/record/main.js +3 -3
  70. package/dist/src/lib/cloudflare/services/rule-set/main.d.ts +1 -1
  71. package/dist/src/lib/cloudflare/services/rule-set/main.js +4 -5
  72. package/dist/src/lib/cloudflare/services/worker/main.js +13 -13
  73. package/dist/src/lib/cloudflare/services/zone/main.js +18 -18
  74. package/package.json +2 -1
  75. package/src/lib/azure/common/constants.ts +2 -1
  76. package/src/lib/azure/common/construct.ts +32 -48
  77. package/src/lib/azure/common/resource-name-formatter.ts +10 -6
  78. package/src/lib/azure/common/stack.ts +78 -78
  79. package/src/lib/azure/common/tagging.ts +78 -29
  80. package/src/lib/azure/common/types.ts +21 -4
  81. package/src/lib/azure/services/api-management/main.ts +172 -169
  82. package/src/lib/azure/services/api-management/types.ts +39 -16
  83. package/src/lib/azure/services/app-configuration/main.ts +33 -31
  84. package/src/lib/azure/services/app-configuration/types.ts +2 -2
  85. package/src/lib/azure/services/app-service/main.ts +61 -62
  86. package/src/lib/azure/services/app-service/types.ts +4 -4
  87. package/src/lib/azure/services/application-insights/main.ts +29 -30
  88. package/src/lib/azure/services/application-insights/types.ts +2 -5
  89. package/src/lib/azure/services/cosmosdb/main.ts +78 -77
  90. package/src/lib/azure/services/cosmosdb/types.ts +10 -6
  91. package/src/lib/azure/services/dns/main.ts +65 -72
  92. package/src/lib/azure/services/dns/types.ts +9 -9
  93. package/src/lib/azure/services/eventgrid/main.ts +120 -122
  94. package/src/lib/azure/services/eventgrid/types.ts +13 -8
  95. package/src/lib/azure/services/function/main.ts +75 -72
  96. package/src/lib/azure/services/function/types.ts +21 -6
  97. package/src/lib/azure/services/index.ts +1 -1
  98. package/src/lib/azure/services/key-vault/main.ts +38 -32
  99. package/src/lib/azure/services/key-vault/types.ts +4 -2
  100. package/src/lib/azure/services/monitor/main.ts +17 -21
  101. package/src/lib/azure/services/monitor/types.ts +2 -2
  102. package/src/lib/azure/services/operational-insights/main.ts +61 -0
  103. package/src/lib/azure/services/operational-insights/types.ts +3 -0
  104. package/src/lib/azure/services/redis/main.ts +30 -30
  105. package/src/lib/azure/services/redis/types.ts +2 -2
  106. package/src/lib/azure/services/resource-group/main.ts +20 -20
  107. package/src/lib/azure/services/resource-group/types.ts +2 -2
  108. package/src/lib/azure/services/servicebus/main.ts +103 -94
  109. package/src/lib/azure/services/servicebus/types.ts +17 -11
  110. package/src/lib/azure/services/storage/main.ts +113 -114
  111. package/src/lib/azure/services/storage/types.ts +16 -8
  112. package/src/lib/azure/types/index.ts +2 -1
  113. package/src/lib/azure/utils/index.ts +20 -22
  114. package/src/lib/cloudflare/common/stack.ts +1 -1
  115. package/src/lib/cloudflare/services/access/main.ts +114 -58
  116. package/src/lib/cloudflare/services/api-shield/main.ts +48 -22
  117. package/src/lib/cloudflare/services/argo/main.ts +17 -9
  118. package/src/lib/cloudflare/services/filter/main.ts +9 -5
  119. package/src/lib/cloudflare/services/firewall/main.ts +9 -5
  120. package/src/lib/cloudflare/services/page/main.ts +27 -15
  121. package/src/lib/cloudflare/services/record/main.ts +9 -5
  122. package/src/lib/cloudflare/services/rule-set/main.ts +10 -8
  123. package/src/lib/cloudflare/services/worker/main.ts +60 -29
  124. package/src/lib/cloudflare/services/zone/main.ts +75 -35
  125. package/dist/src/lib/azure/services/log-analytics-workspace/main.d.ts +0 -30
  126. package/dist/src/lib/azure/services/log-analytics-workspace/main.js +0 -55
  127. package/dist/src/lib/azure/services/log-analytics-workspace/types.d.ts +0 -3
  128. package/src/lib/azure/services/log-analytics-workspace/main.ts +0 -61
  129. package/src/lib/azure/services/log-analytics-workspace/types.ts +0 -3
  130. /package/dist/src/lib/azure/services/{log-analytics-workspace → operational-insights}/index.d.ts +0 -0
  131. /package/dist/src/lib/azure/services/{log-analytics-workspace → operational-insights}/index.js +0 -0
  132. /package/dist/src/lib/azure/services/{log-analytics-workspace → operational-insights}/types.js +0 -0
  133. /package/src/lib/azure/services/{log-analytics-workspace → operational-insights}/index.ts +0 -0
@@ -89,7 +89,7 @@ export class CommonCloudflareStack extends ComponentResource {
89
89
  * - Primary use is to have layered config for each environment which is injected into the context
90
90
  */
91
91
  determineStageContexts(props) {
92
- const stageContextFilePath = path.join(appRoot.path, props.stageContextPath ?? 'cdkEnv', `${props.stage}.json`);
92
+ const stageContextFilePath = path.join(appRoot.path, props.stageContextPath ?? 'env', `${props.stage}.json`);
93
93
  if (isDevStage(props.stage)) {
94
94
  if (props.debug)
95
95
  console.debug(`Development stage. Using default stage context properties`);
@@ -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
  }
@@ -1,4 +1,4 @@
1
- import * as cloudflare from '@pulumi/cloudflare';
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 cloudflare.Zone(id, {
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 cloudflare.Zone.get(name, id);
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 cloudflare.ZoneCacheReserve(id, {
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 cloudflare.ZoneCacheVariants(id, {
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 cloudflare.ZoneDnssec(id, {
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 cloudflare.ZoneHold(id, {
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 cloudflare.ZoneLockdown(id, {
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 cloudflare.ZoneSetting(id, {
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 cloudflare.ZoneSetting(id, {
148
+ return new ZoneSetting(id, {
149
149
  ...props,
150
150
  zoneId,
151
- });
151
+ }, { parent: scope });
152
152
  }
153
153
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "10.1.0",
3
+ "version": "10.3.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -62,6 +62,7 @@
62
62
  "@cdktf/provider-azurerm": "^14.23.1",
63
63
  "@cdktf/provider-cloudflare": "^13.9.1",
64
64
  "@pulumi/aws": "^7.16.0",
65
+ "@pulumi/azure": "^6.31.0",
65
66
  "@pulumi/azure-native": "^3.12.1",
66
67
  "@pulumi/cloudflare": "^6.13.0",
67
68
  "@pulumi/command": "^1.1.3",
@@ -1,6 +1,7 @@
1
1
  export enum AzureRemoteBackend {
2
- local = 'local',
3
2
  azurerm = 'azurerm',
3
+ pulumi = 'pulumi',
4
+ local = 'local',
4
5
  }
5
6
 
6
7
  /**