@gradientedge/cdk-utils 9.32.0 → 9.34.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 (45) hide show
  1. package/dist/src/lib/aws/common/stack.js +1 -1
  2. package/dist/src/lib/azure/common/construct.d.ts +5 -2
  3. package/dist/src/lib/azure/common/construct.js +8 -2
  4. package/dist/src/lib/azure/services/api-management/main.js +1 -1
  5. package/dist/src/lib/azure/services/app-configuration/index.d.ts +2 -0
  6. package/dist/src/lib/azure/services/app-configuration/index.js +18 -0
  7. package/dist/src/lib/azure/services/app-configuration/main.d.ts +30 -0
  8. package/dist/src/lib/azure/services/app-configuration/main.js +56 -0
  9. package/dist/src/lib/azure/services/app-configuration/types.d.ts +3 -0
  10. package/dist/src/lib/azure/services/app-configuration/types.js +2 -0
  11. package/dist/src/lib/azure/services/app-service/index.d.ts +2 -0
  12. package/dist/src/lib/azure/services/app-service/index.js +18 -0
  13. package/dist/src/lib/azure/services/app-service/main.d.ts +30 -0
  14. package/dist/src/lib/azure/services/app-service/main.js +56 -0
  15. package/dist/src/lib/azure/services/app-service/types.d.ts +3 -0
  16. package/dist/src/lib/azure/services/app-service/types.js +2 -0
  17. package/dist/src/lib/azure/services/application-insights/index.d.ts +2 -0
  18. package/dist/src/lib/azure/services/application-insights/index.js +18 -0
  19. package/dist/src/lib/azure/services/application-insights/main.d.ts +30 -0
  20. package/dist/src/lib/azure/services/application-insights/main.js +56 -0
  21. package/dist/src/lib/azure/services/application-insights/types.d.ts +3 -0
  22. package/dist/src/lib/azure/services/application-insights/types.js +2 -0
  23. package/dist/src/lib/azure/services/function/main.d.ts +2 -2
  24. package/dist/src/lib/azure/services/function/main.js +4 -15
  25. package/dist/src/lib/azure/services/function/types.d.ts +3 -5
  26. package/dist/src/lib/azure/services/index.d.ts +3 -0
  27. package/dist/src/lib/azure/services/index.js +3 -0
  28. package/dist/src/lib/azure/services/storage/main.js +4 -4
  29. package/package.json +1 -1
  30. package/src/lib/aws/common/stack.ts +1 -1
  31. package/src/lib/azure/common/construct.ts +11 -2
  32. package/src/lib/azure/services/api-management/main.ts +1 -1
  33. package/src/lib/azure/services/app-configuration/index.ts +2 -0
  34. package/src/lib/azure/services/app-configuration/main.ts +58 -0
  35. package/src/lib/azure/services/app-configuration/types.ts +3 -0
  36. package/src/lib/azure/services/app-service/index.ts +2 -0
  37. package/src/lib/azure/services/app-service/main.ts +58 -0
  38. package/src/lib/azure/services/app-service/types.ts +3 -0
  39. package/src/lib/azure/services/application-insights/index.ts +2 -0
  40. package/src/lib/azure/services/application-insights/main.ts +58 -0
  41. package/src/lib/azure/services/application-insights/types.ts +3 -0
  42. package/src/lib/azure/services/function/main.ts +4 -17
  43. package/src/lib/azure/services/function/types.ts +3 -5
  44. package/src/lib/azure/services/index.ts +3 -0
  45. package/src/lib/azure/services/storage/main.ts +4 -4
@@ -25,7 +25,7 @@ const common_1 = require("../../common");
25
25
  * }
26
26
  */
