@gradientedge/cdk-utils 9.83.0 → 9.84.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.
@@ -3,8 +3,8 @@ import { ApiManagementCustomDomain } from '@cdktf/provider-azurerm/lib/api-manag
3
3
  import { ApiManagement } from '@cdktf/provider-azurerm/lib/api-management';
4
4
  import { ApiManagementApi } from '@cdktf/provider-azurerm/lib/api-management-api';
5
5
  import { ApiManagementLoggerApplicationInsights } from '@cdktf/provider-azurerm/lib/api-management-logger';
6
+ import { ApiManagementBackend } from '@cdktf/provider-azurerm/lib/api-management-backend';
6
7
  import { RedisCache } from '@cdktf/provider-azurerm/lib/redis-cache';
7
- import { Resource } from '../../.gen/providers/azapi/resource';
8
8
  import { CommonAzureConstruct } from '../../common';
9
9
  import { ApiManagementProps, ApiManagementBackendProps, ApiManagementApiProps, ApiManagementCustomDomainProps } from './types';
10
10
  /**
@@ -48,7 +48,7 @@ export declare class AzureApiManagementManager {
48
48
  * @param props api management backend properties
49
49
  * @see [CDKTF Api management Backend Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/ApiManagementBackend.typescript.md}
50
50
  */
