@gradientedge/cdk-utils 9.65.0 → 9.67.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.
@@ -9,4 +9,4 @@ var AzureRemoteBackend;
9
9
  /**
10
10
  * List of Azure resources that excludes tags
11
11
  */
12
- exports.RESOURCES_TO_EXCLUDE_TAGS = new Set(['ApiManagementNamedValue']);
12
+ exports.RESOURCES_TO_EXCLUDE_TAGS = new Set(['ApiManagementNamedValue', 'Application']);
@@ -1,6 +1,5 @@
1
1
  import { DataAzurermApiManagement, DataAzurermApiManagementConfig } from '@cdktf/provider-azurerm/lib/data-azurerm-api-management';
2
2
  import { ApiManagementCustomDomain } from '@cdktf/provider-azurerm/lib/api-management-custom-domain';
3
- import { ApiManagementBackend } from '@cdktf/provider-azurerm/lib/api-management-backend';
4
3
  import { ApiManagement } from '@cdktf/provider-azurerm/lib/api-management';
5
4
  import { ApiManagementApi } from '@cdktf/provider-azurerm/lib/api-management-api';
6
5
  import { ApiManagementLoggerApplicationInsights } from '@cdktf/provider-azurerm/lib/api-management-logger';
@@ -56,7 +55,7 @@ export declare class AzureApiManagementManager {
56
55
  * @param props api management backend properties
57
56
  * @see [CDKTF Api management Backend Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/ApiManagementBackend.typescript.md}
58
57
  */
59
- createApiManagementBackend(id: string, scope: CommonAzureConstruct, props: ApiManagementBackendProps): ApiManagementBackend;
58
+ createApiManagementBackend(id: string, scope: CommonAzureConstruct, props: ApiManagementBackendProps): Resource;
60
59
  /**
61
60
  * @summary Method to create a new api management api
62
61
  * @param id scoped id of the resource
@@ -7,7 +7,6 @@ exports.AzureApiManagementManager = void 0;
7
7
  const data_azurerm_resource_group_1 = require("@cdktf/provider-azurerm/lib/data-azurerm-resource-group");
8
8
  const data_azurerm_api_management_1 = require("@cdktf/provider-azurerm/lib/data-azurerm-api-management");
9
9
  const api_management_custom_domain_1 = require("@cdktf/provider-azurerm/lib/api-management-custom-domain");
10
- const api_management_backend_1 = require("@cdktf/provider-azurerm/lib/api-management-backend");
11
10
  const api_management_1 = require("@cdktf/provider-azurerm/lib/api-management");
12
11
  const api_management_api_1 = require("@cdktf/provider-azurerm/lib/api-management-api");
13
12
  const api_management_api_operation_1 = require("@cdktf/provider-azurerm/lib/api-management-api-operation");
@@ -171,11 +170,34 @@ class AzureApiManagementManager {
171
170
  createApiManagementBackend(id, scope, props) {
172
171
  if (!props)
173
172
  throw `Props undefined for ${id}`;
174
- const apiManagementBackend = new api_management_backend_1.ApiManagementBackend(scope, `${id}-am-be`, {
175
- ...props,
173
+ // Commenting as circuit breaker config is currently not supported
174
+ /*
175
+ const apiManagementBackend = new ApiManagementBackend(scope, `${id}-am-be`, {
176
+ ...props,
177
+ name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.apiManagementBackend),
178
+ description: props.description ?? `Backend for ${props.name}-${scope.props.stage}`,
179
+ protocol: props.protocol ?? 'http',
180
+ })
181
+ */
182
+ const apiManagementBackend = new resource_1.Resource(scope, `${id}-am-be`, {
183
+ type: 'Microsoft.ApiManagement/service/backends@2024-06-01-preview',
176
184
  name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.apiManagementBackend),
177
- description: props.description ?? `Backend for ${props.name}-${scope.props.stage}`,
178
- protocol: props.protocol ?? 'http',
185
+ parentId: props.apiManagementId,
186
+ body: {
187
+ properties: {
188
+ circuitBreaker: props.circuitBreaker,
189
+ credentials: props.credentials,
190
+ description: props.description ?? `Backend for ${props.name}-${scope.props.stage}`,
191
+ url: props.url,
192
+ resourceId: props.resourceId,
193
+ protocol: props.protocol ?? 'http',
194
+ },
195
+ },
196
+ responseExportValues: ['*'],
197
+ ignoreMissingProperty: true,
198
+ ignoreCasing: true,
199
+ schemaValidationEnabled: false,
200
+ lifecycle: props.lifecycle,
179
201
  });