27
27
  class CommonStack extends aws_cdk_lib_1.Stack {
28
- static NODEJS_RUNTIME = aws_lambda_1.Runtime.NODEJS_18_X;
28
+ static NODEJS_RUNTIME = aws_lambda_1.Runtime.NODEJS_22_X;
29
29
  construct;
30
30
  props;
31
31
  constructor(parent, name, props) {
@@ -1,13 +1,16 @@
1
1
  import { TerraformStack } from 'cdktf';
2
2
  import { Construct } from 'constructs';
3
- import { AzureStorageManager, AzureKeyVaultManager, AzureApiManagementManager, AzureFunctionManager, AzureResourceGroupManager } from '../services';
3
+ import { AzureStorageManager, AzureKeyVaultManager, AzureApiManagementManager, AzureFunctionManager, AzureResourceGroupManager, AzureAppServiceManager, AzureApplicationInsightsManager, AzureAppConfigurationManager } from '../services';
4
4
  import { CommonAzureStackProps } from './types';
5
5
  export declare class CommonAzureConstruct extends TerraformStack {
6
6
  props: CommonAzureStackProps;
7
7
  id: string;
8
8
  fullyQualifiedDomainName: string;
9
9
  tenantId: string;
10
- apiManagementtManager: AzureApiManagementManager;
10
+ apiManagementManager: AzureApiManagementManager;
11
+ appServiceManager: AzureAppServiceManager;
12
+ applicationInsightsManager: AzureApplicationInsightsManager;
13
+ appConfigurationManager: AzureAppConfigurationManager;
11
14
  functiontManager: AzureFunctionManager;
12
15
  keyVaultManager: AzureKeyVaultManager;
13
16
  resourceGroupManager: AzureResourceGroupManager;
@@ -11,7 +11,10 @@ class CommonAzureConstruct extends cdktf_1.TerraformStack {
11
11
  id;
12
12
  fullyQualifiedDomainName;
13
13
  tenantId;
14
- apiManagementtManager;
14
+ apiManagementManager;
15
+ appServiceManager;
16
+ applicationInsightsManager;
17
+ appConfigurationManager;
15
18
  functiontManager;
16
19
  keyVaultManager;
17
20
  resourceGroupManager;
@@ -20,7 +23,10 @@ class CommonAzureConstruct extends cdktf_1.TerraformStack {
20
23
  super(scope, id);
21
24
  this.props = props;
22
25
  this.id = id;
23
- this.apiManagementtManager = new services_1.AzureApiManagementManager();
26
+ this.apiManagementManager = new services_1.AzureApiManagementManager();
27
+ this.appServiceManager = new services_1.AzureAppServiceManager();
28
+ this.applicationInsightsManager = new services_1.AzureApplicationInsightsManager();
29
+ this.appConfigurationManager = new services_1.AzureAppConfigurationManager();
24
30
  this.functiontManager = new services_1.AzureFunctionManager();
25
31
  this.keyVaultManager = new services_1.AzureKeyVaultManager();
26
32
  this.resourceGroupManager = new services_1.AzureResourceGroupManager();
@@ -35,7 +35,7 @@ class AzureApiManagementManager {
35
35
  const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-am-rg`, {
36
36
  name: scope.props.resourceGroupName
37
37
  ? `${scope.props.resourceGroupName}-${scope.props.stage}`
38
- : `${props.resourceGroupName}-${scope.props.stage}`,
38
+ : `${props.resourceGroupName}`,
39
39
  });
40
40
  if (!resourceGroup)
41
41
  throw `Resource group undefined for ${id}`;
@@ -0,0 +1,2 @@
1
+ export * from './main';
2
+ export * from './types';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./main"), exports);
18
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,30 @@
1
+ import { AppConfiguration } from '@cdktf/provider-azurerm/lib/app-configuration';
2
+ import { CommonAzureConstruct } from '../../common';
3
+ import { AppConfigurationProps } from './types';
4
+ /**
5
+ * @classdesc Provides operations on Azure App Configuration
6
+ * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
7
+ * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
8
+ * @example
9
+ * ```
10
+ * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
11
+ *
12
+ * class CustomConstruct extends CommonAzureConstruct {
13
+ * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
14
+ * super(parent, id, props)
15
+ * this.props = props
16
+ * this.appConfigurationManager.createAppConfiguration('MyAppConfiguration', this, props)
17
+ * }
18
+ * }
19
+ * ```
20
+ */
21
+ export declare class AzureAppConfigurationManager {
22
+ /**
23
+ * @summary Method to create a new app configuration
24
+ * @param id scoped id of the resource
25
+ * @param scope scope in which this resource is defined
26
+ * @param props app configuration properties
27
+ * @see [CDKTF App Configuration plan Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/appConfiguration.typescript.md}
28
+ */
29
+ createAppConfiguration(id: string, scope: CommonAzureConstruct, props: AppConfigurationProps): AppConfiguration;
30
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AzureAppConfigurationManager = void 0;
4
+ const data_azurerm_resource_group_1 = require("@cdktf/provider-azurerm/lib/data-azurerm-resource-group");
5
+ const app_configuration_1 = require("@cdktf/provider-azurerm/lib/app-configuration");
6
+ const utils_1 = require("../../utils");
7
+ /**
8
+ * @classdesc Provides operations on Azure App Configuration
9
+ * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
10
+ * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
11
+ * @example
12
+ * ```
13
+ * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
14
+ *
15
+ * class CustomConstruct extends CommonAzureConstruct {
16
+ * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
17
+ * super(parent, id, props)
18
+ * this.props = props
19
+ * this.appConfigurationManager.createAppConfiguration('MyAppConfiguration', this, props)
20
+ * }
21
+ * }
22
+ * ```
23
+ */
24
+ class AzureAppConfigurationManager {
25
+ /**
26
+ * @summary Method to create a new app configuration
27
+ * @param id scoped id of the resource
28
+ * @param scope scope in which this resource is defined
29
+ * @param props app configuration properties
30
+ * @see [CDKTF App Configuration plan Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/appConfiguration.typescript.md}
31
+ */
32
+ createAppConfiguration(id, scope, props) {
33
+ if (!props)
34
+ throw `Props undefined for ${id}`;
35
+ const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-am-rg`, {
36
+ name: scope.props.resourceGroupName
37
+ ? `${scope.props.resourceGroupName}-${scope.props.stage}`
38
+ : `${props.resourceGroupName}`,
39
+ });
40
+ if (!resourceGroup)
41
+ throw `Resource group undefined for ${id}`;
42
+ const appConfiguration = new app_configuration_1.AppConfiguration(scope, `${id}-am`, {
43
+ ...props,
44
+ name: `${props.name}-${scope.props.stage}`,
45
+ resourceGroupName: resourceGroup.name,
46
+ tags: props.tags ?? {
47
+ environment: scope.props.stage,
48
+ },
49
+ });
50
+ (0, utils_1.createAzureTfOutput)(`${id}-appConfigurationName`, scope, appConfiguration.name);
51
+ (0, utils_1.createAzureTfOutput)(`${id}-appConfigurationFriendlyUniqueId`, scope, appConfiguration.friendlyUniqueId);
52
+ (0, utils_1.createAzureTfOutput)(`${id}-appConfigurationId`, scope, appConfiguration.id);
53
+ return appConfiguration;
54
+ }
55
+ }
56
+ exports.AzureAppConfigurationManager = AzureAppConfigurationManager;
@@ -0,0 +1,3 @@
1
+ import { AppConfigurationConfig } from '@cdktf/provider-azurerm/lib/app-configuration';
2
+ export interface AppConfigurationProps extends AppConfigurationConfig {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from './main';
2
+ export * from './types';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./main"), exports);
18
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,30 @@
1
+ import { ServicePlan } from '@cdktf/provider-azurerm/lib/service-plan';
2
+ import { CommonAzureConstruct } from '../../common';
3
+ import { ServicePlanProps } from './types';
4
+ /**
5
+ * @classdesc Provides operations on Azure App Service
6
+ * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
7
+ * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
8
+ * @example
9
+ * ```
10
+ * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
11
+ *
12
+ * class CustomConstruct extends CommonAzureConstruct {
13
+ * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
14
+ * super(parent, id, props)
15
+ * this.props = props
16
+ * this.appServiceManager.createAppService('MyAppService', this, props)
17
+ * }
18
+ * }
19
+ * ```
20
+ */
21
+ export declare class AzureAppServiceManager {
22
+ /**
23
+ * @summary Method to create a new app service plan
24
+ * @param id scoped id of the resource
25
+ * @param scope scope in which this resource is defined
26
+ * @param props app service plan properties
27
+ * @see [CDKTF App service plan Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/appServicePlan.typescript.md}
28
+ */
29
+ createAppServicePlan(id: string, scope: CommonAzureConstruct, props: ServicePlanProps): ServicePlan;
30
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AzureAppServiceManager = void 0;
4
+ const data_azurerm_resource_group_1 = require("@cdktf/provider-azurerm/lib/data-azurerm-resource-group");
5
+ const service_plan_1 = require("@cdktf/provider-azurerm/lib/service-plan");
6
+ const utils_1 = require("../../utils");
7
+ /**
8
+ * @classdesc Provides operations on Azure App Service
9
+ * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
10
+ * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
11
+ * @example
12
+ * ```
13
+ * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
14
+ *
15
+ * class CustomConstruct extends CommonAzureConstruct {
16
+ * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
17
+ * super(parent, id, props)
18
+ * this.props = props
19
+ * this.appServiceManager.createAppService('MyAppService', this, props)
20
+ * }
21
+ * }
22
+ * ```
23
+ */
24
+ class AzureAppServiceManager {
25
+ /**
26
+ * @summary Method to create a new app service plan
27
+ * @param id scoped id of the resource
28
+ * @param scope scope in which this resource is defined
29
+ * @param props app service plan properties
30
+ * @see [CDKTF App service plan Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/appServicePlan.typescript.md}
31
+ */
32
+ createAppServicePlan(id, scope, props) {
33
+ if (!props)
34
+ throw `Props undefined for ${id}`;
35
+ const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-am-rg`, {
36
+ name: scope.props.resourceGroupName
37
+ ? `${scope.props.resourceGroupName}-${scope.props.stage}`
38
+ : `${props.resourceGroupName}`,
39
+ });
40
+ if (!resourceGroup)
41
+ throw `Resource group undefined for ${id}`;
42
+ const appServicePlan = new service_plan_1.ServicePlan(scope, `${id}-am`, {
43
+ ...props,
44
+ name: `${props.name}-${scope.props.stage}`,
45
+ resourceGroupName: resourceGroup.name,
46
+ tags: props.tags ?? {
47
+ environment: scope.props.stage,
48
+ },
49
+ });
50
+ (0, utils_1.createAzureTfOutput)(`${id}-appServicePlanName`, scope, appServicePlan.name);
51
+ (0, utils_1.createAzureTfOutput)(`${id}-appServicePlanFriendlyUniqueId`, scope, appServicePlan.friendlyUniqueId);
52
+ (0, utils_1.createAzureTfOutput)(`${id}-appServicePlanId`, scope, appServicePlan.id);
53
+ return appServicePlan;
54
+ }
55
+ }
56
+ exports.AzureAppServiceManager = AzureAppServiceManager;
@@ -0,0 +1,3 @@
1
+ import { ServicePlanConfig } from '@cdktf/provider-azurerm/lib/service-plan';
2
+ export interface ServicePlanProps extends ServicePlanConfig {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from './main';
2
+ export * from './types';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./main"), exports);
18
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,30 @@
1
+ import { ApplicationInsights } from '@cdktf/provider-azurerm/lib/application-insights';
2
+ import { CommonAzureConstruct } from '../../common';
3
+ import { ApplicationInsightsProps } from './types';
4
+ /**
5
+ * @classdesc Provides operations on Azure Application Insights
6
+ * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
7
+ * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
8
+ * @example
9
+ * ```
10
+ * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
11
+ *
12
+ * class CustomConstruct extends CommonAzureConstruct {
13
+ * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
14
+ * super(parent, id, props)
15
+ * this.props = props
16
+ * this.applicationInsightseManager.createApplicationInsights('MyApplicationInsights', this, props)
17
+ * }
18
+ * }
19
+ * ```
20
+ */
21
+ export declare class AzureApplicationInsightsManager {
22
+ /**
23
+ * @summary Method to create a new application insights
24
+ * @param id scoped id of the resource
25
+ * @param scope scope in which this resource is defined
26
+ * @param props application insights properties
27
+ * @see [CDKTF Application insights Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/applicationInsights.typescript.md}
28
+ */
29
+ createApplicationInsights(id: string, scope: CommonAzureConstruct, props: ApplicationInsightsProps): ApplicationInsights;
30
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AzureApplicationInsightsManager = void 0;
4
+ const data_azurerm_resource_group_1 = require("@cdktf/provider-azurerm/lib/data-azurerm-resource-group");
5
+ const application_insights_1 = require("@cdktf/provider-azurerm/lib/application-insights");
6
+ const utils_1 = require("../../utils");
7
+ /**
8
+ * @classdesc Provides operations on Azure Application Insights
9
+ * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
10
+ * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
11
+ * @example
12
+ * ```
13
+ * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
14
+ *
15
+ * class CustomConstruct extends CommonAzureConstruct {
16
+ * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
17
+ * super(parent, id, props)
18
+ * this.props = props
19
+ * this.applicationInsightseManager.createApplicationInsights('MyApplicationInsights', this, props)
20
+ * }
21
+ * }
22
+ * ```
23
+ */
24
+ class AzureApplicationInsightsManager {
25
+ /**
26
+ * @summary Method to create a new application insights
27
+ * @param id scoped id of the resource
28
+ * @param scope scope in which this resource is defined
29
+ * @param props application insights properties
30
+ * @see [CDKTF Application insights Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/applicationInsights.typescript.md}
31
+ */
32
+ createApplicationInsights(id, scope, props) {
33
+ if (!props)
34
+ throw `Props undefined for ${id}`;
35
+ const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-am-rg`, {
36
+ name: scope.props.resourceGroupName
37
+ ? `${scope.props.resourceGroupName}-${scope.props.stage}`
38
+ : `${props.resourceGroupName}`,
39
+ });
40
+ if (!resourceGroup)
41
+ throw `Resource group undefined for ${id}`;
42
+ const applicationInsights = new application_insights_1.ApplicationInsights(scope, `${id}-am`, {
43
+ ...props,
44
+ name: `${props.name}-${scope.props.stage}`,
45
+ resourceGroupName: resourceGroup.name,
46
+ tags: props.tags ?? {
47
+ environment: scope.props.stage,
48
+ },
49
+ });
50
+ (0, utils_1.createAzureTfOutput)(`${id}-applicationInsightsName`, scope, applicationInsights.name);
51
+ (0, utils_1.createAzureTfOutput)(`${id}-applicationInsightsFriendlyUniqueId`, scope, applicationInsights.friendlyUniqueId);
52
+ (0, utils_1.createAzureTfOutput)(`${id}-applicationInsightsId`, scope, applicationInsights.id);
53
+ return applicationInsights;
54
+ }
55
+ }
56
+ exports.AzureApplicationInsightsManager = AzureApplicationInsightsManager;
@@ -0,0 +1,3 @@
1
+ import { ApplicationInsightsConfig } from '@cdktf/provider-azurerm/lib/application-insights';
2
+ export interface ApplicationInsightsProps extends ApplicationInsightsConfig {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- import { FunctionApp } from '@cdktf/provider-azurerm/lib/function-app';
1
+ import { LinuxFunctionApp } from '@cdktf/provider-azurerm/lib/linux-function-app';
2
2
  import { FunctionAppFunction } from '@cdktf/provider-azurerm/lib/function-app-function';
3
3
  import { CommonAzureConstruct } from '../../common';
4
4
  import { FunctionAppProps, FunctionProps } from './types';
@@ -27,7 +27,7 @@ export declare class AzureFunctionManager {
27
27
  * @param props function app properties
28
28
  * @see [CDKTF Function App Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/functionApp.typescript.md}
29
29
  */
30
- createFunctionApp(id: string, scope: CommonAzureConstruct, props: FunctionAppProps): FunctionApp;
30
+ createFunctionApp(id: string, scope: CommonAzureConstruct, props: FunctionAppProps): LinuxFunctionApp;
31
31
  /**
32
32
  * @summary Method to create a new function
33
33
  * @param id scoped id of the resource
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AzureFunctionManager = void 0;
4
4
  const data_azurerm_resource_group_1 = require("@cdktf/provider-azurerm/lib/data-azurerm-resource-group");
5
- const data_azurerm_function_app_1 = require("@cdktf/provider-azurerm/lib/data-azurerm-function-app");
6
- const function_app_1 = require("@cdktf/provider-azurerm/lib/function-app");
5
+ const linux_function_app_1 = require("@cdktf/provider-azurerm/lib/linux-function-app");
7
6
  const function_app_function_1 = require("@cdktf/provider-azurerm/lib/function-app-function");
8
7
  const utils_1 = require("../../utils");
9
8
  /**
@@ -37,11 +36,11 @@ class AzureFunctionManager {
37
36
  const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-fa-rg`, {
38
37
  name: scope.props.resourceGroupName
39
38
  ? `${scope.props.resourceGroupName}-${scope.props.stage}`
40
- : `${props.resourceGroupName}-${scope.props.stage}`,
39
+ : `${props.resourceGroupName}`,
41
40
  });
42
41
  if (!resourceGroup)
43
42
  throw `Resource group undefined for ${id}`;
44
- const functionApp = new function_app_1.FunctionApp(scope, `${id}-fa`, {
43
+ const functionApp = new linux_function_app_1.LinuxFunctionApp(scope, `${id}-fa`, {
45
44
  ...props,
46
45
  name: `${props.name}-${scope.props.stage}`,
47
46
  resourceGroupName: resourceGroup.name,
@@ -64,20 +63,10 @@ class AzureFunctionManager {
64
63
  createFunction(id, scope, props) {
65
64
  if (!props)
66
65
  throw `Props undefined for ${id}`;
67
- const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-sb-rg`, {
68
- name: scope.props.resourceGroupName
69
- ? `${scope.props.resourceGroupName}-${scope.props.stage}`
70
- : `${props.resourceGroupName}-${scope.props.stage}`,
71
- });
72
- if (!resourceGroup)
73
- throw `Resource group undefined for ${id}`;
74
- const storageAccount = new data_azurerm_function_app_1.DataAzurermFunctionApp(scope, `${id}-sa`, {
75
- name: `${props.functionAppName}-${scope.props.stage}`,
76
- resourceGroupName: resourceGroup.name,
77
- });
78
66
  const functionAppFunction = new function_app_function_1.FunctionAppFunction(scope, `${id}-fc`, {
79
67
  ...props,
80
68
  name: `${props.name}-${scope.props.stage}`,
69
+ configJson: JSON.stringify(props.configJson || {}),
81
70
  });
82
71
  (0, utils_1.createAzureTfOutput)(`${id}-functionName`, scope, functionAppFunction.name);
83
72
  (0, utils_1.createAzureTfOutput)(`${id}-functionFriendlyUniqueId`, scope, functionAppFunction.friendlyUniqueId);
@@ -1,8 +1,6 @@
1
- import { FunctionAppConfig } from '@cdktf/provider-azurerm/lib/function-app';
1
+ import { LinuxFunctionAppConfig } from '@cdktf/provider-azurerm/lib/linux-function-app';
2
2
  import { FunctionAppFunctionConfig } from '@cdktf/provider-azurerm/lib/function-app-function';
3
- import { BaseAzureConfigProps } from '../../types';
4
- export interface FunctionAppProps extends FunctionAppConfig {
3
+ export interface FunctionAppProps extends LinuxFunctionAppConfig {
5
4
  }
6
- export interface FunctionProps extends BaseAzureConfigProps, FunctionAppFunctionConfig {
7
- functionAppName: string;
5
+ export interface FunctionProps extends FunctionAppFunctionConfig {
8
6
  }
@@ -1,4 +1,7 @@
1
1
  export * from './api-management';
2
+ export * from './app-configuration';
3
+ export * from './app-service';
4
+ export * from './application-insights';
2
5
  export * from './function';
3
6
  export * from './key-vault';
4
7
  export * from './resource-group';
@@ -15,6 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./api-management"), exports);
18
+ __exportStar(require("./app-configuration"), exports);
19
+ __exportStar(require("./app-service"), exports);
20
+ __exportStar(require("./application-insights"), exports);
18
21
  __exportStar(require("./function"), exports);
19
22
  __exportStar(require("./key-vault"), exports);
20
23
  __exportStar(require("./resource-group"), exports);
@@ -39,7 +39,7 @@ class AzureStorageManager {
39
39
  const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-sc-rg`, {
40
40
  name: scope.props.resourceGroupName
41
41
  ? `${scope.props.resourceGroupName}-${scope.props.stage}`
42
- : `${props.resourceGroupName}-${scope.props.stage}`,
42
+ : `${props.resourceGroupName}`,
43
43
  });
44
44
  if (!resourceGroup)
45
45
  throw `Resource group undefined for ${id}`;
@@ -47,7 +47,7 @@ class AzureStorageManager {
47
47
  ...props,
48
48
  accountTier: props.accountTier ?? 'Standard',
49
49
  location: props.location ?? resourceGroup.location,
50
- name: `${props.name}-${scope.props.stage}`,
50
+ name: `${props.name}-${scope.props.stage}`.replace(/\W/g, '').toLowerCase(),
51
51
  resourceGroupName: resourceGroup.name,
52
52
  tags: props.tags ?? {
53
53
  environment: scope.props.stage,
@@ -71,7 +71,7 @@ class AzureStorageManager {
71
71
  const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-sc-rg`, {
72
72
  name: scope.props.resourceGroupName
73
73
  ? `${scope.props.resourceGroupName}-${scope.props.stage}`
74
- : `${props.resourceGroupName}-${scope.props.stage}`,
74
+ : `${props.resourceGroupName}`,
75
75
  });
76
76
  if (!resourceGroup)
77
77
  throw `Resource group undefined for ${id}`;
@@ -102,7 +102,7 @@ class AzureStorageManager {
102
102
  const resourceGroup = new data_azurerm_resource_group_1.DataAzurermResourceGroup(scope, `${id}-sb-rg`, {
103
103
  name: scope.props.resourceGroupName
104
104
  ? `${scope.props.resourceGroupName}-${scope.props.stage}`
105
- : `${props.resourceGroupName}-${scope.props.stage}`,
105
+ : `${props.resourceGroupName}`,
106
106
  });
107
107
  if (!resourceGroup)
108
108
  throw `Resource group undefined for ${id}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "9.32.0",
3
+ "version": "9.34.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -23,7 +23,7 @@ import { isDevStage } from '../../common'
23
23
  * }
24
24
  */
25
25
  export class CommonStack extends Stack {
26
- public static NODEJS_RUNTIME = Runtime.NODEJS_18_X
26
+ public static NODEJS_RUNTIME = Runtime.NODEJS_22_X
27
27
 
28
28
  construct: CommonConstruct
29
29
  props: CommonStackProps
@@ -9,6 +9,9 @@ import {
9
9
  AzureApiManagementManager,
10
10
  AzureFunctionManager,
11
11
  AzureResourceGroupManager,
12
+ AzureAppServiceManager,
13
+ AzureApplicationInsightsManager,
14
+ AzureAppConfigurationManager,
12
15
  } from '../services'
13
16
  import { CommonAzureStackProps } from './types'
14
17
  import { AzureRemoteBackend } from './constants'
@@ -18,7 +21,10 @@ export class CommonAzureConstruct extends TerraformStack {
18
21
  id: string
19
22
  fullyQualifiedDomainName: string
20
23
  tenantId: string
21
- apiManagementtManager: AzureApiManagementManager
24
+ apiManagementManager: AzureApiManagementManager
25
+ appServiceManager: AzureAppServiceManager
26
+ applicationInsightsManager: AzureApplicationInsightsManager
27
+ appConfigurationManager: AzureAppConfigurationManager
22
28
  functiontManager: AzureFunctionManager
23
29
  keyVaultManager: AzureKeyVaultManager
24
30
  resourceGroupManager: AzureResourceGroupManager
@@ -29,7 +35,10 @@ export class CommonAzureConstruct extends TerraformStack {
29
35
  this.props = props
30
36
  this.id = id
31
37
 
32
- this.apiManagementtManager = new AzureApiManagementManager()
38
+ this.apiManagementManager = new AzureApiManagementManager()
39
+ this.appServiceManager = new AzureAppServiceManager()
40
+ this.applicationInsightsManager = new AzureApplicationInsightsManager()
41
+ this.appConfigurationManager = new AzureAppConfigurationManager()
33
42
  this.functiontManager = new AzureFunctionManager()
34
43
  this.keyVaultManager = new AzureKeyVaultManager()
35
44
  this.resourceGroupManager = new AzureResourceGroupManager()
@@ -35,7 +35,7 @@ export class AzureApiManagementManager {
35
35
  const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-am-rg`, {
36
36
  name: scope.props.resourceGroupName
37
37
  ? `${scope.props.resourceGroupName}-${scope.props.stage}`
38
- : `${props.resourceGroupName}-${scope.props.stage}`,
38
+ : `${props.resourceGroupName}`,
39
39
  })
40
40
 
41
41
  if (!resourceGroup) throw `Resource group undefined for ${id}`
@@ -0,0 +1,2 @@
1
+ export * from './main'
2
+ export * from './types'
@@ -0,0 +1,58 @@
1
+ import { DataAzurermResourceGroup } from '@cdktf/provider-azurerm/lib/data-azurerm-resource-group'
2
+ import { AppConfiguration } from '@cdktf/provider-azurerm/lib/app-configuration'
3
+ import { CommonAzureConstruct } from '../../common'
4
+ import { createAzureTfOutput } from '../../utils'
5
+ import { AppConfigurationProps } from './types'
6
+
7
+ /**
8
+ * @classdesc Provides operations on Azure App Configuration
9
+ * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
10
+ * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
11
+ * @example
12
+ * ```
13
+ * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
14
+ *
15
+ * class CustomConstruct extends CommonAzureConstruct {
16
+ * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
17
+ * super(parent, id, props)
18
+ * this.props = props
19
+ * this.appConfigurationManager.createAppConfiguration('MyAppConfiguration', this, props)
20
+ * }
21
+ * }
22
+ * ```
23
+ */
24
+ export class AzureAppConfigurationManager {
25
+ /**
26
+ * @summary Method to create a new app configuration
27
+ * @param id scoped id of the resource
28
+ * @param scope scope in which this resource is defined
29
+ * @param props app configuration properties
30
+ * @see [CDKTF App Configuration plan Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/appConfiguration.typescript.md}
31
+ */
32
+ public createAppConfiguration(id: string, scope: CommonAzureConstruct, props: AppConfigurationProps) {
33
+ if (!props) throw `Props undefined for ${id}`
34
+
35
+ const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-am-rg`, {
36
+ name: scope.props.resourceGroupName
37
+ ? `${scope.props.resourceGroupName}-${scope.props.stage}`
38
+ : `${props.resourceGroupName}`,
39
+ })
40
+
41
+ if (!resourceGroup) throw `Resource group undefined for ${id}`
42
+
43
+ const appConfiguration = new AppConfiguration(scope, `${id}-am`, {
44
+ ...props,
45
+ name: `${props.name}-${scope.props.stage}`,
46
+ resourceGroupName: resourceGroup.name,
47
+ tags: props.tags ?? {
48
+ environment: scope.props.stage,
49
+ },
50
+ })
51
+
52
+ createAzureTfOutput(`${id}-appConfigurationName`, scope, appConfiguration.name)
53
+ createAzureTfOutput(`${id}-appConfigurationFriendlyUniqueId`, scope, appConfiguration.friendlyUniqueId)
54
+ createAzureTfOutput(`${id}-appConfigurationId`, scope, appConfiguration.id)
55
+
56
+ return appConfiguration
57
+ }
58
+ }
@@ -0,0 +1,3 @@
1
+ import { AppConfigurationConfig } from '@cdktf/provider-azurerm/lib/app-configuration'
2
+
3
+ export interface AppConfigurationProps extends AppConfigurationConfig {}
@@ -0,0 +1,2 @@
1
+ export * from './main'
2
+ export * from './types'
@@ -0,0 +1,58 @@
1
+ import { DataAzurermResourceGroup } from '@cdktf/provider-azurerm/lib/data-azurerm-resource-group'
2
+ import { ServicePlan } from '@cdktf/provider-azurerm/lib/service-plan'
3
+ import { CommonAzureConstruct } from '../../common'
4
+ import { createAzureTfOutput } from '../../utils'
5
+ import { ServicePlanProps } from './types'
6
+
7
+ /**
8
+ * @classdesc Provides operations on Azure App Service
9
+ * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
10
+ * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
11
+ * @example
12
+ * ```
13
+ * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
14
+ *
15
+ * class CustomConstruct extends CommonAzureConstruct {
16
+ * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
17
+ * super(parent, id, props)
18
+ * this.props = props
19
+ * this.appServiceManager.createAppService('MyAppService', this, props)
20
+ * }
21
+ * }
22
+ * ```
23
+ */
24
+ export class AzureAppServiceManager {
25
+ /**
26
+ * @summary Method to create a new app service plan
27
+ * @param id scoped id of the resource
28
+ * @param scope scope in which this resource is defined
29
+ * @param props app service plan properties
30
+ * @see [CDKTF App service plan Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/appServicePlan.typescript.md}
31
+ */
32
+ public createAppServicePlan(id: string, scope: CommonAzureConstruct, props: ServicePlanProps) {
33
+ if (!props) throw `Props undefined for ${id}`
34
+
35
+ const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-am-rg`, {
36
+ name: scope.props.resourceGroupName
37
+ ? `${scope.props.resourceGroupName}-${scope.props.stage}`
38
+ : `${props.resourceGroupName}`,
39
+ })
40
+
41
+ if (!resourceGroup) throw `Resource group undefined for ${id}`
42
+
43
+ const appServicePlan = new ServicePlan(scope, `${id}-am`, {
44
+ ...props,
45
+ name: `${props.name}-${scope.props.stage}`,
46
+ resourceGroupName: resourceGroup.name,
47
+ tags: props.tags ?? {
48
+ environment: scope.props.stage,
49
+ },
50
+ })
51
+
52
+ createAzureTfOutput(`${id}-appServicePlanName`, scope, appServicePlan.name)
53
+ createAzureTfOutput(`${id}-appServicePlanFriendlyUniqueId`, scope, appServicePlan.friendlyUniqueId)
54
+ createAzureTfOutput(`${id}-appServicePlanId`, scope, appServicePlan.id)
55
+
56
+ return appServicePlan
57
+ }
58
+ }
@@ -0,0 +1,3 @@
1
+ import { ServicePlanConfig } from '@cdktf/provider-azurerm/lib/service-plan'
2
+
3
+ export interface ServicePlanProps extends ServicePlanConfig {}
@@ -0,0 +1,2 @@
1
+ export * from './main'
2
+ export * from './types'
@@ -0,0 +1,58 @@
1
+ import { DataAzurermResourceGroup } from '@cdktf/provider-azurerm/lib/data-azurerm-resource-group'
2
+ import { ApplicationInsights } from '@cdktf/provider-azurerm/lib/application-insights'
3
+ import { CommonAzureConstruct } from '../../common'
4
+ import { createAzureTfOutput } from '../../utils'
5
+ import { ApplicationInsightsProps } from './types'
6
+
7
+ /**
8
+ * @classdesc Provides operations on Azure Application Insights
9
+ * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
10
+ * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
11
+ * @example
12
+ * ```
13
+ * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
14
+ *
15
+ * class CustomConstruct extends CommonAzureConstruct {
16
+ * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
17
+ * super(parent, id, props)
18
+ * this.props = props
19
+ * this.applicationInsightseManager.createApplicationInsights('MyApplicationInsights', this, props)
20
+ * }
21
+ * }
22
+ * ```
23
+ */
24
+ export class AzureApplicationInsightsManager {
25
+ /**
26
+ * @summary Method to create a new application insights
27
+ * @param id scoped id of the resource
28
+ * @param scope scope in which this resource is defined
29
+ * @param props application insights properties
30
+ * @see [CDKTF Application insights Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/applicationInsights.typescript.md}
31
+ */
32
+ public createApplicationInsights(id: string, scope: CommonAzureConstruct, props: ApplicationInsightsProps) {
33
+ if (!props) throw `Props undefined for ${id}`
34
+
35
+ const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-am-rg`, {
36
+ name: scope.props.resourceGroupName
37
+ ? `${scope.props.resourceGroupName}-${scope.props.stage}`
38
+ : `${props.resourceGroupName}`,
39
+ })
40
+
41
+ if (!resourceGroup) throw `Resource group undefined for ${id}`
42
+
43
+ const applicationInsights = new ApplicationInsights(scope, `${id}-am`, {
44
+ ...props,
45
+ name: `${props.name}-${scope.props.stage}`,
46
+ resourceGroupName: resourceGroup.name,
47
+ tags: props.tags ?? {
48
+ environment: scope.props.stage,
49
+ },
50
+ })
51
+
52
+ createAzureTfOutput(`${id}-applicationInsightsName`, scope, applicationInsights.name)
53
+ createAzureTfOutput(`${id}-applicationInsightsFriendlyUniqueId`, scope, applicationInsights.friendlyUniqueId)
54
+ createAzureTfOutput(`${id}-applicationInsightsId`, scope, applicationInsights.id)
55
+
56
+ return applicationInsights
57
+ }
58
+ }
@@ -0,0 +1,3 @@
1
+ import { ApplicationInsightsConfig } from '@cdktf/provider-azurerm/lib/application-insights'
2
+
3
+ export interface ApplicationInsightsProps extends ApplicationInsightsConfig {}
@@ -1,6 +1,5 @@
1
1
  import { DataAzurermResourceGroup } from '@cdktf/provider-azurerm/lib/data-azurerm-resource-group'
