@gradientedge/cdk-utils 10.1.0 → 10.2.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 (112) hide show
  1. package/dist/src/lib/azure/common/constants.d.ts +3 -2
  2. package/dist/src/lib/azure/common/constants.js +2 -1
  3. package/dist/src/lib/azure/common/construct.d.ts +26 -12
  4. package/dist/src/lib/azure/common/construct.js +31 -45
  5. package/dist/src/lib/azure/common/resource-name-formatter.d.ts +9 -4
  6. package/dist/src/lib/azure/common/resource-name-formatter.js +9 -5
  7. package/dist/src/lib/azure/common/stack.d.ts +18 -32
  8. package/dist/src/lib/azure/common/stack.js +77 -74
  9. package/dist/src/lib/azure/common/tagging.d.ts +29 -8
  10. package/dist/src/lib/azure/common/tagging.js +72 -26
  11. package/dist/src/lib/azure/common/types.d.ts +19 -4
  12. package/dist/src/lib/azure/services/api-management/main.d.ts +29 -32
  13. package/dist/src/lib/azure/services/api-management/main.js +100 -121
  14. package/dist/src/lib/azure/services/api-management/types.d.ts +33 -18
  15. package/dist/src/lib/azure/services/app-configuration/main.d.ts +6 -7
  16. package/dist/src/lib/azure/services/app-configuration/main.js +23 -26
  17. package/dist/src/lib/azure/services/app-configuration/types.d.ts +2 -2
  18. package/dist/src/lib/azure/services/app-service/main.d.ts +10 -12
  19. package/dist/src/lib/azure/services/app-service/main.js +37 -49
  20. package/dist/src/lib/azure/services/app-service/types.d.ts +4 -4
  21. package/dist/src/lib/azure/services/application-insights/main.d.ts +7 -8
  22. package/dist/src/lib/azure/services/application-insights/main.js +20 -26
  23. package/dist/src/lib/azure/services/application-insights/types.d.ts +2 -4
  24. package/dist/src/lib/azure/services/cosmosdb/main.d.ts +12 -15
  25. package/dist/src/lib/azure/services/cosmosdb/main.js +42 -61
  26. package/dist/src/lib/azure/services/cosmosdb/types.d.ts +4 -6
  27. package/dist/src/lib/azure/services/dns/main.d.ts +13 -17
  28. package/dist/src/lib/azure/services/dns/main.js +33 -51
  29. package/dist/src/lib/azure/services/dns/types.d.ts +5 -8
  30. package/dist/src/lib/azure/services/eventgrid/main.d.ts +20 -22
  31. package/dist/src/lib/azure/services/eventgrid/main.js +61 -89
  32. package/dist/src/lib/azure/services/eventgrid/types.d.ts +7 -8
  33. package/dist/src/lib/azure/services/function/main.d.ts +15 -15
  34. package/dist/src/lib/azure/services/function/main.js +54 -59
  35. package/dist/src/lib/azure/services/function/types.d.ts +18 -6
  36. package/dist/src/lib/azure/services/index.d.ts +1 -1
  37. package/dist/src/lib/azure/services/index.js +1 -1
  38. package/dist/src/lib/azure/services/key-vault/main.d.ts +6 -7
  39. package/dist/src/lib/azure/services/key-vault/main.js +29 -28
  40. package/dist/src/lib/azure/services/key-vault/types.d.ts +3 -2
  41. package/dist/src/lib/azure/services/monitor/main.d.ts +7 -8
  42. package/dist/src/lib/azure/services/monitor/main.js +10 -15
  43. package/dist/src/lib/azure/services/monitor/types.d.ts +2 -2
  44. package/dist/src/lib/azure/services/operational-insights/main.d.ts +29 -0
  45. package/dist/src/lib/azure/services/operational-insights/main.js +50 -0
  46. package/dist/src/lib/azure/services/operational-insights/types.d.ts +3 -0
  47. package/dist/src/lib/azure/services/redis/main.d.ts +8 -9
  48. package/dist/src/lib/azure/services/redis/main.js +24 -26
  49. package/dist/src/lib/azure/services/redis/types.d.ts +2 -2
  50. package/dist/src/lib/azure/services/resource-group/main.d.ts +6 -7
  51. package/dist/src/lib/azure/services/resource-group/main.js +9 -14
  52. package/dist/src/lib/azure/services/resource-group/types.d.ts +2 -2
  53. package/dist/src/lib/azure/services/servicebus/main.d.ts +17 -22
  54. package/dist/src/lib/azure/services/servicebus/main.js +47 -70
  55. package/dist/src/lib/azure/services/servicebus/types.d.ts +6 -10
  56. package/dist/src/lib/azure/services/storage/main.d.ts +24 -27
  57. package/dist/src/lib/azure/services/storage/main.js +70 -88
  58. package/dist/src/lib/azure/services/storage/types.d.ts +10 -8
  59. package/dist/src/lib/azure/types/index.d.ts +2 -1
  60. package/dist/src/lib/azure/utils/index.d.ts +19 -3
  61. package/dist/src/lib/azure/utils/index.js +19 -13
  62. package/dist/src/lib/cloudflare/common/stack.js +1 -1
  63. package/package.json +2 -1
  64. package/src/lib/azure/common/constants.ts +2 -1
  65. package/src/lib/azure/common/construct.ts +32 -48
  66. package/src/lib/azure/common/resource-name-formatter.ts +10 -6
  67. package/src/lib/azure/common/stack.ts +78 -78
  68. package/src/lib/azure/common/tagging.ts +78 -29
  69. package/src/lib/azure/common/types.ts +21 -4
  70. package/src/lib/azure/services/api-management/main.ts +172 -169
  71. package/src/lib/azure/services/api-management/types.ts +39 -16
  72. package/src/lib/azure/services/app-configuration/main.ts +33 -31
  73. package/src/lib/azure/services/app-configuration/types.ts +2 -2
  74. package/src/lib/azure/services/app-service/main.ts +61 -62
  75. package/src/lib/azure/services/app-service/types.ts +4 -4
  76. package/src/lib/azure/services/application-insights/main.ts +29 -30
  77. package/src/lib/azure/services/application-insights/types.ts +2 -5
  78. package/src/lib/azure/services/cosmosdb/main.ts +78 -77
  79. package/src/lib/azure/services/cosmosdb/types.ts +10 -6
  80. package/src/lib/azure/services/dns/main.ts +65 -72
  81. package/src/lib/azure/services/dns/types.ts +9 -9
  82. package/src/lib/azure/services/eventgrid/main.ts +120 -122
  83. package/src/lib/azure/services/eventgrid/types.ts +13 -8
  84. package/src/lib/azure/services/function/main.ts +75 -72
  85. package/src/lib/azure/services/function/types.ts +21 -6
  86. package/src/lib/azure/services/index.ts +1 -1
  87. package/src/lib/azure/services/key-vault/main.ts +38 -32
  88. package/src/lib/azure/services/key-vault/types.ts +4 -2
  89. package/src/lib/azure/services/monitor/main.ts +17 -21
  90. package/src/lib/azure/services/monitor/types.ts +2 -2
  91. package/src/lib/azure/services/operational-insights/main.ts +61 -0
  92. package/src/lib/azure/services/operational-insights/types.ts +3 -0
  93. package/src/lib/azure/services/redis/main.ts +30 -30
  94. package/src/lib/azure/services/redis/types.ts +2 -2
  95. package/src/lib/azure/services/resource-group/main.ts +20 -20
  96. package/src/lib/azure/services/resource-group/types.ts +2 -2
  97. package/src/lib/azure/services/servicebus/main.ts +103 -94
  98. package/src/lib/azure/services/servicebus/types.ts +17 -11
  99. package/src/lib/azure/services/storage/main.ts +113 -114
  100. package/src/lib/azure/services/storage/types.ts +16 -8
  101. package/src/lib/azure/types/index.ts +2 -1
  102. package/src/lib/azure/utils/index.ts +20 -22
  103. package/src/lib/cloudflare/common/stack.ts +1 -1
  104. package/dist/src/lib/azure/services/log-analytics-workspace/main.d.ts +0 -30
  105. package/dist/src/lib/azure/services/log-analytics-workspace/main.js +0 -55
  106. package/dist/src/lib/azure/services/log-analytics-workspace/types.d.ts +0 -3
  107. package/src/lib/azure/services/log-analytics-workspace/main.ts +0 -61
  108. package/src/lib/azure/services/log-analytics-workspace/types.ts +0 -3
  109. /package/dist/src/lib/azure/services/{log-analytics-workspace → operational-insights}/index.d.ts +0 -0
  110. /package/dist/src/lib/azure/services/{log-analytics-workspace → operational-insights}/index.js +0 -0
  111. /package/dist/src/lib/azure/services/{log-analytics-workspace → operational-insights}/types.js +0 -0
  112. /package/src/lib/azure/services/{log-analytics-workspace → operational-insights}/index.ts +0 -0
