@gradientedge/cdk-utils 9.41.1 → 9.41.2
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/services/api-management/main.js +2 -2
- package/dist/src/lib/azure/services/app-configuration/main.js +5 -3
- package/dist/src/lib/azure/services/app-service/main.js +5 -3
- package/dist/src/lib/azure/services/application-insights/main.js +5 -3
- package/dist/src/lib/azure/services/cosmosdb/main.js +6 -2
- package/dist/src/lib/azure/services/dns/main.js +4 -2
- package/dist/src/lib/azure/services/eventgrid/main.js +6 -2
- package/dist/src/lib/azure/services/function/main.js +6 -2
- package/dist/src/lib/azure/services/key-vault/main.js +3 -1
- package/dist/src/lib/azure/services/log-analytics-workspace/main.js +3 -1
- package/dist/src/lib/azure/services/resource-group/main.js +1 -1
- package/dist/src/lib/azure/services/servicebus/main.js +3 -1
- package/dist/src/lib/azure/services/storage/main.js +1 -1
- package/package.json +1 -1
- package/src/lib/azure/services/api-management/main.ts +2 -8
- package/src/lib/azure/services/app-configuration/main.ts +5 -6
- package/src/lib/azure/services/app-service/main.ts +5 -6
- package/src/lib/azure/services/application-insights/main.ts +5 -6
- package/src/lib/azure/services/cosmosdb/main.ts +6 -8
- package/src/lib/azure/services/dns/main.ts +4 -5
- package/src/lib/azure/services/eventgrid/main.ts +6 -8
- package/src/lib/azure/services/function/main.ts +6 -8
- package/src/lib/azure/services/key-vault/main.ts +3 -4
- package/src/lib/azure/services/log-analytics-workspace/main.ts +3 -4
- package/src/lib/azure/services/resource-group/main.ts +1 -1
- package/src/lib/azure/services/servicebus/main.ts +3 -4
- package/src/lib/azure/services/storage/main.ts +1 -1
|
@@ -43,7 +43,7 @@ class AzureApiManagementManager {
|
|
|
43
43
|
if (!props)
|
|
44
44
|
throw `Props undefined for ${id}`;
|
|
45
45
|
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-am-rg`, {
|
|
46
|
-
name: scope.
|
|
46
|
+
name: scope.props.resourceGroupName || props.resourceGroupName,
|
|
47
47
|
});
|
|
48
48
|
if (!resourceGroup)
|
|
49
49
|
throw `Resource group undefined for ${id}`;
|
|
@@ -81,7 +81,7 @@ class AzureApiManagementManager {
|
|
|
81
81
|
if (!props)
|
|
82
82
|
throw `Props undefined for ${id}`;
|
|
83
83
|
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-am-rg`, {
|
|
84
|
-
name: scope.
|
|
84
|
+
name: scope.props.resourceGroupName || props.resourceGroupName,
|
|
85
85
|
});
|
|
86
86
|
if (!resourceGroup)
|
|
87
87
|
throw `Resource group undefined for ${id}`;
|
|
@@ -32,12 +32,14 @@ class AzureAppConfigurationManager {
|
|
|
32
32
|
createAppConfiguration(id, scope, props) {
|
|
33
33
|
if (!props)
|
|
34
34
|
throw `Props undefined for ${id}`;
|
|
35
|
-
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-
|
|
36
|
-
name: scope.
|
|
35
|
+
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-ac-rg`, {
|
|
36
|
+
name: scope.props.resourceGroupName
|
|
37
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
38
|
+
: `${props.resourceGroupName}`,
|
|
37
39
|
});
|
|
38
40
|
if (!resourceGroup)
|
|
39
41
|
throw `Resource group undefined for ${id}`;
|
|
40
|
-
const appConfiguration = new app_configuration_1.AppConfiguration(scope, `${id}-
|
|
42
|
+
const appConfiguration = new app_configuration_1.AppConfiguration(scope, `${id}-ac`, {
|
|
41
43
|
...props,
|
|
42
44
|
name: `${props.name}-${scope.props.stage}`,
|
|
43
45
|
resourceGroupName: resourceGroup.name,
|
|
@@ -32,12 +32,14 @@ class AzureAppServiceManager {
|
|
|
32
32
|
createAppServicePlan(id, scope, props) {
|
|
33
33
|
if (!props)
|
|
34
34
|
throw `Props undefined for ${id}`;
|
|
35
|
-
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-
|
|
36
|
-
name: scope.
|
|
35
|
+
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-as-rg`, {
|
|
36
|
+
name: scope.props.resourceGroupName
|
|
37
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
38
|
+
: `${props.resourceGroupName}`,
|
|
37
39
|
});
|
|
38
40
|
if (!resourceGroup)
|
|
39
41
|
throw `Resource group undefined for ${id}`;
|
|
40
|
-
const appServicePlan = new service_plan_1.ServicePlan(scope, `${id}-
|
|
42
|
+
const appServicePlan = new service_plan_1.ServicePlan(scope, `${id}-as`, {
|
|
41
43
|
...props,
|
|
42
44
|
name: scope.resourceNameFormatter.format(props.name),
|
|
43
45
|
resourceGroupName: resourceGroup.name,
|
|
@@ -32,12 +32,14 @@ class AzureApplicationInsightsManager {
|
|
|
32
32
|
createApplicationInsights(id, scope, props) {
|
|
33
33
|
if (!props)
|
|
34
34
|
throw `Props undefined for ${id}`;
|
|
35
|
-
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-
|
|
36
|
-
name: scope.
|
|
35
|
+
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-ai-rg`, {
|
|
36
|
+
name: scope.props.resourceGroupName
|
|
37
|
+
? `${scope.props.resourceGroupName}-${scope.props.stage}`
|
|
38
|
+
: `${props.resourceGroupName}`,
|
|
37
39
|
});
|
|
38
40
|
if (!resourceGroup)
|
|
39
41
|
throw `Resource group undefined for ${id}`;
|
|
40
|
-
const applicationInsights = new application_insights_1.ApplicationInsights(scope, `${id}-
|
|
42
|
+
const applicationInsights = new application_insights_1.ApplicationInsights(scope, `${id}-ai`, {
|
|
41
43
|
...props,
|
|
42
44
|
name: `${props.name}-${scope.props.stage}` || '',
|
|
43
45
|
resourceGroupName: resourceGroup.name,
|
|
@@ -35,7 +35,9 @@ class AzureCosmosDbManager {
|
|
|
35
35
|
if (!props)
|
|
36
36
|
throw `Props undefined for ${id}`;
|
|
37
37
|
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-ca-rg`, {
|
|
38
|
-
name: scope.
|
|
38
|
+
name: scope.props.resourceGroupName
|
|
39
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
40
|
+
: `${props.resourceGroupName}`,
|
|
39
41
|
});
|
|
40
42
|
if (!resourceGroup)
|
|
41
43
|
throw `Resource group undefined for ${id}`;
|
|
@@ -64,7 +66,9 @@ class AzureCosmosDbManager {
|
|
|
64
66
|
if (!props)
|
|
65
67
|
throw `Props undefined for ${id}`;
|
|
66
68
|
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-cd-rg`, {
|
|
67
|
-
name: scope.
|
|
69
|
+
name: scope.props.resourceGroupName
|
|
70
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
71
|
+
: `${props.resourceGroupName}`,
|
|
68
72
|
});
|
|
69
73
|
if (!resourceGroup)
|
|
70
74
|
throw `Resource group undefined for ${id}`;
|
|
@@ -35,8 +35,10 @@ class AzureDnsManager {
|
|
|
35
35
|
createDnsZone(id, scope, props) {
|
|
36
36
|
if (!props)
|
|
37
37
|
throw `Props undefined for ${id}`;
|
|
38
|
-
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-
|
|
39
|
-
name: scope.
|
|
38
|
+
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-dz-rg`, {
|
|
39
|
+
name: scope.props.resourceGroupName
|
|
40
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
41
|
+
: `${props.resourceGroupName}`,
|
|
40
42
|
});
|
|
41
43
|
if (!resourceGroup)
|
|
42
44
|
throw `Resource group undefined for ${id}`;
|
|
@@ -35,7 +35,9 @@ class AzureEventgridManager {
|
|
|
35
35
|
if (!props)
|
|
36
36
|
throw `Props undefined for ${id}`;
|
|
37
37
|
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-et-rg`, {
|
|
38
|
-
name: scope.
|
|
38
|
+
name: scope.props.resourceGroupName
|
|
39
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
40
|
+
: `${props.resourceGroupName}`,
|
|
39
41
|
});
|
|
40
42
|
if (!resourceGroup)
|
|
41
43
|
throw `Resource group undefined for ${id}`;
|
|
@@ -65,7 +67,9 @@ class AzureEventgridManager {
|
|
|
65
67
|
if (!props)
|
|
66
68
|
throw `Props undefined for ${id}`;
|
|
67
69
|
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-et-rg`, {
|
|
68
|
-
name: scope.
|
|
70
|
+
name: scope.props.resourceGroupName
|
|
71
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
72
|
+
: `${props.resourceGroupName}`,
|
|
69
73
|
});
|
|
70
74
|
if (!resourceGroup)
|
|
71
75
|
throw `Resource group undefined for ${id}`;
|
|
@@ -36,7 +36,9 @@ class AzureFunctionManager {
|
|
|
36
36
|
if (!props)
|
|
37
37
|
throw `Props undefined for ${id}`;
|
|
38
38
|
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-fa-rg`, {
|
|
39
|
-
name: scope.
|
|
39
|
+
name: scope.props.resourceGroupName
|
|
40
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
41
|
+
: `${props.resourceGroupName}`,
|
|
40
42
|
});
|
|
41
43
|
if (!resourceGroup)
|
|
42
44
|
throw `Resource group undefined for ${id}`;
|
|
@@ -83,7 +85,9 @@ class AzureFunctionManager {
|
|
|
83
85
|
if (!props)
|
|
84
86
|
throw `Props undefined for ${id}`;
|
|
85
87
|
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-fa-rg`, {
|
|
86
|
-
name: scope.
|
|
88
|
+
name: scope.props.resourceGroupName
|
|
89
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
90
|
+
: `${props.resourceGroupName}`,
|
|
87
91
|
});
|
|
88
92
|
if (!resourceGroup)
|
|
89
93
|
throw `Resource group undefined for ${id}`;
|
|
@@ -33,7 +33,9 @@ class AzureKeyVaultManager {
|
|
|
33
33
|
if (!props)
|
|
34
34
|
throw `Props undefined for ${id}`;
|
|
35
35
|
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-kv-rg`, {
|
|
36
|
-
name: scope.
|
|
36
|
+
name: scope.props.resourceGroupName
|
|
37
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
38
|
+
: `${props.resourceGroupName}`,
|
|
37
39
|
});
|
|
38
40
|
if (!resourceGroup)
|
|
39
41
|
throw `Resource group undefined for ${id}`;
|
|
@@ -33,7 +33,9 @@ class AzureLogAnalyticsWorkspaceManager {
|
|
|
33
33
|
if (!props)
|
|
34
34
|
throw `Props undefined for ${id}`;
|
|
35
35
|
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-lw-rg`, {
|
|
36
|
-
name: scope.
|
|
36
|
+
name: scope.props.resourceGroupName
|
|
37
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
38
|
+
: `${props.resourceGroupName}`,
|
|
37
39
|
});
|
|
38
40
|
if (!resourceGroup)
|
|
39
41
|
throw `Resource group undefined for ${id}`;
|
|
@@ -33,7 +33,7 @@ class AzureResourceGroupManager {
|
|
|
33
33
|
throw `Props undefined for ${id}`;
|
|
34
34
|
const resourceGroup = new resource_group_1.ResourceGroup(scope, `${id}-rg`, {
|
|
35
35
|
...props,
|
|
36
|
-
name: props.name,
|
|
36
|
+
name: scope.resourceNameFormatter.format(props.name),
|
|
37
37
|
location: props.location,
|
|
38
38
|
tags: props.tags ?? {
|
|
39
39
|
environment: scope.props.stage,
|
|
@@ -36,7 +36,9 @@ class AzureServicebusManager {
|
|
|
36
36
|
if (!props)
|
|
37
37
|
throw `Props undefined for ${id}`;
|
|
38
38
|
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-sn-rg`, {
|
|
39
|
-
name: scope.
|
|
39
|
+
name: scope.props.resourceGroupName
|
|
40
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
41
|
+
: `${props.resourceGroupName}`,
|
|
40
42
|
});
|
|
41
43
|
if (!resourceGroup)
|
|
42
44
|
throw `Resource group undefined for ${id}`;
|
|
@@ -36,7 +36,7 @@ class AzureStorageManager {
|
|
|
36
36
|
createStorageAccount(id, scope, props) {
|
|
37
37
|
if (!props)
|
|
38
38
|
throw `Props undefined for ${id}`;
|
|
39
|
-
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-
|
|
39
|
+
const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-sa-rg`, {
|
|
40
40
|
name: scope.resourceNameFormatter.format(scope.props.resourceGroupName || props.resourceGroupName, scope.props.resourceNameOptions?.resourceGroup),
|
|
41
41
|
});
|
|
42
42
|
if (!resourceGroup)
|
package/package.json
CHANGED
|
@@ -51,10 +51,7 @@ export class AzureApiManagementManager {
|
|
|
51
51
|
if (!props) throw `Props undefined for ${id}`
|
|
52
52
|
|
|
53
53
|
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-am-rg`, {
|
|
54
|
-
name: scope.
|
|
55
|
-
scope.props.resourceGroupName || props.resourceGroupName,
|
|
56
|
-
scope.props.resourceNameOptions?.resourceGroup
|
|
57
|
-
),
|
|
54
|
+
name: scope.props.resourceGroupName || props.resourceGroupName,
|
|
58
55
|
})
|
|
59
56
|
|
|
60
57
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
@@ -97,10 +94,7 @@ export class AzureApiManagementManager {
|
|
|
97
94
|
if (!props) throw `Props undefined for ${id}`
|
|
98
95
|
|
|
99
96
|
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-am-rg`, {
|
|
100
|
-
name: scope.
|
|
101
|
-
scope.props.resourceGroupName || props.resourceGroupName,
|
|
102
|
-
scope.props.resourceNameOptions?.resourceGroup
|
|
103
|
-
),
|
|
97
|
+
name: scope.props.resourceGroupName || props.resourceGroupName,
|
|
104
98
|
})
|
|
105
99
|
|
|
106
100
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
@@ -32,16 +32,15 @@ export class AzureAppConfigurationManager {
|
|
|
32
32
|
public createAppConfiguration(id: string, scope: CommonAzureConstruct, props: AppConfigurationProps) {
|
|
33
33
|
if (!props) throw `Props undefined for ${id}`
|
|
34
34
|
|
|
35
|
-
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-
|
|
36
|
-
name: scope.
|
|
37
|
-
scope.
|
|
38
|
-
|
|
39
|
-
),
|
|
35
|
+
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-ac-rg`, {
|
|
36
|
+
name: scope.props.resourceGroupName
|
|
37
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
38
|
+
: `${props.resourceGroupName}`,
|
|
40
39
|
})
|
|
41
40
|
|
|
42
41
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
43
42
|
|
|
44
|
-
const appConfiguration = new AppConfiguration(scope, `${id}-
|
|
43
|
+
const appConfiguration = new AppConfiguration(scope, `${id}-ac`, {
|
|
45
44
|
...props,
|
|
46
45
|
name: `${props.name}-${scope.props.stage}`,
|
|
47
46
|
resourceGroupName: resourceGroup.name,
|
|
@@ -32,16 +32,15 @@ export class AzureAppServiceManager {
|
|
|
32
32
|
public createAppServicePlan(id: string, scope: CommonAzureConstruct, props: ServicePlanProps) {
|
|
33
33
|
if (!props) throw `Props undefined for ${id}`
|
|
34
34
|
|
|
35
|
-
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-
|
|
36
|
-
name: scope.
|
|
37
|
-
scope.
|
|
38
|
-
|
|
39
|
-
),
|
|
35
|
+
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-as-rg`, {
|
|
36
|
+
name: scope.props.resourceGroupName
|
|
37
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
38
|
+
: `${props.resourceGroupName}`,
|
|
40
39
|
})
|
|
41
40
|
|
|
42
41
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
43
42
|
|
|
44
|
-
const appServicePlan = new ServicePlan(scope, `${id}-
|
|
43
|
+
const appServicePlan = new ServicePlan(scope, `${id}-as`, {
|
|
45
44
|
...props,
|
|
46
45
|
name: scope.resourceNameFormatter.format(props.name),
|
|
47
46
|
resourceGroupName: resourceGroup.name,
|
|
@@ -32,16 +32,15 @@ export class AzureApplicationInsightsManager {
|
|
|
32
32
|
public createApplicationInsights(id: string, scope: CommonAzureConstruct, props: ApplicationInsightsProps) {
|
|
33
33
|
if (!props) throw `Props undefined for ${id}`
|
|
34
34
|
|
|
35
|
-
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-
|
|
36
|
-
name: scope.
|
|
37
|
-
scope.props.resourceGroupName
|
|
38
|
-
|
|
39
|
-
),
|
|
35
|
+
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-ai-rg`, {
|
|
36
|
+
name: scope.props.resourceGroupName
|
|
37
|
+
? `${scope.props.resourceGroupName}-${scope.props.stage}`
|
|
38
|
+
: `${props.resourceGroupName}`,
|
|
40
39
|
})
|
|
41
40
|
|
|
42
41
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
43
42
|
|
|
44
|
-
const applicationInsights = new ApplicationInsights(scope, `${id}-
|
|
43
|
+
const applicationInsights = new ApplicationInsights(scope, `${id}-ai`, {
|
|
45
44
|
...props,
|
|
46
45
|
name: `${props.name}-${scope.props.stage}` || '',
|
|
47
46
|
resourceGroupName: resourceGroup.name,
|
|
@@ -35,10 +35,9 @@ export class AzureCosmosDbManager {
|
|
|
35
35
|
if (!props) throw `Props undefined for ${id}`
|
|
36
36
|
|
|
37
37
|
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-ca-rg`, {
|
|
38
|
-
name: scope.
|
|
39
|
-
scope.
|
|
40
|
-
|
|
41
|
-
),
|
|
38
|
+
name: scope.props.resourceGroupName
|
|
39
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
40
|
+
: `${props.resourceGroupName}`,
|
|
42
41
|
})
|
|
43
42
|
|
|
44
43
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
@@ -71,10 +70,9 @@ export class AzureCosmosDbManager {
|
|
|
71
70
|
if (!props) throw `Props undefined for ${id}`
|
|
72
71
|
|
|
73
72
|
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-cd-rg`, {
|
|
74
|
-
name: scope.
|
|
75
|
-
scope.
|
|
76
|
-
|
|
77
|
-
),
|
|
73
|
+
name: scope.props.resourceGroupName
|
|
74
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
75
|
+
: `${props.resourceGroupName}`,
|
|
78
76
|
})
|
|
79
77
|
|
|
80
78
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
@@ -35,11 +35,10 @@ export class AzureDnsManager {
|
|
|
35
35
|
public createDnsZone(id: string, scope: CommonAzureConstruct, props: DnsZoneProps) {
|
|
36
36
|
if (!props) throw `Props undefined for ${id}`
|
|
37
37
|
|
|
38
|
-
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-
|
|
39
|
-
name: scope.
|
|
40
|
-
scope.
|
|
41
|
-
|
|
42
|
-
),
|
|
38
|
+
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-dz-rg`, {
|
|
39
|
+
name: scope.props.resourceGroupName
|
|
40
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
41
|
+
: `${props.resourceGroupName}`,
|
|
43
42
|
})
|
|
44
43
|
|
|
45
44
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
@@ -38,10 +38,9 @@ export class AzureEventgridManager {
|
|
|
38
38
|
if (!props) throw `Props undefined for ${id}`
|
|
39
39
|
|
|
40
40
|
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-et-rg`, {
|
|
41
|
-
name: scope.
|
|
42
|
-
scope.
|
|
43
|
-
|
|
44
|
-
),
|
|
41
|
+
name: scope.props.resourceGroupName
|
|
42
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
43
|
+
: `${props.resourceGroupName}`,
|
|
45
44
|
})
|
|
46
45
|
|
|
47
46
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
@@ -75,10 +74,9 @@ export class AzureEventgridManager {
|
|
|
75
74
|
if (!props) throw `Props undefined for ${id}`
|
|
76
75
|
|
|
77
76
|
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-et-rg`, {
|
|
78
|
-
name: scope.
|
|
79
|
-
scope.
|
|
80
|
-
|
|
81
|
-
),
|
|
77
|
+
name: scope.props.resourceGroupName
|
|
78
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
79
|
+
: `${props.resourceGroupName}`,
|
|
82
80
|
})
|
|
83
81
|
|
|
84
82
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
@@ -36,10 +36,9 @@ export class AzureFunctionManager {
|
|
|
36
36
|
if (!props) throw `Props undefined for ${id}`
|
|
37
37
|
|
|
38
38
|
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-fa-rg`, {
|
|
39
|
-
name: scope.
|
|
40
|
-
scope.
|
|
41
|
-
|
|
42
|
-
),
|
|
39
|
+
name: scope.props.resourceGroupName
|
|
40
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
41
|
+
: `${props.resourceGroupName}`,
|
|
43
42
|
})
|
|
44
43
|
|
|
45
44
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
@@ -97,10 +96,9 @@ export class AzureFunctionManager {
|
|
|
97
96
|
if (!props) throw `Props undefined for ${id}`
|
|
98
97
|
|
|
99
98
|
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-fa-rg`, {
|
|
100
|
-
name: scope.
|
|
101
|
-
scope.
|
|
102
|
-
|
|
103
|
-
),
|
|
99
|
+
name: scope.props.resourceGroupName
|
|
100
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
101
|
+
: `${props.resourceGroupName}`,
|
|
104
102
|
})
|
|
105
103
|
|
|
106
104
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
@@ -33,10 +33,9 @@ export class AzureKeyVaultManager {
|
|
|
33
33
|
if (!props) throw `Props undefined for ${id}`
|
|
34
34
|
|
|
35
35
|
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-kv-rg`, {
|
|
36
|
-
name: scope.
|
|
37
|
-
scope.
|
|
38
|
-
|
|
39
|
-
),
|
|
36
|
+
name: scope.props.resourceGroupName
|
|
37
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
38
|
+
: `${props.resourceGroupName}`,
|
|
40
39
|
})
|
|
41
40
|
|
|
42
41
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
@@ -33,10 +33,9 @@ export class AzureLogAnalyticsWorkspaceManager {
|
|
|
33
33
|
if (!props) throw `Props undefined for ${id}`
|
|
34
34
|
|
|
35
35
|
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-lw-rg`, {
|
|
36
|
-
name: scope.
|
|
37
|
-
scope.
|
|
38
|
-
|
|
39
|
-
),
|
|
36
|
+
name: scope.props.resourceGroupName
|
|
37
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
38
|
+
: `${props.resourceGroupName}`,
|
|
40
39
|
})
|
|
41
40
|
|
|
42
41
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
@@ -33,7 +33,7 @@ export class AzureResourceGroupManager {
|
|
|
33
33
|
|
|
34
34
|
const resourceGroup = new ResourceGroup(scope, `${id}-rg`, {
|
|
35
35
|
...props,
|
|
36
|
-
name: props.name,
|
|
36
|
+
name: scope.resourceNameFormatter.format(props.name),
|
|
37
37
|
location: props.location,
|
|
38
38
|
tags: props.tags ?? {
|
|
39
39
|
environment: scope.props.stage,
|
|
@@ -41,10 +41,9 @@ export class AzureServicebusManager {
|
|
|
41
41
|
if (!props) throw `Props undefined for ${id}`
|
|
42
42
|
|
|
43
43
|
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-sn-rg`, {
|
|
44
|
-
name: scope.
|
|
45
|
-
scope.
|
|
46
|
-
|
|
47
|
-
),
|
|
44
|
+
name: scope.props.resourceGroupName
|
|
45
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
46
|
+
: `${props.resourceGroupName}`,
|
|
48
47
|
})
|
|
49
48
|
|
|
50
49
|
if (!resourceGroup) throw `Resource group undefined for ${id}`
|
|
@@ -36,7 +36,7 @@ export class AzureStorageManager {
|
|
|
36
36
|
public createStorageAccount(id: string, scope: CommonAzureConstruct, props: StorageAccountProps) {
|
|
37
37
|
if (!props) throw `Props undefined for ${id}`
|
|
38
38
|
|
|
39
|
-
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-
|
|
39
|
+
const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-sa-rg`, {
|
|
40
40
|
name: scope.resourceNameFormatter.format(
|
|
41
41
|
scope.props.resourceGroupName || props.resourceGroupName,
|
|
42
42
|
scope.props.resourceNameOptions?.resourceGroup
|