2
- import { DataAzurermFunctionApp } from '@cdktf/provider-azurerm/lib/data-azurerm-function-app'
3
- import { FunctionApp } from '@cdktf/provider-azurerm/lib/function-app'
2
+ import { LinuxFunctionApp } from '@cdktf/provider-azurerm/lib/linux-function-app'
4
3
  import { FunctionAppFunction } from '@cdktf/provider-azurerm/lib/function-app-function'
5
4
  import { CommonAzureConstruct } from '../../common'
6
5
  import { createAzureTfOutput } from '../../utils'
@@ -37,12 +36,12 @@ export class AzureFunctionManager {
37
36
  const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-fa-rg`, {
38
37
  name: scope.props.resourceGroupName
39
38
  ? `${scope.props.resourceGroupName}-${scope.props.stage}`
40
- : `${props.resourceGroupName}-${scope.props.stage}`,
39
+ : `${props.resourceGroupName}`,
41
40
  })
42
41
 
43
42
  if (!resourceGroup) throw `Resource group undefined for ${id}`
44
43
 
45
- const functionApp = new FunctionApp(scope, `${id}-fa`, {
44
+ const functionApp = new LinuxFunctionApp(scope, `${id}-fa`, {
46
45
  ...props,
47
46
  name: `${props.name}-${scope.props.stage}`,
48
47
  resourceGroupName: resourceGroup.name,
@@ -68,22 +67,10 @@ export class AzureFunctionManager {
68
67
  public createFunction(id: string, scope: CommonAzureConstruct, props: FunctionProps) {
69
68
  if (!props) throw `Props undefined for ${id}`
70
69
 
71
- const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-sb-rg`, {
72
- name: scope.props.resourceGroupName
73
- ? `${scope.props.resourceGroupName}-${scope.props.stage}`
74
- : `${props.resourceGroupName}-${scope.props.stage}`,
75
- })
76
-
77
- if (!resourceGroup) throw `Resource group undefined for ${id}`
78
-
79
- const storageAccount = new DataAzurermFunctionApp(scope, `${id}-sa`, {
80
- name: `${props.functionAppName}-${scope.props.stage}`,
81
- resourceGroupName: resourceGroup.name,
82
- })
83
-
84
70
  const functionAppFunction = new FunctionAppFunction(scope, `${id}-fc`, {
85
71
  ...props,
86
72
  name: `${props.name}-${scope.props.stage}`,
73
+ configJson: JSON.stringify(props.configJson || {}),
87
74
  })