@@ -1,17 +1,16 @@
1
- import { AppConfiguration } from '@cdktf/provider-azurerm/lib/app-configuration/index.js';
2
1
  import { CommonAzureConstruct } from '../../common/index.js';
3
2
  import { AppConfigurationProps } from './types.js';
4
3
  /**
5
- * @classdesc Provides operations on Azure App Configuration
4
+ * @classdesc Provides operations on Azure App Configuration using Pulumi
6
5
  * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
7
6
  * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
8
7
  * @example
9
- * ```
8
+ * ```typescript
10
9
  * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
11
10
  *
12
11
  * class CustomConstruct extends CommonAzureConstruct {
13
- * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
14
- * super(parent, id, props)
12
+ * constructor(name: string, props: CommonAzureStackProps) {
13
+ * super(name, props)
15
14
  * this.props = props
16
15
  * this.appConfigurationManager.createAppConfiguration('MyAppConfiguration', this, props)
17
16
  * }
@@ -24,7 +23,7 @@ export declare class AzureAppConfigurationManager {
24
23
  * @param id scoped id of the resource
25
24
  * @param scope scope in which this resource is defined
26
25
  * @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}
26
+ * @see [Pulumi Azure Native App Configuration]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/appconfiguration/configurationstore/}
28
27
  */