51
- createApiManagementBackend(id: string, scope: CommonAzureConstruct, props: ApiManagementBackendProps): Resource;
51
+ createApiManagementBackend(id: string, scope: CommonAzureConstruct, props: ApiManagementBackendProps): ApiManagementBackend;
52
52
  /**
53
53
  * @summary Method to create a new api management api
54
54
  * @param id scoped id of the resource
@@ -12,8 +12,8 @@ const api_management_api_1 = require("@cdktf/provider-azurerm/lib/api-management
12
12
  const api_management_api_operation_1 = require("@cdktf/provider-azurerm/lib/api-management-api-operation");
13
13
  const api_management_api_operation_policy_1 = require("@cdktf/provider-azurerm/lib/api-management-api-operation-policy");
14
14
  const api_management_logger_1 = require("@cdktf/provider-azurerm/lib/api-management-logger");
15
+ const api_management_backend_1 = require("@cdktf/provider-azurerm/lib/api-management-backend");
15
16
  const api_management_redis_cache_1 = require("@cdktf/provider-azurerm/lib/api-management-redis-cache");
16
- const resource_1 = require("../../.gen/providers/azapi/resource");
17
17
  const utils_1 = require("../../utils");
18
18
  const lodash_1 = __importDefault(require("lodash"));
19
19
  /**
@@ -119,34 +119,11 @@ class AzureApiManagementManager {
119
119
  createApiManagementBackend(id, scope, props) {
120
120
  if (!props)
121
121
  throw `Props undefined for ${id}`;
122
- // Commenting as circuit breaker config is currently not supported
123
- /*
124
- const apiManagementBackend = new ApiManagementBackend(scope, `${id}-am-be`, {
125
- ...props,
126
- name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.apiManagementBackend),
127
- description: props.description ?? `Backend for ${props.name}-${scope.props.stage}`,
128
- protocol: props.protocol ?? 'http',
129
- })
130
- */
131
- const apiManagementBackend = new resource_1.Resource(scope, `${id}-am-be`, {
132
- type: 'Microsoft.ApiManagement/service/backends@2024-06-01-preview',
122
+ const apiManagementBackend = new api_management_backend_1.ApiManagementBackend(scope, `${id}-am-be`, {
123
+ ...props,
133
124
  name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.apiManagementBackend),
134
- parentId: props.apiManagementId,
135
- body: {
136
- properties: {
137
- circuitBreaker: props.circuitBreaker,
138
- credentials: props.credentials,
139
- description: props.description ?? `Backend for ${props.name}-${scope.props.stage}`,
140
- url: props.url,
141
- resourceId: props.resourceId,
142
- protocol: props.protocol ?? 'http',
143
- },
144
- },
145
- responseExportValues: ['*'],
146
- ignoreMissingProperty: true,
147
- ignoreCasing: true,
148
- schemaValidationEnabled: false,
149
- lifecycle: props.lifecycle,
125
+ description: props.description ?? `Backend for ${props.name}-${scope.props.stage}`,
126
+ protocol: props.protocol ?? 'http',
150
127
  });
151
128
  (0, utils_1.createAzureTfOutput)(`${id}-apiManagementBackendName`, scope, apiManagementBackend.name);
152
129
  (0, utils_1.createAzureTfOutput)(`${id}-apiManagementBackendFriendlyUniqueId`, scope, apiManagementBackend.friendlyUniqueId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "9.83.0",
3
+ "version": "9.84.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -54,8 +54,8 @@
54
54
  "@aws-sdk/credential-providers": "^3.886.0",
55
55
  "@aws-sdk/types": "^3.804.0",
56
56
  "@cdktf/provider-aws": "^19.63.0",
57
- "@cdktf/provider-azurerm": "^14.12.0",
58
- "@cdktf/provider-cloudflare": "^13.4.0",
57
+ "@cdktf/provider-azurerm": "^14.22.0",
58
+ "@cdktf/provider-cloudflare": "^13.8.0",
59
59
  "@types/lodash": "^4.17.20",
60
60
  "@types/node": "^22.15.17",
61
61
  "@types/uuid": "^10.0.0",
@@ -63,7 +63,7 @@
63
63
  "aws-cdk-lib": "^2.195.0",
64
64
  "cdktf": "^0.21.0",
65
65
  "cdktf-local-exec": "^0.5.71",
66
- "constructs": "^10.4.2",
66
+ "constructs": "^10.4.3",
67
67
  "lodash": "^4.17.21",
68
68
  "moment": "^2.30.1",
69
69
  "nconf": "^0.13.0",
@@ -12,9 +12,9 @@ import {
12
12
  ApiManagementLogger,
13
13
  ApiManagementLoggerApplicationInsights,
14
14
  } from '@cdktf/provider-azurerm/lib/api-management-logger'
15
+ import { ApiManagementBackend } from '@cdktf/provider-azurerm/lib/api-management-backend'
15
16
  import { ApiManagementRedisCache } from '@cdktf/provider-azurerm/lib/api-management-redis-cache'
16
17
  import { RedisCache } from '@cdktf/provider-azurerm/lib/redis-cache'
17
- import { Resource } from '../../.gen/providers/azapi/resource'
18
18
  import { CommonAzureConstruct } from '../../common'
19
19
  import { createAzureTfOutput } from '../../utils'
20
20
  import {
@@ -22,7 +22,6 @@ import {
22
22
  ApiManagementBackendProps,
23
23
  ApiManagementApiProps,
24
24
  ApiManagementCustomDomainProps,
25
- ApiManagementRedisCacheProps,
26
25
  } from './types'
27
26
  import _ from 'lodash'
28
27
 
@@ -144,39 +143,11 @@ export class AzureApiManagementManager {
144
143
  public createApiManagementBackend(id: string, scope: CommonAzureConstruct, props: ApiManagementBackendProps) {
145
144
  if (!props) throw `Props undefined for ${id}`
146
145
 
147
- // Commenting as circuit breaker config is currently not supported
148
- /*
149
146
  const apiManagementBackend = new ApiManagementBackend(scope, `${id}-am-be`, {
150
- ...props,
151
- name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.apiManagementBackend),
152
- description: props.description ?? `Backend for ${props.name}-${scope.props.stage}`,
153
- protocol: props.protocol ?? 'http',
154
- })
155
- */
156
-
157
- const apiManagementBackend = new Resource(scope, `${id}-am-be`, {
158
- type: 'Microsoft.ApiManagement/service/backends@2024-06-01-preview',
147
+ ...props,
159
148
  name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.apiManagementBackend),
160
- parentId: props.apiManagementId,
161
-
162
- body: {
163
- properties: {
164
- circuitBreaker: props.circuitBreaker,
165
- credentials: props.credentials,
166
- description: props.description ?? `Backend for ${props.name}-${scope.props.stage}`,
167
- url: props.url,
168
- resourceId: props.resourceId,
169
- protocol: props.protocol ?? 'http',
170
- },
171
- },
172
-
173
- responseExportValues: ['*'],
174
-
175
- ignoreMissingProperty: true,
176
- ignoreCasing: true,
177
- schemaValidationEnabled: false,
178
-
179
- lifecycle: props.lifecycle,
149
+ description: props.description ?? `Backend for ${props.name}-${scope.props.stage}`,
150
+ protocol: props.protocol ?? 'http',
180
151
  })
181
152
 
182
153
  createAzureTfOutput(`${id}-apiManagementBackendName`, scope, apiManagementBackend.name)