@gradientedge/cdk-utils 9.87.0 → 9.89.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.
- package/dist/src/lib/azure/common/construct.js +0 -2
- package/dist/src/lib/azure/services/api-management/main.d.ts +2 -2
- package/dist/src/lib/azure/services/api-management/main.js +1 -1
- package/dist/src/lib/azure/services/redis/main.d.ts +5 -5
- package/dist/src/lib/azure/services/redis/main.js +10 -10
- package/dist/src/lib/azure/services/redis/types.d.ts +2 -2
- package/package.json +1 -1
- package/src/lib/azure/common/construct.ts +0 -2
- package/src/lib/azure/services/api-management/main.ts +3 -3
- package/src/lib/azure/services/redis/main.ts +11 -11
- package/src/lib/azure/services/redis/types.ts +2 -2
- package/dist/src/lib/azure/.gen/providers/azapi/provider/index.d.ts +0 -414
- package/dist/src/lib/azure/.gen/providers/azapi/provider/index.js +0 -845
- package/src/lib/azure/.gen/constraints.json +0 -6
- package/src/lib/azure/.gen/providers/azapi/data-azapi-client-config/index.ts +0 -257
- package/src/lib/azure/.gen/providers/azapi/data-azapi-resource/index.ts +0 -876
- package/src/lib/azure/.gen/providers/azapi/data-azapi-resource-action/index.ts +0 -779
- package/src/lib/azure/.gen/providers/azapi/data-azapi-resource-id/index.ts +0 -383
- package/src/lib/azure/.gen/providers/azapi/data-azapi-resource-list/index.ts +0 -713
- package/src/lib/azure/.gen/providers/azapi/data-plane-resource/index.ts +0 -1203
- package/src/lib/azure/.gen/providers/azapi/index.ts +0 -11
- package/src/lib/azure/.gen/providers/azapi/lazy-index.ts +0 -51
- package/src/lib/azure/.gen/providers/azapi/provider/index.ts +0 -1121
- package/src/lib/azure/.gen/providers/azapi/resource/index.ts +0 -1516
- package/src/lib/azure/.gen/providers/azapi/resource-action/index.ts +0 -935
- package/src/lib/azure/.gen/providers/azapi/update-resource/index.ts +0 -1042
- package/src/lib/azure/.gen/versions.json +0 -3
|
@@ -3,7 +3,6 @@ import { AzurermProvider } from '@cdktf/provider-azurerm/lib/provider/index.js';
|
|
|
3
3
|
import { AzurermBackend, TerraformStack } from 'cdktf';
|
|
4
4
|
import { Provider } from 'cdktf-local-exec';
|
|
5
5
|
import { isDevStage, isPrdStage, isTestStage, isUatStage } from '../../common/index.js';
|
|
6
|
-
import { AzapiProvider } from '../.gen/providers/azapi/provider/index.js';
|
|
7
6
|
import { AzureApiManagementManager, AzureAppConfigurationManager, AzureAppServiceManager, AzureApplicationInsightsManager, AzureCosmosDbManager, AzureDnsManager, AzureEventgridManager, AzureFunctionManager, AzureKeyVaultManager, AzureLogAnalyticsWorkspaceManager, AzureMonitorManager, AzureRedisManager, AzureResourceGroupManager, AzureServicebusManager, AzureStorageManager, } from '../services/index.js';
|
|
8
7
|
import { AzureRemoteBackend } from './constants.js';
|
|
9
8
|
import { AzureResourceNameFormatter } from './resource-name-formatter.js';
|
|
@@ -50,7 +49,6 @@ export class CommonAzureConstruct extends TerraformStack {
|
|
|
50
49
|
this.determineFullyQualifiedDomain();
|
|
51
50
|
this.determineRemoteBackend();
|
|
52
51
|
this.determineTenantId();
|
|
53
|
-
new AzapiProvider(this, `${this.id}-azapi-provider`, this.props);
|
|
54
52
|
new AzurermProvider(this, `${this.id}-provider`, this.props);
|
|
55
53
|
new Provider(this, `${this.id}-local-exec-provider`);
|
|
56
54
|
}
|
|
@@ -4,7 +4,7 @@ import { ApiManagementCustomDomain } from '@cdktf/provider-azurerm/lib/api-manag
|
|
|
4
4
|
import { ApiManagementLoggerApplicationInsights } from '@cdktf/provider-azurerm/lib/api-management-logger/index.js';
|
|
5
5
|
import { ApiManagement } from '@cdktf/provider-azurerm/lib/api-management/index.js';
|
|
6
6
|
import { DataAzurermApiManagement, DataAzurermApiManagementConfig } from '@cdktf/provider-azurerm/lib/data-azurerm-api-management/index.js';
|
|
7
|
-
import {
|
|
7
|
+
import { ManagedRedis } from '@cdktf/provider-azurerm/lib/managed-redis/index.js';
|
|
8
8
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
9
9
|
import { ApiManagementApiProps, ApiManagementBackendProps, ApiManagementCustomDomainProps, ApiManagementProps } from './types.js';
|
|
10
10
|
/**
|
|
@@ -32,7 +32,7 @@ export declare class AzureApiManagementManager {
|
|
|
32
32
|
* @param props api management properties
|
|
33
33
|
* @see [CDKTF Api management Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/apiManagement.typescript.md}
|
|
34
34
|
*/
|
|
35
|
-
createApiManagement(id: string, scope: CommonAzureConstruct, props: ApiManagementProps, applicationInsightsKey?: ApiManagementLoggerApplicationInsights['instrumentationKey'], externalRedisCache?:
|
|
35
|
+
createApiManagement(id: string, scope: CommonAzureConstruct, props: ApiManagementProps, applicationInsightsKey?: ApiManagementLoggerApplicationInsights['instrumentationKey'], externalRedisCache?: ManagedRedis): ApiManagement;
|
|
36
36
|
/**
|
|
37
37
|
* @summary Method to resolve an api management
|
|
38
38
|
* @param id scoped id of the resource
|
|
@@ -67,7 +67,7 @@ export class AzureApiManagementManager {
|
|
|
67
67
|
new ApiManagementRedisCache(scope, `${id}-am-redis-cache`, {
|
|
68
68
|
name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.apiManagementRedisCache),
|
|
69
69
|
apiManagementId: apiManagement.id,
|
|
70
|
-
connectionString: externalRedisCache.
|
|
70
|
+
connectionString: `${externalRedisCache.name}:10000,password=${externalRedisCache.defaultDatabase.primaryAccessKey},ssl=True,abortConnect=False`,
|
|
71
71
|
cacheLocation: externalRedisCache.location,
|
|
72
72
|
redisCacheId: externalRedisCache.id,
|
|
73
73
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ManagedRedis } from '@cdktf/provider-azurerm/lib/managed-redis/index.js';
|
|
2
2
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
3
|
-
import {
|
|
3
|
+
import { ManagedRedisProps } from './types.js';
|
|
4
4
|
/**
|
|
5
5
|
* @classdesc Provides operations on Azure Redis
|
|
6
6
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
@@ -13,7 +13,7 @@ import { RedisCacheProps } from './types.js';
|
|
|
13
13
|
* constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
|
|
14
14
|
* super(parent, id, props)
|
|
15
15
|
* this.props = props
|
|
16
|
-
* this.redisManager.createRedis('
|
|
16
|
+
* this.redisManager.createRedis('MyManagedRedis', this, props)
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
@@ -24,7 +24,7 @@ export declare class AzureRedisManager {
|
|
|
24
24
|
* @param id scoped id of the resource
|
|
25
25
|
* @param scope scope in which this resource is defined
|
|
26
26
|
* @param props redis cache properties
|
|
27
|
-
* @see [CDKTF Redis Cache Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/
|
|
27
|
+
* @see [CDKTF Redis Cache Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/managedRedis.typescript.md}
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
createManagedRedis(id: string, scope: CommonAzureConstruct, props: ManagedRedisProps): ManagedRedis;
|
|
30
30
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataAzurermResourceGroup } from '@cdktf/provider-azurerm/lib/data-azurerm-resource-group/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { ManagedRedis } from '@cdktf/provider-azurerm/lib/managed-redis/index.js';
|
|
3
3
|
import { createAzureTfOutput } from '../../utils/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* @classdesc Provides operations on Azure Redis
|
|
@@ -13,7 +13,7 @@ import { createAzureTfOutput } from '../../utils/index.js';
|
|
|
13
13
|
* constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
|
|
14
14
|
* super(parent, id, props)
|
|
15
15
|
* this.props = props
|
|
16
|
-
* this.redisManager.createRedis('
|
|
16
|
+
* this.redisManager.createRedis('MyManagedRedis', this, props)
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
@@ -24,9 +24,9 @@ export class AzureRedisManager {
|
|
|
24
24
|
* @param id scoped id of the resource
|
|
25
25
|
* @param scope scope in which this resource is defined
|
|
26
26
|
* @param props redis cache properties
|
|
27
|
-
* @see [CDKTF Redis Cache Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/
|
|
27
|
+
* @see [CDKTF Redis Cache Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/managedRedis.typescript.md}
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
createManagedRedis(id, scope, props) {
|
|
30
30
|
if (!props)
|
|
31
31
|
throw `Props undefined for ${id}`;
|
|
32
32
|
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-rc-rg`, {
|
|
@@ -36,18 +36,18 @@ export class AzureRedisManager {
|
|
|
36
36
|
});
|
|
37
37
|
if (!resourceGroup)
|
|
38
38
|
throw `Resource group undefined for ${id}`;
|
|
39
|
-
const
|
|
39
|
+
const managedRedis = new ManagedRedis(scope, `${id}-rc`, {
|
|
40
40
|
...props,
|
|
41
|
-
name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.
|
|
41
|
+
name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.managedRedis),
|
|
42
42
|
location: resourceGroup.location,
|
|
43
43
|
resourceGroupName: resourceGroup.name,
|
|
44
44
|
tags: props.tags ?? {
|
|
45
45
|
environment: scope.props.stage,
|
|
46
46
|
},
|
|
47
47
|
});
|
|
48
|
-
createAzureTfOutput(`${id}-
|
|
49
|
-
createAzureTfOutput(`${id}-
|
|
50
|
-
createAzureTfOutput(`${id}-
|
|
51
|
-
return
|
|
48
|
+
createAzureTfOutput(`${id}-managedRedisName`, scope, managedRedis.name);
|
|
49
|
+
createAzureTfOutput(`${id}-managedRedisFriendlyUniqueId`, scope, managedRedis.friendlyUniqueId);
|
|
50
|
+
createAzureTfOutput(`${id}-managedRedisId`, scope, managedRedis.id);
|
|
51
|
+
return managedRedis;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { ManagedRedisConfig } from '@cdktf/provider-azurerm/lib/managed-redis/index.js';
|
|
2
|
+
export interface ManagedRedisProps extends ManagedRedisConfig {
|
|
3
3
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,6 @@ import { AzurermBackend, TerraformStack } from 'cdktf'
|
|
|
4
4
|
import { Provider } from 'cdktf-local-exec'
|
|
5
5
|
import { Construct } from 'constructs'
|
|
6
6
|
import { isDevStage, isPrdStage, isTestStage, isUatStage } from '../../common/index.js'
|
|
7
|
-
import { AzapiProvider } from '../.gen/providers/azapi/provider/index.js'
|
|
8
7
|
import {
|
|
9
8
|
AzureApiManagementManager,
|
|
10
9
|
AzureAppConfigurationManager,
|
|
@@ -74,7 +73,6 @@ export class CommonAzureConstruct extends TerraformStack {
|
|
|
74
73
|
this.determineRemoteBackend()
|
|
75
74
|
this.determineTenantId()
|
|
76
75
|
|
|
77
|
-
new AzapiProvider(this, `${this.id}-azapi-provider`, this.props)
|
|
78
76
|
new AzurermProvider(this, `${this.id}-provider`, this.props)
|
|
79
77
|
new Provider(this, `${this.id}-local-exec-provider`)
|
|
80
78
|
}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
DataAzurermApiManagementConfig,
|
|
15
15
|
} from '@cdktf/provider-azurerm/lib/data-azurerm-api-management/index.js'
|
|
16
16
|
import { DataAzurermResourceGroup } from '@cdktf/provider-azurerm/lib/data-azurerm-resource-group/index.js'
|
|
17
|
-
import {
|
|
17
|
+
import { ManagedRedis } from '@cdktf/provider-azurerm/lib/managed-redis/index.js'
|
|
18
18
|
import _ from 'lodash'
|
|
19
19
|
import { CommonAzureConstruct } from '../../common/index.js'
|
|
20
20
|
import { createAzureTfOutput } from '../../utils/index.js'
|
|
@@ -55,7 +55,7 @@ export class AzureApiManagementManager {
|
|
|
55
55
|
scope: CommonAzureConstruct,
|
|
56
56
|
props: ApiManagementProps,
|
|
57
57
|
applicationInsightsKey?: ApiManagementLoggerApplicationInsights['instrumentationKey'],
|
|
58
|
-
externalRedisCache?:
|
|
58
|
+
externalRedisCache?: ManagedRedis
|
|
59
59
|
) {
|
|
60
60
|
if (!props) throw `Props undefined for ${id}`
|
|
61
61
|
|
|
@@ -91,7 +91,7 @@ export class AzureApiManagementManager {
|
|
|
91
91
|
new ApiManagementRedisCache(scope, `${id}-am-redis-cache`, {
|
|
92
92
|
name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.apiManagementRedisCache),
|
|
93
93
|
apiManagementId: apiManagement.id,
|
|
94
|
-
connectionString: externalRedisCache.
|
|
94
|
+
connectionString: `${externalRedisCache.name}:10000,password=${externalRedisCache.defaultDatabase.primaryAccessKey},ssl=True,abortConnect=False`,
|
|
95
95
|
cacheLocation: externalRedisCache.location,
|
|
96
96
|
redisCacheId: externalRedisCache.id,
|
|
97
97
|
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DataAzurermResourceGroup } from '@cdktf/provider-azurerm/lib/data-azurerm-resource-group/index.js'
|
|
2
|
-
import {
|
|
2
|
+
import { ManagedRedis } from '@cdktf/provider-azurerm/lib/managed-redis/index.js'
|
|
3
3
|
import { CommonAzureConstruct } from '../../common/index.js'
|
|
4
4
|
import { createAzureTfOutput } from '../../utils/index.js'
|
|
5
|
-
import {
|
|
5
|
+
import { ManagedRedisProps } from './types.js'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @classdesc Provides operations on Azure Redis
|
|
@@ -16,7 +16,7 @@ import { RedisCacheProps } from './types.js'
|
|
|
16
16
|
* constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
|
|
17
17
|
* super(parent, id, props)
|
|
18
18
|
* this.props = props
|
|
19
|
-
* this.redisManager.createRedis('
|
|
19
|
+
* this.redisManager.createRedis('MyManagedRedis', this, props)
|
|
20
20
|
* }
|
|
21
21
|
* }
|
|
22
22
|
* ```
|
|
@@ -27,9 +27,9 @@ export class AzureRedisManager {
|
|
|
27
27
|
* @param id scoped id of the resource
|
|
28
28
|
* @param scope scope in which this resource is defined
|
|
29
29
|
* @param props redis cache properties
|
|
30
|
-
* @see [CDKTF Redis Cache Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/
|
|
30
|
+
* @see [CDKTF Redis Cache Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/managedRedis.typescript.md}
|
|
31
31
|
*/
|
|
32
|
-
public
|
|
32
|
+
public createManagedRedis(id: string, scope: CommonAzureConstruct, props: ManagedRedisProps) {
|
|
33
33
|
if (!props) throw `Props undefined for ${id}`
|
|
34
34
|
|
|
35
35
|
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-rc-rg`, {
|
|
@@ -40,9 +40,9 @@ export class AzureRedisManager {
|
|
|
40
40
|
|
|
41
41
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
42
42
|
|
|
43
|
-
const
|
|
43
|
+
const managedRedis = new ManagedRedis(scope, `${id}-rc`, {
|
|
44
44
|
...props,
|
|
45
|
-
name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.
|
|
45
|
+
name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.managedRedis),
|
|
46
46
|
location: resourceGroup.location,
|
|
47
47
|
resourceGroupName: resourceGroup.name,
|
|
48
48
|
tags: props.tags ?? {
|
|
@@ -50,10 +50,10 @@ export class AzureRedisManager {
|
|
|
50
50
|
},
|
|
51
51
|
})
|
|
52
52
|
|
|
53
|
-
createAzureTfOutput(`${id}-
|
|
54
|
-
createAzureTfOutput(`${id}-
|
|
55
|
-
createAzureTfOutput(`${id}-
|
|
53
|
+
createAzureTfOutput(`${id}-managedRedisName`, scope, managedRedis.name)
|
|
54
|
+
createAzureTfOutput(`${id}-managedRedisFriendlyUniqueId`, scope, managedRedis.friendlyUniqueId)
|
|
55
|
+
createAzureTfOutput(`${id}-managedRedisId`, scope, managedRedis.id)
|
|
56
56
|
|
|
57
|
-
return
|
|
57
|
+
return managedRedis
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ManagedRedisConfig } from '@cdktf/provider-azurerm/lib/managed-redis/index.js'
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface ManagedRedisProps extends ManagedRedisConfig {}
|