29
- createAppConfiguration(id: string, scope: CommonAzureConstruct, props: AppConfigurationProps): AppConfiguration;
28
+ createConfigurationStore(id: string, scope: CommonAzureConstruct, props: AppConfigurationProps): import("@pulumi/azure-native/appconfiguration/configurationStore.js").ConfigurationStore;
30
29
  }
@@ -1,17 +1,15 @@
1
- import { AppConfiguration } from '@cdktf/provider-azurerm/lib/app-configuration/index.js';
2
- import { DataAzurermResourceGroup } from '@cdktf/provider-azurerm/lib/data-azurerm-resource-group/index.js';
3
- import { createAzureTfOutput } from '../../utils/index.js';
1
+ import { ConfigurationStore, IdentityType } from '@pulumi/azure-native/appconfiguration/index.js';
4
2
  /**
5
- * @classdesc Provides operations on Azure App Configuration
3
+ * @classdesc Provides operations on Azure App Configuration using Pulumi
6
4
  * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
7
5
  * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
8
6
  * @example
9
- * ```
7
+ * ```typescript
10
8
  * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
11
9
  *
12
10
  * class CustomConstruct extends CommonAzureConstruct {
13
- * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
14
- * super(parent, id, props)
11
+ * constructor(name: string, props: CommonAzureStackProps) {
12
+ * super(name, props)
15
13
  * this.props = props
16
14
  * this.appConfigurationManager.createAppConfiguration('MyAppConfiguration', this, props)
17
15
  * }
@@ -24,32 +22,31 @@ export class AzureAppConfigurationManager {
24
22
  * @param id scoped id of the resource
25
23
  * @param scope scope in which this resource is defined
26
24
  * @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}
25
+ * @see [Pulumi Azure Native App Configuration]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/appconfiguration/configurationstore/}
28
26
  */