88
75
 
89
76
  createAzureTfOutput(`${id}-functionName`, scope, functionAppFunction.name)
@@ -1,9 +1,7 @@
1
- import { FunctionAppConfig } from '@cdktf/provider-azurerm/lib/function-app'
1
+ import { LinuxFunctionAppConfig } from '@cdktf/provider-azurerm/lib/linux-function-app'
2
2
  import { FunctionAppFunctionConfig } from '@cdktf/provider-azurerm/lib/function-app-function'
3
3
  import { BaseAzureConfigProps } from '../../types'
4
4
 
5
- export interface FunctionAppProps extends FunctionAppConfig {}
5
+ export interface FunctionAppProps extends LinuxFunctionAppConfig {}
6
6
 
7
- export interface FunctionProps extends BaseAzureConfigProps, FunctionAppFunctionConfig {
8
- functionAppName: string
9
- }
7
+ export interface FunctionProps extends FunctionAppFunctionConfig {}
@@ -1,4 +1,7 @@
1
1
  export * from './api-management'
2
+ export * from './app-configuration'
3
+ export * from './app-service'
4
+ export * from './application-insights'
2
5
  export * from './function'
3
6
  export * from './key-vault'
4
7
  export * from './resource-group'
@@ -39,7 +39,7 @@ export class AzureStorageManager {
39
39
  const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-sc-rg`, {
40
40
  name: scope.props.resourceGroupName
41
41
  ? `${scope.props.resourceGroupName}-${scope.props.stage}`
42
- : `${props.resourceGroupName}-${scope.props.stage}`,
42
+ : `${props.resourceGroupName}`,
43
43
  })
44
44
 
45
45
  if (!resourceGroup) throw `Resource group undefined for ${id}`
@@ -48,7 +48,7 @@ export class AzureStorageManager {
48
48
  ...props,
49
49
  accountTier: props.accountTier ?? 'Standard',
50
50
  location: props.location ?? resourceGroup.location,
51
- name: `${props.name}-${scope.props.stage}`,
51
+ name: `${props.name}-${scope.props.stage}`.replace(/\W/g, '').toLowerCase(),
52
52
  resourceGroupName: resourceGroup.name,
53
53
  tags: props.tags ?? {
54
54
  environment: scope.props.stage,
@@ -75,7 +75,7 @@ export class AzureStorageManager {
75
75
  const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-sc-rg`, {
76
76
  name: scope.props.resourceGroupName
77
77
  ? `${scope.props.resourceGroupName}-${scope.props.stage}`
78
- : `${props.resourceGroupName}-${scope.props.stage}`,
78
+ : `${props.resourceGroupName}`,
79
79
  })
80
80
 
81
81
  if (!resourceGroup) throw `Resource group undefined for ${id}`
@@ -111,7 +111,7 @@ export class AzureStorageManager {
111
111
  const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-sb-rg`, {
112
112
  name: scope.props.resourceGroupName
113
113
  ? `${scope.props.resourceGroupName}-${scope.props.stage}`
114
- : `${props.resourceGroupName}-${scope.props.stage}`,
114
+ : `${props.resourceGroupName}`,
115
115
  })
116
116
 
117
117
  if (!resourceGroup) throw `Resource group undefined for ${id}`