180
202
  (0, utils_1.createAzureTfOutput)(`${id}-apiManagementBackendName`, scope, apiManagementBackend.name);
181
203
  (0, utils_1.createAzureTfOutput)(`${id}-apiManagementBackendFriendlyUniqueId`, scope, apiManagementBackend.friendlyUniqueId);
@@ -7,6 +7,8 @@ export interface ApiManagementProps extends ApiManagementConfig {
7
7
  }
8
8
  export interface ApiManagementBackendProps extends ApiManagementBackendConfig {
9
9
  backendUrlPath?: string;
10
+ apiManagementId: string;
11
+ circuitBreaker: any;
10
12
  }
11
13
  export interface ApiManagementCustomDomainProps extends ApiManagementCustomDomainConfig {
12
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "9.65.0",
3
+ "version": "9.67.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -54,14 +54,14 @@
54
54
  "@aws-sdk/credential-providers": "^3.817.0",
55
55
  "@aws-sdk/types": "^3.804.0",
56
56
  "@cdktf/provider-aws": "^19.63.0",
57
- "@cdktf/provider-azurerm": "^13.29.0",
58
- "@cdktf/provider-cloudflare": "^12.4.0",
57
+ "@cdktf/provider-azurerm": "^14.4.0",
58
+ "@cdktf/provider-cloudflare": "^13.1.0",
59
59
  "@types/lodash": "^4.17.16",
60
60
  "@types/node": "^22.15.17",
61
61
  "@types/uuid": "^10.0.0",
62
62
  "app-root-path": "^3.1.0",
63
63
  "aws-cdk-lib": "^2.195.0",
64
- "cdktf": "^0.20.12",
64
+ "cdktf": "^0.21.0",
65
65
  "cdktf-local-exec": "^0.5.71",
66
66
  "constructs": "^10.4.2",
67
67
  "lodash": "^4.17.21",
@@ -6,4 +6,4 @@ export enum AzureRemoteBackend {
6
6
  /**
7
7
  * List of Azure resources that excludes tags
8
8
  */
9
- export const RESOURCES_TO_EXCLUDE_TAGS = new Set(['ApiManagementNamedValue'])
9
+ export const RESOURCES_TO_EXCLUDE_TAGS = new Set(['ApiManagementNamedValue', 'Application'])
@@ -208,11 +208,39 @@ export class AzureApiManagementManager {
208
208
  public createApiManagementBackend(id: string, scope: CommonAzureConstruct, props: ApiManagementBackendProps) {
209
209
  if (!props) throw `Props undefined for ${id}`
210
210
 
211
+ // Commenting as circuit breaker config is currently not supported
212
+ /*
211
213
  const apiManagementBackend = new ApiManagementBackend(scope, `${id}-am-be`, {
212
- ...props,
214
+ ...props,
215
+ name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.apiManagementBackend),
216
+ description: props.description ?? `Backend for ${props.name}-${scope.props.stage}`,
217
+ protocol: props.protocol ?? 'http',
218
+ })
219
+ */
220
+
221
+ const apiManagementBackend = new Resource(scope, `${id}-am-be`, {
222
+ type: 'Microsoft.ApiManagement/service/backends@2024-06-01-preview',
213
223
  name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.apiManagementBackend),
214
- description: props.description ?? `Backend for ${props.name}-${scope.props.stage}`,
215
- protocol: props.protocol ?? 'http',
224
+ parentId: props.apiManagementId,
225
+
226
+ body: {
227
+ properties: {
228
+ circuitBreaker: props.circuitBreaker,
229
+ credentials: props.credentials,
230
+ description: props.description ?? `Backend for ${props.name}-${scope.props.stage}`,
231
+ url: props.url,
232
+ resourceId: props.resourceId,
233
+ protocol: props.protocol ?? 'http',
234
+ },
235
+ },
236
+
237
+ responseExportValues: ['*'],
238
+
239
+ ignoreMissingProperty: true,
240
+ ignoreCasing: true,
241
+ schemaValidationEnabled: false,
242
+
243
+ lifecycle: props.lifecycle,
216
244
  })
217
245
 
218
246
  createAzureTfOutput(`${id}-apiManagementBackendName`, scope, apiManagementBackend.name)
@@ -8,6 +8,8 @@ export interface ApiManagementProps extends ApiManagementConfig {}
8
8
 
9
9
  export interface ApiManagementBackendProps extends ApiManagementBackendConfig {
10
10
  backendUrlPath?: string
11
+ apiManagementId: string
12
+ circuitBreaker: any
11
13
  }
12
14
 
13
15
  export interface ApiManagementCustomDomainProps extends ApiManagementCustomDomainConfig {}