29
- createAppConfiguration(id, scope, props) {
27
+ createConfigurationStore(id, scope, props) {
30
28
  if (!props)
31
29
  throw `Props undefined for ${id}`;
32
- const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-ac-rg`, {
33
- name: scope.props.resourceGroupName
34
- ? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
35
- : `${props.resourceGroupName}`,
36
- });
37
- if (!resourceGroup)
38
- throw `Resource group undefined for ${id}`;
39
- const appConfiguration = new AppConfiguration(scope, `${id}-ac`, {
30
+ // Get resource group name
31
+ const resourceGroupName = scope.props.resourceGroupName
32
+ ? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
33
+ : props.resourceGroupName;
34
+ if (!resourceGroupName)
35
+ throw `Resource group name undefined for ${id}`;
36
+ return new ConfigurationStore(`${id}-ac`, {
40
37
  ...props,
41
- name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.appConfiguration),
42
- resourceGroupName: resourceGroup.name,
43
- identity: {
44
- type: 'SystemAssigned',
38
+ configStoreName: scope.resourceNameFormatter.format(props.configStoreName?.toString(), scope.props.resourceNameOptions?.appConfiguration),
39
+ resourceGroupName: resourceGroupName,
40
+ location: props.location ?? scope.props.location,
41
+ identity: props.identity ?? {
42
+ type: IdentityType.SystemAssigned,
43
+ },
44
+ sku: props.sku ?? {
45
+ name: 'standard',
45
46
  },
46
47
  tags: props.tags ?? {
47
48
  environment: scope.props.stage,
48
49
  },
49
- });
50
- createAzureTfOutput(`${id}-appConfigurationName`, scope, appConfiguration.name);
51
- createAzureTfOutput(`${id}-appConfigurationFriendlyUniqueId`, scope, appConfiguration.friendlyUniqueId);
52
- createAzureTfOutput(`${id}-appConfigurationId`, scope, appConfiguration.id);
53
- return appConfiguration;
50
+ }, { parent: scope });
54
51
  }
55
52
  }
@@ -1,3 +1,3 @@
1
- import { AppConfigurationConfig } from '@cdktf/provider-azurerm/lib/app-configuration/index.js';
2
- export interface AppConfigurationProps extends AppConfigurationConfig {
1
+ import { ConfigurationStoreArgs } from '@pulumi/azure-native/appconfiguration/index.js';
2
+ export interface AppConfigurationProps extends ConfigurationStoreArgs {
3
3
  }
@@ -1,20 +1,18 @@
1
- import { LinuxWebApp } from '@cdktf/provider-azurerm/lib/linux-web-app/index.js';
2
- import { ServicePlan } from '@cdktf/provider-azurerm/lib/service-plan/index.js';
3
1
  import { CommonAzureConstruct } from '../../common/index.js';
4
2
  import { LinuxWebAppProps, ServicePlanProps } from './types.js';
5
3
  /**
6
- * @classdesc Provides operations on Azure App Service
4
+ * @classdesc Provides operations on Azure App Service using Pulumi
7
5
  * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
8
6
  * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
9
7
  * @example
10
- * ```
8
+ * ```typescript
11
9
  * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
12
10
  *
13
11
  * class CustomConstruct extends CommonAzureConstruct {
14
- * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
15
- * super(parent, id, props)
12
+ * constructor(name: string, props: CommonAzureStackProps) {
13
+ * super(name, props)
16
14
  * this.props = props
17
- * this.appServiceManager.createAppService('MyAppService', this, props)
15
+ * this.appServiceManager.createAppServicePlan('MyAppService', this, props)
18
16
  * }
19
17
  * }
20
18
  * ```
@@ -25,15 +23,15 @@ export declare class AzureAppServiceManager {
25
23
  * @param id scoped id of the resource
26
24
  * @param scope scope in which this resource is defined
27
25
  * @param props app service plan properties
28
- * @see [CDKTF App service plan Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/appServicePlan.typescript.md}
26
+ * @see [Pulumi Azure Native App Service Plan]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/web/appserviceplan/}
29
27
  */
30
- createAppServicePlan(id: string, scope: CommonAzureConstruct, props: ServicePlanProps): ServicePlan;
28
+ createAppServicePlan(id: string, scope: CommonAzureConstruct, props: ServicePlanProps): import("@pulumi/azure-native/web/appServicePlan.js").AppServicePlan;
31
29
  /**
32
- * @summary Method to create a new web app
30
+ * @summary Method to create a new Linux web app
33
31
  * @param id scoped id of the resource
34
32
  * @param scope scope in which this resource is defined
35
33
  * @param props web app properties
36
- * @see [CDKTF Web App Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/linuxWebApp.typescript.md}
34
+ * @see [Pulumi Azure Native Web App]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapp/}
37
35
  */
38
- createLinuxWebApp(id: string, scope: CommonAzureConstruct, props: LinuxWebAppProps): LinuxWebApp;
36
+ createLinuxWebApp(id: string, scope: CommonAzureConstruct, props: LinuxWebAppProps): import("@pulumi/azure-native/web/webApp.js").WebApp;
39
37
  }
@@ -1,20 +1,17 @@
1
- import { DataAzurermResourceGroup } from '@cdktf/provider-azurerm/lib/data-azurerm-resource-group/index.js';
2
- import { LinuxWebApp } from '@cdktf/provider-azurerm/lib/linux-web-app/index.js';
3
- import { ServicePlan } from '@cdktf/provider-azurerm/lib/service-plan/index.js';
4
- import { createAzureTfOutput } from '../../utils/index.js';
1
+ import { AppServicePlan, ManagedServiceIdentityType, SupportedTlsVersions, WebApp, } from '@pulumi/azure-native/web/index.js';
5
2
  /**
6
- * @classdesc Provides operations on Azure App Service
3
+ * @classdesc Provides operations on Azure App Service using Pulumi
7
4
  * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
8
5
  * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
9
6
  * @example
10
- * ```
7
+ * ```typescript
11
8
  * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
12
9
  *
13
10
  * class CustomConstruct extends CommonAzureConstruct {
14
- * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
15
- * super(parent, id, props)
11
+ * constructor(name: string, props: CommonAzureStackProps) {
12
+ * super(name, props)
16
13
  * this.props = props
17
- * this.appServiceManager.createAppService('MyAppService', this, props)
14
+ * this.appServiceManager.createAppServicePlan('MyAppService', this, props)
18
15
  * }
19
16
  * }
20
17
  * ```
@@ -25,70 +22,61 @@ export class AzureAppServiceManager {
25
22
  * @param id scoped id of the resource
26
23
  * @param scope scope in which this resource is defined
27
24
  * @param props app service plan properties
28
- * @see [CDKTF App service plan Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/appServicePlan.typescript.md}
25
+ * @see [Pulumi Azure Native App Service Plan]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/web/appserviceplan/}
29
26
  */
30
27
  createAppServicePlan(id, scope, props) {
31
28
  if (!props)
32
29
  throw `Props undefined for ${id}`;
33
- const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-as-rg`, {
34
- name: scope.props.resourceGroupName
35
- ? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
36
- : `${props.resourceGroupName}`,
37
- });
38
- if (!resourceGroup)
39
- throw `Resource group undefined for ${id}`;
40
- const appServicePlan = new ServicePlan(scope, `${id}-as`, {
30
+ // Get resource group name
31
+ const resourceGroupName = scope.props.resourceGroupName
32
+ ? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
33
+ : props.resourceGroupName;
34
+ if (!resourceGroupName)
35
+ throw `Resource group name undefined for ${id}`;
36
+ return new AppServicePlan(`${id}-as`, {
41
37
  ...props,
42
- name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.appServicePlan),
43
- resourceGroupName: resourceGroup.name,
38
+ name: scope.resourceNameFormatter.format(props.name?.toString(), scope.props.resourceNameOptions?.appServicePlan),
39
+ resourceGroupName: resourceGroupName,
40
+ location: props.location ?? scope.props.location,
44
41
  tags: props.tags ?? {
45
42
  environment: scope.props.stage,
46
43
  },
47
- });
48
- createAzureTfOutput(`${id}-appServicePlanName`, scope, appServicePlan.name);
49
- createAzureTfOutput(`${id}-appServicePlanFriendlyUniqueId`, scope, appServicePlan.friendlyUniqueId);
50
- createAzureTfOutput(`${id}-appServicePlanId`, scope, appServicePlan.id);
51
- return appServicePlan;
44
+ }, { parent: scope });
52
45
  }
53
46
  /**
54
- * @summary Method to create a new web app
47
+ * @summary Method to create a new Linux web app
55
48
  * @param id scoped id of the resource
56
49
  * @param scope scope in which this resource is defined
57
50
  * @param props web app properties
58
- * @see [CDKTF Web App Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/linuxWebApp.typescript.md}
51
+ * @see [Pulumi Azure Native Web App]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapp/}
59
52
  */
60
53
  createLinuxWebApp(id, scope, props) {
61
54
  if (!props)
62
55
  throw `Props undefined for ${id}`;
63
- const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-as-rg`, {
64
- name: scope.props.resourceGroupName
65
- ? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
66
- : `${props.resourceGroupName}`,
67
- });
68
- if (!resourceGroup)
69
- throw `Resource group undefined for ${id}`;
70
- const linuxWebApp = new LinuxWebApp(scope, `${id}-lwa`, {
56
+ // Get resource group name
57
+ const resourceGroupName = scope.props.resourceGroupName
58
+ ? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
59
+ : props.resourceGroupName;
60
+ if (!resourceGroupName)
61
+ throw `Resource group name undefined for ${id}`;
62
+ return new WebApp(`${id}-lwa`, {
71
63
  ...props,
72
- name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.linuxWebApp),
73
- resourceGroupName: resourceGroup.name,
64
+ name: scope.resourceNameFormatter.format(props.name?.toString(), scope.props.resourceNameOptions?.linuxWebApp),
65
+ resourceGroupName: resourceGroupName,
66
+ location: props.location ?? scope.props.location,
74
67
  httpsOnly: props.httpsOnly ?? true,
68
+ kind: props.kind ?? 'app,linux',
75
69
  identity: props.identity ?? {
76
- type: 'SystemAssigned',
70
+ type: ManagedServiceIdentityType.SystemAssigned,
77
71
  },
78
- siteConfig: {
79
- ...props.siteConfig,
80
- alwaysOn: props.siteConfig.alwaysOn ?? true,
81
- applicationStack: props.siteConfig.applicationStack ?? { nodeVersion: '22-lts' },
82
- minimumTlsVersion: props.siteConfig.minimumTlsVersion ?? '1.3',
72
+ siteConfig: props.siteConfig ?? {
73
+ alwaysOn: true,
74
+ linuxFxVersion: 'NODE|22-lts',
75
+ minTlsVersion: SupportedTlsVersions.SupportedTlsVersions_1_3,
83
76
  },
84
77
  tags: props.tags ?? {
85
78
  environment: scope.props.stage,
86
79
  },
87
- });
88
- createAzureTfOutput(`${id}-linuxWebAppName`, scope, linuxWebApp.name);
89
- createAzureTfOutput(`${id}-linuxWebAppFriendlyUniqueId`, scope, linuxWebApp.friendlyUniqueId);
90
- createAzureTfOutput(`${id}-linuxWebAppId`, scope, linuxWebApp.id);
91
- createAzureTfOutput(`${id}-linuxWebAppDefaultHostname`, scope, linuxWebApp.defaultHostname);
92
- return linuxWebApp;
80
+ }, { parent: scope });
93
81
  }
94
82
  }
@@ -1,6 +1,6 @@
1
- import { ServicePlanConfig } from '@cdktf/provider-azurerm/lib/service-plan/index.js';
2
- import { LinuxWebAppConfig } from '@cdktf/provider-azurerm/lib/linux-web-app/index.js';
3
- export interface ServicePlanProps extends ServicePlanConfig {
1
+ import { AppServicePlanArgs } from '@pulumi/azure-native/web/index.js';
2
+ import { WebAppArgs } from '@pulumi/azure-native/web/index.js';
3
+ export interface ServicePlanProps extends AppServicePlanArgs {
4
4
  }
5
- export interface LinuxWebAppProps extends LinuxWebAppConfig {
5
+ export interface LinuxWebAppProps extends WebAppArgs {
6
6
  }
@@ -1,19 +1,18 @@
1
- import { ApplicationInsights } from '@cdktf/provider-azurerm/lib/application-insights/index.js';
2
1
  import { CommonAzureConstruct } from '../../common/index.js';
3
2
  import { ApplicationInsightsProps } from './types.js';
4
3
  /**
5
- * @classdesc Provides operations on Azure Application Insights
4
+ * @classdesc Provides operations on Azure Application Insights using Pulumi
6
5
  * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
7
6
  * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
8
7
  * @example
9
- * ```
8
+ * ```typescript
10
9
  * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
11
10
  *
12
11
  * class CustomConstruct extends CommonAzureConstruct {
13
- * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
14
- * super(parent, id, props)
12
+ * constructor(name: string, props: CommonAzureStackProps) {
13
+ * super(name, props)
15
14
  * this.props = props
16
- * this.applicationInsightseManager.createApplicationInsights('MyApplicationInsights', this, props)
15
+ * this.applicationInsightsManager.createApplicationInsights('MyApplicationInsights', this, props)
17
16
  * }
18
17
  * }
19
18
  * ```
@@ -24,7 +23,7 @@ export declare class AzureApplicationInsightsManager {
24
23
  * @param id scoped id of the resource
25
24
  * @param scope scope in which this resource is defined
26
25
  * @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}
26
+ * @see [Pulumi Azure Native Application Insights Component]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/insights/component/}
28
27
  */
29
- createApplicationInsights(id: string, scope: CommonAzureConstruct, props: ApplicationInsightsProps): ApplicationInsights;
28
+ createComponent(id: string, scope: CommonAzureConstruct, props: ApplicationInsightsProps): import("@pulumi/azure-native/applicationinsights/component.js").Component;
30
29
  }
@@ -1,19 +1,17 @@
1
- import { ApplicationInsights } from '@cdktf/provider-azurerm/lib/application-insights/index.js';
2
- import { DataAzurermResourceGroup } from '@cdktf/provider-azurerm/lib/data-azurerm-resource-group/index.js';
3
- import { createAzureTfOutput } from '../../utils/index.js';
1
+ import { ApplicationType, Component } from '@pulumi/azure-native/applicationinsights/index.js';
4
2
  /**
5
- * @classdesc Provides operations on Azure Application Insights
3
+ * @classdesc Provides operations on Azure Application Insights using Pulumi
6
4
  * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
7
5
  * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
8
6
  * @example
9
- * ```
7
+ * ```typescript
10
8
  * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
11
9
  *
12
10
  * class CustomConstruct extends CommonAzureConstruct {
13
- * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
14
- * super(parent, id, props)
11
+ * constructor(name: string, props: CommonAzureStackProps) {
12
+ * super(name, props)
15
13
  * this.props = props
16
- * this.applicationInsightseManager.createApplicationInsights('MyApplicationInsights', this, props)
14
+ * this.applicationInsightsManager.createApplicationInsights('MyApplicationInsights', this, props)
17
15
  * }
18
16
  * }
19
17
  * ```
@@ -24,30 +22,26 @@ export class AzureApplicationInsightsManager {
24
22
  * @param id scoped id of the resource
25
23
  * @param scope scope in which this resource is defined
26
24
  * @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}
25
+ * @see [Pulumi Azure Native Application Insights Component]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/insights/component/}
28
26
  */
29
- createApplicationInsights(id, scope, props) {
27
+ createComponent(id, scope, props) {
30
28
  if (!props)
31
29
  throw `Props undefined for ${id}`;
32
- const resourceGroup = new DataAzurermResourceGroup(scope, `${id}-ai-rg`, {
33
- name: scope.props.resourceGroupName
34
- ? `${scope.props.resourceGroupName}-${scope.props.stage}`
35
- : `${props.resourceGroupName}`,
36
- });
37
- if (!resourceGroup)
38
- throw `Resource group undefined for ${id}`;
39
- const applicationInsights = new ApplicationInsights(scope, `${id}-ai`, {
30
+ // Get resource group name
31
+ const resourceGroupName = scope.props.resourceGroupName
32
+ ? `${scope.props.resourceGroupName}-${scope.props.stage}`
33
+ : props.resourceGroupName;
34
+ if (!resourceGroupName)
35
+ throw `Resource group name undefined for ${id}`;
36
+ return new Component(`${id}-ai`, {
40
37
  ...props,
41
- name: scope.resourceNameFormatter.format(props.name ?? '', scope.props.resourceNameOptions?.applicationInsights),
42
- resourceGroupName: resourceGroup.name,
43
- applicationType: props.applicationType ?? 'web',
38
+ resourceName: scope.resourceNameFormatter.format(props.resourceName?.toString(), scope.props.resourceNameOptions?.applicationInsights),
39
+ resourceGroupName: resourceGroupName,
40
+ applicationType: props.applicationType ?? ApplicationType.Web,
41
+ kind: props.kind ?? 'web',
44
42
  tags: props.tags ?? {
45
43
  environment: scope.props.stage,
46
44
  },
47
- });
48
- createAzureTfOutput(`${id}-applicationInsightsName`, scope, applicationInsights.name);
49
- createAzureTfOutput(`${id}-applicationInsightsFriendlyUniqueId`, scope, applicationInsights.friendlyUniqueId);
50
- createAzureTfOutput(`${id}-applicationInsightsId`, scope, applicationInsights.id);
51
- return applicationInsights;
45
+ }, { parent: scope });
52
46
  }
53
47
  }
@@ -1,5 +1,3 @@
1
- import { ApplicationInsightsConfig } from '@cdktf/provider-azurerm/lib/application-insights/index.js';
2
- export interface ApplicationInsightsProps extends Omit<ApplicationInsightsConfig, 'applicationType' | 'name'> {
3
- name?: string | undefined;
4
- applicationType?: string | undefined;
1
+ import { ComponentArgs } from '@pulumi/azure-native/applicationinsights/index.js';
2
+ export interface ApplicationInsightsProps extends ComponentArgs {
5
3
  }
@@ -1,21 +1,18 @@
1
- import { CosmosdbAccount } from '@cdktf/provider-azurerm/lib/cosmosdb-account/index.js';
2
- import { CosmosdbSqlContainer } from '@cdktf/provider-azurerm/lib/cosmosdb-sql-container/index.js';
3
- import { CosmosdbSqlDatabase } from '@cdktf/provider-azurerm/lib/cosmosdb-sql-database/index.js';
4
1
  import { CommonAzureConstruct } from '../../common/index.js';
5
2
  import { CosmosdbAccountProps, CosmosdbSqlContainerProps, CosmosdbSqlDatabaseProps } from './types.js';
6
3
  /**
7
- * @classdesc Provides operations on Azure CosmosDB
4
+ * @classdesc Provides operations on Azure CosmosDB using Pulumi
8
5
  * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
9
6
  * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
10
7
  * @example
11
- * ```
8
+ * ```typescript
12
9
  * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
13
10
  *
14
11
  * class CustomConstruct extends CommonAzureConstruct {
15
- * constructor(parent: Construct, id: string, props: CommonAzureStackProps) {
16
- * super(parent, id, props)
12
+ * constructor(name: string, props: CommonAzureStackProps) {
13
+ * super(name, props)
17
14
  * this.props = props
18
- * this.CosmosDbManager.createCosmosAccount('MyCosmosDb', this, props)
15
+ * this.CosmosDbManager.createCosmosDbAccount('MyCosmosDb', this, props)
19
16
  * }
20
17
  * }
21
18
  * ```
@@ -26,23 +23,23 @@ export declare class AzureCosmosDbManager {
26
23
  * @param id scoped id of the resource
27
24
  * @param scope scope in which this resource is defined
28
25
  * @param props cosmosdb account properties
29
- * @see [CDKTF CosmosDb Account Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/cosmosdbAccount.typescript.md}
26
+ * @see [Pulumi Azure Native CosmosDB Account]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/documentdb/databaseaccount/}
30
27
  */
31
- createCosmosDbAccount(id: string, scope: CommonAzureConstruct, props: CosmosdbAccountProps): CosmosdbAccount;
28
+ createCosmosDbAccount(id: string, scope: CommonAzureConstruct, props: CosmosdbAccountProps): import("@pulumi/azure-native/cosmosdb/databaseAccount.js").DatabaseAccount;
32
29
  /**
33
30
  * @summary Method to create a new cosmosdb database
34
31
  * @param id scoped id of the resource
35
32
  * @param scope scope in which this resource is defined
36
- * @param props cosmosdb container properties
37
- * @see [CDKTF CosmosDb Container Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/cosmosdbSqlContainer.typescript.md}
33
+ * @param props cosmosdb database properties
34
+ * @see [Pulumi Azure Native CosmosDB SQL Database]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/documentdb/sqlresourcesqldatabase/}
38
35
  */
39
- createCosmosDbDatabase(id: string, scope: CommonAzureConstruct, props: CosmosdbSqlDatabaseProps): CosmosdbSqlDatabase;
36
+ createCosmosDbDatabase(id: string, scope: CommonAzureConstruct, props: CosmosdbSqlDatabaseProps): import("@pulumi/azure-native/cosmosdb/sqlResourceSqlDatabase.js").SqlResourceSqlDatabase;
40
37
  /**
41
38
  * @summary Method to create a new cosmosdb container
42
39
  * @param id scoped id of the resource
43
40
  * @param scope scope in which this resource is defined
44
41
  * @param props cosmosdb container properties
45
- * @see [CDKTF CosmosDb Container Module]{@link https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/cosmosdbSqlContainer.typescript.md}
42
+ * @see [Pulumi Azure Native CosmosDB SQL Container]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/documentdb/sqlresourcesqlcontainer/}
46
43
  */
47
- createCosmosDbContainer(id: string, scope: CommonAzureConstruct, props: CosmosdbSqlContainerProps): CosmosdbSqlContainer;
44
+ createCosmosDbContainer(id: string, scope: CommonAzureConstruct, props: CosmosdbSqlContainerProps): import("@pulumi/azure-native/cosmosdb/sqlResourceSqlContainer.js").SqlResourceSqlContainer;
48
45
  }