@gradientedge/cdk-utils 10.6.0 → 10.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/api-destined-function/src/lib/lambda.d.ts +1 -0
- package/dist/app/api-destined-function/src/lib/lambda.d.ts.map +1 -0
- package/dist/app/api-destined-function/src/lib/lambda.js +1 -0
- package/dist/app/api-destined-function/src/lib/lambda.js.map +1 -0
- package/dist/app/api-destined-function/tsconfig.tsbuildinfo +1 -0
- package/dist/src/lib/aws/services/cloudwatch/main.d.ts +11 -11
- package/dist/src/lib/azure/common/constants.d.ts +74 -0
- package/dist/src/lib/azure/common/constants.js +77 -0
- package/dist/src/lib/azure/common/construct.d.ts +15 -3
- package/dist/src/lib/azure/common/construct.js +40 -4
- package/dist/src/lib/azure/common/stack.d.ts +3 -2
- package/dist/src/lib/azure/common/stack.js +25 -42
- package/dist/src/lib/azure/common/types.d.ts +13 -2
- package/dist/src/lib/azure/construct/event-handler/index.d.ts +2 -0
- package/dist/src/lib/azure/construct/event-handler/index.js +2 -0
- package/dist/src/lib/azure/construct/event-handler/main.d.ts +20 -0
- package/dist/src/lib/azure/construct/event-handler/main.js +139 -0
- package/dist/src/lib/azure/construct/event-handler/types.d.ts +35 -0
- package/dist/src/lib/azure/construct/event-handler/types.js +1 -0
- package/dist/src/lib/azure/construct/function-app/index.d.ts +2 -0
- package/dist/src/lib/azure/construct/function-app/index.js +2 -0
- package/dist/src/lib/azure/construct/function-app/main.d.ts +51 -0
- package/dist/src/lib/azure/construct/function-app/main.js +297 -0
- package/dist/src/lib/azure/construct/function-app/types.d.ts +33 -0
- package/dist/src/lib/azure/construct/function-app/types.js +1 -0
- package/dist/src/lib/azure/construct/index.d.ts +6 -0
- package/dist/src/lib/azure/construct/index.js +6 -0
- package/dist/src/lib/azure/construct/rest-api/index.d.ts +2 -0
- package/dist/src/lib/azure/construct/rest-api/index.js +2 -0
- package/dist/src/lib/azure/construct/rest-api/main.d.ts +20 -0
- package/dist/src/lib/azure/construct/rest-api/main.js +172 -0
- package/dist/src/lib/azure/construct/rest-api/types.d.ts +25 -0
- package/dist/src/lib/azure/construct/rest-api/types.js +1 -0
- package/dist/src/lib/azure/construct/rest-api-function/index.d.ts +2 -0
- package/dist/src/lib/azure/construct/rest-api-function/index.js +2 -0
- package/dist/src/lib/azure/construct/rest-api-function/main.d.ts +19 -0
- package/dist/src/lib/azure/construct/rest-api-function/main.js +255 -0
- package/dist/src/lib/azure/construct/rest-api-function/types.d.ts +29 -0
- package/dist/src/lib/azure/construct/rest-api-function/types.js +1 -0
- package/dist/src/lib/azure/construct/rest-api-with-cache/index.d.ts +2 -0
- package/dist/src/lib/azure/construct/rest-api-with-cache/index.js +2 -0
- package/dist/src/lib/azure/construct/rest-api-with-cache/main.d.ts +12 -0
- package/dist/src/lib/azure/construct/rest-api-with-cache/main.js +56 -0
- package/dist/src/lib/azure/construct/rest-api-with-cache/types.d.ts +13 -0
- package/dist/src/lib/azure/construct/rest-api-with-cache/types.js +1 -0
- package/dist/src/lib/azure/construct/site-with-webapp/index.d.ts +2 -0
- package/dist/src/lib/azure/construct/site-with-webapp/index.js +2 -0
- package/dist/src/lib/azure/construct/site-with-webapp/main.d.ts +19 -0
- package/dist/src/lib/azure/construct/site-with-webapp/main.js +135 -0
- package/dist/src/lib/azure/construct/site-with-webapp/types.d.ts +30 -0
- package/dist/src/lib/azure/construct/site-with-webapp/types.js +1 -0
- package/dist/src/lib/azure/index.d.ts +1 -0
- package/dist/src/lib/azure/index.js +1 -0
- package/dist/src/lib/azure/services/api-management/main.d.ts +83 -5
- package/dist/src/lib/azure/services/api-management/main.js +114 -148
- package/dist/src/lib/azure/services/api-management/types.d.ts +22 -1
- package/dist/src/lib/azure/services/app-configuration/main.d.ts +13 -1
- package/dist/src/lib/azure/services/app-configuration/main.js +21 -2
- package/dist/src/lib/azure/services/app-service/main.d.ts +5 -2
- package/dist/src/lib/azure/services/app-service/main.js +12 -4
- package/dist/src/lib/azure/services/application-insights/main.d.ts +15 -4
- package/dist/src/lib/azure/services/application-insights/main.js +27 -6
- package/dist/src/lib/azure/services/application-insights/types.d.ts +4 -1
- package/dist/src/lib/azure/services/authorisation/constants.d.ts +13 -0
- package/dist/src/lib/azure/services/authorisation/constants.js +14 -0
- package/dist/src/lib/azure/services/authorisation/index.d.ts +3 -0
- package/dist/src/lib/azure/services/authorisation/index.js +3 -0
- package/dist/src/lib/azure/services/authorisation/main.d.ts +84 -0
- package/dist/src/lib/azure/services/authorisation/main.js +120 -0
- package/dist/src/lib/azure/services/authorisation/types.d.ts +3 -0
- package/dist/src/lib/azure/services/authorisation/types.js +1 -0
- package/dist/src/lib/azure/services/cosmosdb/constants.d.ts +8 -0
- package/dist/src/lib/azure/services/cosmosdb/constants.js +10 -0
- package/dist/src/lib/azure/services/cosmosdb/index.d.ts +1 -0
- package/dist/src/lib/azure/services/cosmosdb/index.js +1 -0
- package/dist/src/lib/azure/services/cosmosdb/main.d.ts +47 -5
- package/dist/src/lib/azure/services/cosmosdb/main.js +77 -8
- package/dist/src/lib/azure/services/cosmosdb/types.d.ts +3 -1
- package/dist/src/lib/azure/services/dns/main.d.ts +9 -4
- package/dist/src/lib/azure/services/dns/main.js +12 -8
- package/dist/src/lib/azure/services/eventgrid/main.d.ts +12 -7
- package/dist/src/lib/azure/services/eventgrid/main.js +18 -19
- package/dist/src/lib/azure/services/function/main.d.ts +16 -3
- package/dist/src/lib/azure/services/function/main.js +122 -8
- package/dist/src/lib/azure/services/function/types.d.ts +3 -4
- package/dist/src/lib/azure/services/index.d.ts +3 -0
- package/dist/src/lib/azure/services/index.js +3 -0
- package/dist/src/lib/azure/services/key-vault/main.d.ts +22 -2
- package/dist/src/lib/azure/services/key-vault/main.js +28 -3
- package/dist/src/lib/azure/services/key-vault/types.d.ts +3 -2
- package/dist/src/lib/azure/services/monitor/main.d.ts +3 -1
- package/dist/src/lib/azure/services/monitor/main.js +3 -2
- package/dist/src/lib/azure/services/operational-insights/main.d.ts +13 -2
- package/dist/src/lib/azure/services/operational-insights/main.js +17 -3
- package/dist/src/lib/azure/services/operational-insights/types.d.ts +3 -1
- package/dist/src/lib/azure/services/portal/error.d.ts +5 -0
- package/dist/src/lib/azure/services/portal/error.js +10 -0
- package/dist/src/lib/azure/services/portal/index.d.ts +4 -0
- package/dist/src/lib/azure/services/portal/index.js +4 -0
- package/dist/src/lib/azure/services/portal/main.d.ts +33 -0
- package/dist/src/lib/azure/services/portal/main.js +51 -0
- package/dist/src/lib/azure/services/portal/renderer.d.ts +11 -0
- package/dist/src/lib/azure/services/portal/renderer.js +156 -0
- package/dist/src/lib/azure/services/portal/types.d.ts +40 -0
- package/dist/src/lib/azure/services/portal/types.js +1 -0
- package/dist/src/lib/azure/services/redis/main.d.ts +4 -2
- package/dist/src/lib/azure/services/redis/main.js +3 -2
- package/dist/src/lib/azure/services/redis/types.d.ts +1 -1
- package/dist/src/lib/azure/services/resource-group/main.d.ts +10 -1
- package/dist/src/lib/azure/services/resource-group/main.js +17 -3
- package/dist/src/lib/azure/services/security-center/index.d.ts +2 -0
- package/dist/src/lib/azure/services/security-center/index.js +2 -0
- package/dist/src/lib/azure/services/security-center/main.d.ts +31 -0
- package/dist/src/lib/azure/services/security-center/main.js +33 -0
- package/dist/src/lib/azure/services/security-center/types.d.ts +3 -0
- package/dist/src/lib/azure/services/security-center/types.js +1 -0
- package/dist/src/lib/azure/services/servicebus/main.d.ts +28 -22
- package/dist/src/lib/azure/services/servicebus/main.js +31 -26
- package/dist/src/lib/azure/services/servicebus/types.d.ts +4 -4
- package/dist/src/lib/azure/services/storage/main.d.ts +26 -5
- package/dist/src/lib/azure/services/storage/main.js +51 -9
- package/dist/src/lib/azure/services/storage/types.d.ts +7 -2
- package/dist/src/lib/cloudflare/common/construct.js +1 -1
- package/dist/src/lib/cloudflare/common/stack.d.ts +2 -2
- package/dist/src/lib/cloudflare/common/stack.js +25 -25
- package/dist/src/lib/cloudflare/services/worker/main.js +8 -1
- package/dist/src/lib/cloudflare/services/worker/types.d.ts +1 -0
- package/package.json +26 -23
- package/src/lib/azure/common/constants.ts +83 -0
- package/src/lib/azure/common/construct.ts +50 -7
- package/src/lib/azure/common/stack.ts +26 -43
- package/src/lib/azure/common/types.ts +14 -2
- package/src/lib/azure/construct/event-handler/index.ts +2 -0
- package/src/lib/azure/construct/event-handler/main.ts +183 -0
- package/src/lib/azure/construct/event-handler/types.ts +49 -0
- package/src/lib/azure/construct/function-app/index.ts +2 -0
- package/src/lib/azure/construct/function-app/main.ts +410 -0
- package/src/lib/azure/construct/function-app/types.ts +45 -0
- package/src/lib/azure/construct/index.ts +6 -0
- package/src/lib/azure/construct/rest-api/index.ts +2 -0
- package/src/lib/azure/construct/rest-api/main.ts +205 -0
- package/src/lib/azure/construct/rest-api/types.ts +33 -0
- package/src/lib/azure/construct/rest-api-function/index.ts +2 -0
- package/src/lib/azure/construct/rest-api-function/main.ts +297 -0
- package/src/lib/azure/construct/rest-api-function/types.ts +39 -0
- package/src/lib/azure/construct/rest-api-with-cache/index.ts +2 -0
- package/src/lib/azure/construct/rest-api-with-cache/main.ts +75 -0
- package/src/lib/azure/construct/rest-api-with-cache/types.ts +15 -0
- package/src/lib/azure/construct/site-with-webapp/index.ts +2 -0
- package/src/lib/azure/construct/site-with-webapp/main.ts +160 -0
- package/src/lib/azure/construct/site-with-webapp/types.ts +33 -0
- package/src/lib/azure/index.ts +1 -0
- package/src/lib/azure/services/api-management/main.ts +168 -152
- package/src/lib/azure/services/api-management/types.ts +30 -1
- package/src/lib/azure/services/app-configuration/main.ts +29 -2
- package/src/lib/azure/services/app-service/main.ts +23 -4
- package/src/lib/azure/services/application-insights/main.ts +46 -7
- package/src/lib/azure/services/application-insights/types.ts +6 -2
- package/src/lib/azure/services/authorisation/constants.ts +13 -0
- package/src/lib/azure/services/authorisation/index.ts +3 -0
- package/src/lib/azure/services/authorisation/main.ts +202 -0
- package/src/lib/azure/services/authorisation/types.ts +3 -0
- package/src/lib/azure/services/cosmosdb/constants.ts +9 -0
- package/src/lib/azure/services/cosmosdb/index.ts +1 -0
- package/src/lib/azure/services/cosmosdb/main.ts +158 -8
- package/src/lib/azure/services/cosmosdb/types.ts +3 -0
- package/src/lib/azure/services/dns/main.ts +33 -8
- package/src/lib/azure/services/eventgrid/main.ts +41 -23
- package/src/lib/azure/services/function/main.ts +155 -9
- package/src/lib/azure/services/function/types.ts +3 -4
- package/src/lib/azure/services/index.ts +3 -0
- package/src/lib/azure/services/key-vault/main.ts +47 -4
- package/src/lib/azure/services/key-vault/types.ts +4 -4
- package/src/lib/azure/services/monitor/main.ts +5 -2
- package/src/lib/azure/services/operational-insights/main.ts +30 -4
- package/src/lib/azure/services/operational-insights/types.ts +3 -1
- package/src/lib/azure/services/portal/error.ts +12 -0
- package/src/lib/azure/services/portal/index.ts +4 -0
- package/src/lib/azure/services/portal/main.ts +81 -0
- package/src/lib/azure/services/portal/renderer.ts +182 -0
- package/src/lib/azure/services/portal/types.ts +45 -0
- package/src/lib/azure/services/redis/main.ts +10 -3
- package/src/lib/azure/services/redis/types.ts +1 -1
- package/src/lib/azure/services/resource-group/main.ts +34 -3
- package/src/lib/azure/services/security-center/index.ts +2 -0
- package/src/lib/azure/services/security-center/main.ts +42 -0
- package/src/lib/azure/services/security-center/types.ts +3 -0
- package/src/lib/azure/services/servicebus/main.ts +61 -30
- package/src/lib/azure/services/servicebus/types.ts +4 -4
- package/src/lib/azure/services/storage/main.ts +91 -9
- package/src/lib/azure/services/storage/types.ts +11 -2
- package/src/lib/cloudflare/common/construct.ts +1 -1
- package/src/lib/cloudflare/common/stack.ts +25 -25
- package/src/lib/cloudflare/services/worker/main.ts +10 -1
- package/src/lib/cloudflare/services/worker/types.ts +8 -1
- package/dist/lib/lambda.d.ts +0 -17
- package/dist/lib/lambda.d.ts.map +0 -1
- package/dist/lib/lambda.js +0 -28
- package/dist/lib/lambda.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lambda.d.ts","sourceRoot":"","sources":["../../../../../app/api-destined-function/src/lib/lambda.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,GAAI,OAAO,GAAG;;;;;;;;;;;;;;;CAmBtC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lambda.js","sourceRoot":"","sources":["../../../../../app/api-destined-function/src/lib/lambda.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAA;AAEnC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAU,EAAE,EAAE;IACzC,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAA;IAE5C,OAAO;QACL,IAAI,EAAE;YACJ,KAAK,EAAE,KAAK;SACb;QACD,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,EAAE,EAAE,MAAM,EAAE;QACZ,OAAO,EAAE,yBAAyB;QAClC,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM;QAC7B,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO;QAC/B,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,MAAM,EAAE,4BAA4B;QACpC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS;QAC/B,UAAU,EAAE,GAAG;QACf,OAAO,EAAE,IAAI;KACd,CAAA;AACH,CAAC,CAAA;AAED,OAAO,CAAC,OAAO,GAAG,KAAK,EAAE,KAAU,EAAE,OAAY,EAAE,QAAa,EAAE,EAAE;IAClE,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAA;IAC5C,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;IAChD,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;IAC5D,OAAO,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAA;AAC5C,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../../../app/api-destined-function/src/lib/lambda.ts","../../../app/api-destined-function/src/test/lambda.test.ts"],"version":"6.0.2"}
|
|
@@ -55,7 +55,7 @@ export declare class CloudWatchManager {
|
|
|
55
55
|
* @param scope scope in which this resource is defined
|
|
56
56
|
* @param props
|
|
57
57
|
*/
|
|
58
|
-
createWidget(id: string, scope: CommonConstruct, props: any): cdk.aws_cloudwatch.
|
|
58
|
+
createWidget(id: string, scope: CommonConstruct, props: any): cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.AlarmStatusWidget | cdk.aws_cloudwatch.LogQueryWidget;
|
|
59
59
|
/**
|
|
60
60
|
* @summary Method to create a cloudfront distribution widget
|
|
61
61
|
* @param id scoped id of the resource
|
|
@@ -63,7 +63,7 @@ export declare class CloudWatchManager {
|
|
|
63
63
|
* @param props
|
|
64
64
|
* @param distributionId the cloudfront distribution id
|
|
65
65
|
*/
|
|
66
|
-
createCloudfrontDistributionWidget(id: string, scope: CommonConstruct, props: any, distributionId: string): cdk.aws_cloudwatch.
|
|
66
|
+
createCloudfrontDistributionWidget(id: string, scope: CommonConstruct, props: any, distributionId: string): cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.AlarmStatusWidget | cdk.aws_cloudwatch.LogQueryWidget;
|
|
67
67
|
/**
|
|
68
68
|
* @summary Method to create a step function widget
|
|
69
69
|
* @param id scoped id of the resource
|
|
@@ -71,7 +71,7 @@ export declare class CloudWatchManager {
|
|
|
71
71
|
* @param props
|
|
72
72
|
* @param stateMachineArn the step function arn
|
|
73
73
|
*/
|
|
74
|
-
createStateWidget(id: string, scope: CommonConstruct, props: any, stateMachineArn: string): cdk.aws_cloudwatch.
|
|
74
|
+
createStateWidget(id: string, scope: CommonConstruct, props: any, stateMachineArn: string): cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.AlarmStatusWidget | cdk.aws_cloudwatch.LogQueryWidget;
|
|
75
75
|
/**
|
|
76
76
|
* @summary Method to create an event widget
|
|
77
77
|
* @param id scoped id of the resource
|
|
@@ -80,7 +80,7 @@ export declare class CloudWatchManager {
|
|
|
80
80
|
* @param eventBusName the event bus name
|
|
81
81
|
* @param ruleName the event rule name
|
|
82
82
|
*/
|
|
83
|
-
createEventWidget(id: string, scope: CommonConstruct, props: any, eventBusName: string, ruleName: string): cdk.aws_cloudwatch.
|
|
83
|
+
createEventWidget(id: string, scope: CommonConstruct, props: any, eventBusName: string, ruleName: string): cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.AlarmStatusWidget | cdk.aws_cloudwatch.LogQueryWidget;
|
|
84
84
|
/**
|
|
85
85
|
* @summary Method to create an api gateway widget
|
|
86
86
|
* @param id scoped id of the resource
|
|
@@ -88,7 +88,7 @@ export declare class CloudWatchManager {
|
|
|
88
88
|
* @param props
|
|
89
89
|
* @param apiName the api name
|
|
90
90
|
*/
|
|
91
|
-
createApiGatewayWidget(id: string, scope: CommonConstruct, props: any, apiName: string): cdk.aws_cloudwatch.
|
|
91
|
+
createApiGatewayWidget(id: string, scope: CommonConstruct, props: any, apiName: string): cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.AlarmStatusWidget | cdk.aws_cloudwatch.LogQueryWidget;
|
|
92
92
|
/**
|
|
93
93
|
* @summary Method to create a lambda function widget
|
|
94
94
|
* @param id scoped id of the resource
|
|
@@ -96,7 +96,7 @@ export declare class CloudWatchManager {
|
|
|
96
96
|
* @param props
|
|
97
97
|
* @param functionName the lambda function name
|
|
98
98
|
*/
|
|
99
|
-
createLambdaWidget(id: string, scope: CommonConstruct, props: any, functionName: string): cdk.aws_cloudwatch.
|
|
99
|
+
createLambdaWidget(id: string, scope: CommonConstruct, props: any, functionName: string): cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.AlarmStatusWidget | cdk.aws_cloudwatch.LogQueryWidget;
|
|
100
100
|
/**
|
|
101
101
|
* @summary Method to create a custom widget
|
|
102
102
|
* @param id scoped id of the resource
|
|
@@ -104,7 +104,7 @@ export declare class CloudWatchManager {
|
|
|
104
104
|
* @param props
|
|
105
105
|
* @param service the service identifier
|
|
106
106
|
*/
|
|
107
|
-
createCustomWidget(id: string, scope: CommonConstruct, props: any, service: string): cdk.aws_cloudwatch.
|
|
107
|
+
createCustomWidget(id: string, scope: CommonConstruct, props: any, service: string): cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.AlarmStatusWidget | cdk.aws_cloudwatch.LogQueryWidget;
|
|
108
108
|
/**
|
|
109
109
|
* @summary Method to create an ecs cluster widget
|
|
110
110
|
* @param id scoped id of the resource
|
|
@@ -112,7 +112,7 @@ export declare class CloudWatchManager {
|
|
|
112
112
|
* @param props
|
|
113
113
|
* @param clusterName the ecs cluster name
|
|
114
114
|
*/
|
|
115
|
-
createEcsClusterWidget(id: string, scope: CommonConstruct, props: any, clusterName: string): cdk.aws_cloudwatch.
|
|
115
|
+
createEcsClusterWidget(id: string, scope: CommonConstruct, props: any, clusterName: string): cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.AlarmStatusWidget | cdk.aws_cloudwatch.LogQueryWidget;
|
|
116
116
|
/**
|
|
117
117
|
* @summary Method to create an ecs service widget
|
|
118
118
|
* @param id scoped id of the resource
|
|
@@ -121,7 +121,7 @@ export declare class CloudWatchManager {
|
|
|
121
121
|
* @param clusterName the ecs cluster name
|
|
122
122
|
* @param serviceName the ecs service name
|
|
123
123
|
*/
|
|
124
|
-
createEcsServiceWidget(id: string, scope: CommonConstruct, props: any, clusterName: string, serviceName: string): cdk.aws_cloudwatch.
|
|
124
|
+
createEcsServiceWidget(id: string, scope: CommonConstruct, props: any, clusterName: string, serviceName: string): cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.AlarmStatusWidget | cdk.aws_cloudwatch.LogQueryWidget;
|
|
125
125
|
/**
|
|
126
126
|
* @summary Method to create an elb widget
|
|
127
127
|
* @param id scoped id of the resource
|
|
@@ -129,7 +129,7 @@ export declare class CloudWatchManager {
|
|
|
129
129
|
* @param props
|
|
130
130
|
* @param loadBalancer the loadbalancer reference
|
|
131
131
|
*/
|
|
132
|
-
createElbWidget(id: string, scope: CommonConstruct, props: any, loadBalancer: string): cdk.aws_cloudwatch.
|
|
132
|
+
createElbWidget(id: string, scope: CommonConstruct, props: any, loadBalancer: string): cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.AlarmStatusWidget | cdk.aws_cloudwatch.LogQueryWidget;
|
|
133
133
|
/**
|
|
134
134
|
* @summary Method to create an elasticache widget
|
|
135
135
|
* @param id scoped id of the resource
|
|
@@ -137,7 +137,7 @@ export declare class CloudWatchManager {
|
|
|
137
137
|
* @param props
|
|
138
138
|
* @param cacheClusterId the elasticache cluster id
|
|
139
139
|
*/
|
|
140
|
-
createCacheWidget(id: string, scope: CommonConstruct, props: any, cacheClusterId: string): cdk.aws_cloudwatch.
|
|
140
|
+
createCacheWidget(id: string, scope: CommonConstruct, props: any, cacheClusterId: string): cdk.aws_cloudwatch.TextWidget | cdk.aws_cloudwatch.SingleValueWidget | cdk.aws_cloudwatch.GaugeWidget | cdk.aws_cloudwatch.GraphWidget | cdk.aws_cloudwatch.AlarmStatusWidget | cdk.aws_cloudwatch.LogQueryWidget;
|
|
141
141
|
/**
|
|
142
142
|
* @summary Method to create a cloudwatch text widget
|
|
143
143
|
* @param id scoped id of the resource
|
|
@@ -7,3 +7,77 @@ export declare enum AzureRemoteBackend {
|
|
|
7
7
|
* List of Azure resources that excludes tags
|
|
8
8
|
*/
|
|
9
9
|
export declare const RESOURCES_TO_EXCLUDE_TAGS: Set<string>;
|
|
10
|
+
/**
|
|
11
|
+
* @see https://learn.microsoft.com/en-us/azure/reliability/regions-list?tabs=all
|
|
12
|
+
*/
|
|
13
|
+
export declare const AzureLocation: {
|
|
14
|
+
readonly BrazilSouth: "brazilsouth";
|
|
15
|
+
readonly BrazilSoutheast: "brazilsoutheast";
|
|
16
|
+
readonly CanadaCentral: "canadacentral";
|
|
17
|
+
readonly CanadaEast: "canadaeast";
|
|
18
|
+
readonly CentralUS: "centralus";
|
|
19
|
+
readonly EastUS: "eastus";
|
|
20
|
+
readonly EastUS2: "eastus2";
|
|
21
|
+
readonly MexicoCentral: "mexicocentral";
|
|
22
|
+
readonly NorthCentralUS: "northcentralus";
|
|
23
|
+
readonly SouthCentralUS: "southcentralus";
|
|
24
|
+
readonly USGovArizona: "usgovarizona";
|
|
25
|
+
readonly USGovTexas: "usgovtexas";
|
|
26
|
+
readonly USGovVirginia: "usgovvirginia";
|
|
27
|
+
readonly WestCentralUS: "westcentralus";
|
|
28
|
+
readonly WestUS: "westus";
|
|
29
|
+
readonly WestUS2: "westus2";
|
|
30
|
+
readonly WestUS3: "westus3";
|
|
31
|
+
readonly AustriaCentral: "austriacentral";
|
|
32
|
+
readonly BelgiumCentral: "belgiumcentral";
|
|
33
|
+
readonly DenmarkEast: "denmarkeast";
|
|
34
|
+
readonly FinlandCentral: "finlandcentral";
|
|
35
|
+
readonly FranceCentral: "francecentral";
|
|
36
|
+
readonly FranceSouth: "francesouth";
|
|
37
|
+
readonly GermanyNorth: "germanynorth";
|
|
38
|
+
readonly GermanyWestCentral: "germanywestcentral";
|
|
39
|
+
readonly GreeceHydra: "greecehydra";
|
|
40
|
+
readonly ItalyNorth: "italynorth";
|
|
41
|
+
readonly NorthEurope: "northeurope";
|
|
42
|
+
readonly NorwayEast: "norwayeast";
|
|
43
|
+
readonly NorwayWest: "norwaywest";
|
|
44
|
+
readonly PolandCentral: "polandcentral";
|
|
45
|
+
readonly SpainCentral: "spaincentral";
|
|
46
|
+
readonly SwedenCentral: "swedencentral";
|
|
47
|
+
readonly SwedenSouth: "swedensouth";
|
|
48
|
+
readonly SwitzerlandNorth: "switzerlandnorth";
|
|
49
|
+
readonly SwitzerlandWest: "switzerlandwest";
|
|
50
|
+
readonly UKSouth: "uksouth";
|
|
51
|
+
readonly UKWest: "ukwest";
|
|
52
|
+
readonly WestEurope: "westeurope";
|
|
53
|
+
readonly IsraelCentral: "israelcentral";
|
|
54
|
+
readonly QatarCentral: "qatarcentral";
|
|
55
|
+
readonly SouthAfricaNorth: "southafricanorth";
|
|
56
|
+
readonly SouthAfricaWest: "southafricawest";
|
|
57
|
+
readonly UAECentral: "uaecentral";
|
|
58
|
+
readonly UAENorth: "uaenorth";
|
|
59
|
+
readonly AustraliaCentral: "australiacentral";
|
|
60
|
+
readonly AustraliaCentral2: "australiacentral2";
|
|
61
|
+
readonly AustraliaEast: "australiaeast";
|
|
62
|
+
readonly AustraliaSoutheast: "australiasoutheast";
|
|
63
|
+
readonly CentralIndia: "centralindia";
|
|
64
|
+
readonly ChinaEast: "chinaeast";
|
|
65
|
+
readonly ChinaEast2: "chinaeast2";
|
|
66
|
+
readonly ChinaNorth: "chinanorth";
|
|
67
|
+
readonly ChinaNorth2: "chinanorth2";
|
|
68
|
+
readonly ChinaNorth3: "chinanorth3";
|
|
69
|
+
readonly EastAsia: "eastasia";
|
|
70
|
+
readonly JapanEast: "japaneast";
|
|
71
|
+
readonly JapanWest: "japanwest";
|
|
72
|
+
readonly KoreaCentral: "koreacentral";
|
|
73
|
+
readonly KoreaSouth: "koreasouth";
|
|
74
|
+
readonly MalaysiaSouth: "malaysiasouth";
|
|
75
|
+
readonly MalaysiaWest: "malaysiawest";
|
|
76
|
+
readonly NewZealandNorth: "newzealandnorth";
|
|
77
|
+
readonly SoutheastAsia: "southeastasia";
|
|
78
|
+
readonly SouthIndia: "southindia";
|
|
79
|
+
readonly TaiwanNorth: "taiwannorth";
|
|
80
|
+
readonly TaiwanNorthwest: "taiwannorthwest";
|
|
81
|
+
readonly WestIndia: "westindia";
|
|
82
|
+
};
|
|
83
|
+
export type AzureLocation = (typeof AzureLocation)[keyof typeof AzureLocation];
|
|
@@ -8,3 +8,80 @@ export var AzureRemoteBackend;
|
|
|
8
8
|
* List of Azure resources that excludes tags
|
|
9
9
|
*/
|
|
10
10
|
export const RESOURCES_TO_EXCLUDE_TAGS = new Set(['ApiManagementNamedValue', 'Application', 'ServicePrincipal']);
|
|
11
|
+
/**
|
|
12
|
+
* @see https://learn.microsoft.com/en-us/azure/reliability/regions-list?tabs=all
|
|
13
|
+
*/
|
|
14
|
+
export const AzureLocation = {
|
|
15
|
+
// Americas
|
|
16
|
+
BrazilSouth: 'brazilsouth',
|
|
17
|
+
BrazilSoutheast: 'brazilsoutheast',
|
|
18
|
+
CanadaCentral: 'canadacentral',
|
|
19
|
+
CanadaEast: 'canadaeast',
|
|
20
|
+
CentralUS: 'centralus',
|
|
21
|
+
EastUS: 'eastus',
|
|
22
|
+
EastUS2: 'eastus2',
|
|
23
|
+
MexicoCentral: 'mexicocentral',
|
|
24
|
+
NorthCentralUS: 'northcentralus',
|
|
25
|
+
SouthCentralUS: 'southcentralus',
|
|
26
|
+
USGovArizona: 'usgovarizona',
|
|
27
|
+
USGovTexas: 'usgovtexas',
|
|
28
|
+
USGovVirginia: 'usgovvirginia',
|
|
29
|
+
WestCentralUS: 'westcentralus',
|
|
30
|
+
WestUS: 'westus',
|
|
31
|
+
WestUS2: 'westus2',
|
|
32
|
+
WestUS3: 'westus3',
|
|
33
|
+
// Europe
|
|
34
|
+
AustriaCentral: 'austriacentral',
|
|
35
|
+
BelgiumCentral: 'belgiumcentral',
|
|
36
|
+
DenmarkEast: 'denmarkeast',
|
|
37
|
+
FinlandCentral: 'finlandcentral',
|
|
38
|
+
FranceCentral: 'francecentral',
|
|
39
|
+
FranceSouth: 'francesouth',
|
|
40
|
+
GermanyNorth: 'germanynorth',
|
|
41
|
+
GermanyWestCentral: 'germanywestcentral',
|
|
42
|
+
GreeceHydra: 'greecehydra',
|
|
43
|
+
ItalyNorth: 'italynorth',
|
|
44
|
+
NorthEurope: 'northeurope',
|
|
45
|
+
NorwayEast: 'norwayeast',
|
|
46
|
+
NorwayWest: 'norwaywest',
|
|
47
|
+
PolandCentral: 'polandcentral',
|
|
48
|
+
SpainCentral: 'spaincentral',
|
|
49
|
+
SwedenCentral: 'swedencentral',
|
|
50
|
+
SwedenSouth: 'swedensouth',
|
|
51
|
+
SwitzerlandNorth: 'switzerlandnorth',
|
|
52
|
+
SwitzerlandWest: 'switzerlandwest',
|
|
53
|
+
UKSouth: 'uksouth',
|
|
54
|
+
UKWest: 'ukwest',
|
|
55
|
+
WestEurope: 'westeurope',
|
|
56
|
+
// Middle East & Africa
|
|
57
|
+
IsraelCentral: 'israelcentral',
|
|
58
|
+
QatarCentral: 'qatarcentral',
|
|
59
|
+
SouthAfricaNorth: 'southafricanorth',
|
|
60
|
+
SouthAfricaWest: 'southafricawest',
|
|
61
|
+
UAECentral: 'uaecentral',
|
|
62
|
+
UAENorth: 'uaenorth',
|
|
63
|
+
// Asia Pacific
|
|
64
|
+
AustraliaCentral: 'australiacentral',
|
|
65
|
+
AustraliaCentral2: 'australiacentral2',
|
|
66
|
+
AustraliaEast: 'australiaeast',
|
|
67
|
+
AustraliaSoutheast: 'australiasoutheast',
|
|
68
|
+
CentralIndia: 'centralindia',
|
|
69
|
+
ChinaEast: 'chinaeast',
|
|
70
|
+
ChinaEast2: 'chinaeast2',
|
|
71
|
+
ChinaNorth: 'chinanorth',
|
|
72
|
+
ChinaNorth2: 'chinanorth2',
|
|
73
|
+
ChinaNorth3: 'chinanorth3',
|
|
74
|
+
EastAsia: 'eastasia',
|
|
75
|
+
JapanEast: 'japaneast',
|
|
76
|
+
JapanWest: 'japanwest',
|
|
77
|
+
KoreaCentral: 'koreacentral',
|
|
78
|
+
KoreaSouth: 'koreasouth',
|
|
79
|
+
MalaysiaSouth: 'malaysiasouth',
|
|
80
|
+
MalaysiaWest: 'malaysiawest',
|
|
81
|
+
NewZealandNorth: 'newzealandnorth',
|
|
82
|
+
SoutheastAsia: 'southeastasia',
|
|
83
|
+
SouthIndia: 'southindia',
|
|
84
|
+
TaiwanNorth: 'taiwannorth',
|
|
85
|
+
TaiwanNorthwest: 'taiwannorthwest',
|
|
86
|
+
WestIndia: 'westindia',
|
|
87
|
+
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { GetWorkspaceResult, Workspace } from '@pulumi/azure-native/operationalinsights/index.js';
|
|
2
|
+
import { ResourceGroup } from '@pulumi/azure-native/resources/index.js';
|
|
3
|
+
import * as pulumi from '@pulumi/pulumi';
|
|
4
|
+
import { ComponentResource, ComponentResourceOptions, Output } from '@pulumi/pulumi';
|
|
5
|
+
import { AzureAuthorisationManager } from '../services/authorisation/main.js';
|
|
6
|
+
import { AzureApiManagementManager, AzureAppConfigurationManager, AzureApplicationInsightsManager, AzureAppServiceManager, AzureCosmosDbManager, AzureDnsManager, AzureEventgridManager, AzureFunctionManager, AzureKeyVaultManager, AzureMonitorManager, AzureOperationalInsightsManager, AzurePortalManager, AzureRedisManager, AzureResourceGroupManager, AzureSecurityCentermanager, AzureServiceBusManager, AzureStorageManager } from '../services/index.js';
|
|
3
7
|
import { AzureResourceNameFormatter } from './resource-name-formatter.js';
|
|
4
8
|
import { CommonAzureStackProps } from './types.js';
|
|
5
9
|
/**
|
|
@@ -23,7 +27,9 @@ export declare class CommonAzureConstruct extends ComponentResource {
|
|
|
23
27
|
props: CommonAzureStackProps;
|
|
24
28
|
options?: ComponentResourceOptions;
|
|
25
29
|
id: string;
|
|
30
|
+
resourceGroup: ResourceGroup;
|
|
26
31
|
fullyQualifiedDomainName: string;
|
|
32
|
+
authorisationManager: AzureAuthorisationManager;
|
|
27
33
|
apiManagementManager: AzureApiManagementManager;
|
|
28
34
|
appConfigurationManager: AzureAppConfigurationManager;
|
|
29
35
|
appServiceManager: AzureAppServiceManager;
|
|
@@ -34,13 +40,19 @@ export declare class CommonAzureConstruct extends ComponentResource {
|
|
|
34
40
|
functionManager: AzureFunctionManager;
|
|
35
41
|
keyVaultManager: AzureKeyVaultManager;
|
|
36
42
|
operationalInsightsManager: AzureOperationalInsightsManager;
|
|
43
|
+
portalManager: AzurePortalManager;
|
|
37
44
|
monitorManager: AzureMonitorManager;
|
|
38
45
|
redisManager: AzureRedisManager;
|
|
39
46
|
resourceGroupManager: AzureResourceGroupManager;
|
|
40
47
|
resourceNameFormatter: AzureResourceNameFormatter;
|
|
41
|
-
|
|
48
|
+
securityCentermanager: AzureSecurityCentermanager;
|
|
49
|
+
serviceBusManager: AzureServiceBusManager;
|
|
42
50
|
storageManager: AzureStorageManager;
|
|
51
|
+
commonLogAnalyticsWorkspace: Workspace | Output<GetWorkspaceResult>;
|
|
43
52
|
constructor(name: string, props: CommonAzureStackProps, options?: ComponentResourceOptions);
|
|
53
|
+
protected resolveStack(stackName: string): pulumi.StackReference;
|
|
54
|
+
protected createResourceGroup(): void;
|
|
55
|
+
protected resolveCommonLogAnalyticsWorkspace(): void;
|
|
44
56
|
/**
|
|
45
57
|
* @summary Determine the fully qualified domain name based on domainName & subDomain
|
|
46
58
|
*/
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { getWorkspaceOutput } from '@pulumi/azure-native/operationalinsights/index.js';
|
|
2
|
+
import * as pulumi from '@pulumi/pulumi';
|
|
1
3
|
import { ComponentResource } from '@pulumi/pulumi';
|
|
2
4
|
import { isDevStage, isPrdStage, isTestStage, isUatStage } from '../../common/index.js';
|
|
3
|
-
import {
|
|
5
|
+
import { AzureAuthorisationManager } from '../services/authorisation/main.js';
|
|
6
|
+
import { AzureApiManagementManager, AzureAppConfigurationManager, AzureApplicationInsightsManager, AzureAppServiceManager, AzureCosmosDbManager, AzureDnsManager, AzureEventgridManager, AzureFunctionManager, AzureKeyVaultManager, AzureMonitorManager, AzureOperationalInsightsManager, AzurePortalManager, AzureRedisManager, AzureResourceGroupManager, AzureSecurityCentermanager, AzureServiceBusManager, AzureStorageManager, } from '../services/index.js';
|
|
4
7
|
import { AzureResourceNameFormatter } from './resource-name-formatter.js';
|
|
5
8
|
/**
|
|
6
9
|
* @classdesc Common Azure construct to use as a base for all higher level constructs using Pulumi
|
|
@@ -21,7 +24,9 @@ import { AzureResourceNameFormatter } from './resource-name-formatter.js';
|
|
|
21
24
|
*/
|
|
22
25
|
export class CommonAzureConstruct extends ComponentResource {
|
|
23
26
|
id;
|
|
27
|
+
resourceGroup;
|
|
24
28
|
fullyQualifiedDomainName;
|
|
29
|
+
authorisationManager;
|
|
25
30
|
apiManagementManager;
|
|
26
31
|
appConfigurationManager;
|
|
27
32
|
appServiceManager;
|
|
@@ -32,17 +37,21 @@ export class CommonAzureConstruct extends ComponentResource {
|
|
|
32
37
|
functionManager;
|
|
33
38
|
keyVaultManager;
|
|
34
39
|
operationalInsightsManager;
|
|
40
|
+
portalManager;
|
|
35
41
|
monitorManager;
|
|
36
42
|
redisManager;
|
|
37
43
|
resourceGroupManager;
|
|
38
44
|
resourceNameFormatter;
|
|
39
|
-
|
|
45
|
+
securityCentermanager;
|
|
46
|
+
serviceBusManager;
|
|
40
47
|
storageManager;
|
|
48
|
+
commonLogAnalyticsWorkspace;
|
|
41
49
|
constructor(name, props, options) {
|
|
42
|
-
super(`
|
|
50
|
+
super(`azure:${name}`, name, props, options);
|
|
43
51
|
this.props = props;
|
|
44
52
|
this.options = options;
|
|
45
53
|
this.id = name;
|
|
54
|
+
this.authorisationManager = new AzureAuthorisationManager();
|
|
46
55
|
this.apiManagementManager = new AzureApiManagementManager();
|
|
47
56
|
this.appConfigurationManager = new AzureAppConfigurationManager();
|
|
48
57
|
this.appServiceManager = new AzureAppServiceManager();
|
|
@@ -53,14 +62,41 @@ export class CommonAzureConstruct extends ComponentResource {
|
|
|
53
62
|
this.functionManager = new AzureFunctionManager();
|
|
54
63
|
this.keyVaultManager = new AzureKeyVaultManager();
|
|
55
64
|
this.operationalInsightsManager = new AzureOperationalInsightsManager();
|
|
65
|
+
this.portalManager = new AzurePortalManager();
|
|
56
66
|
this.monitorManager = new AzureMonitorManager();
|
|
57
67
|
this.redisManager = new AzureRedisManager();
|
|
58
68
|
this.resourceGroupManager = new AzureResourceGroupManager();
|
|
59
69
|
this.resourceNameFormatter = new AzureResourceNameFormatter(props);
|
|
60
|
-
this.
|
|
70
|
+
this.securityCentermanager = new AzureSecurityCentermanager();
|
|
71
|
+
this.serviceBusManager = new AzureServiceBusManager();
|
|
61
72
|
this.storageManager = new AzureStorageManager();
|
|
62
73
|
this.determineFullyQualifiedDomain();
|
|
63
74
|
}
|
|
75
|
+
resolveStack(stackName) {
|
|
76
|
+
if (!stackName)
|
|
77
|
+
throw 'Stack name undefined';
|
|
78
|
+
return new pulumi.StackReference(stackName);
|
|
79
|
+
}
|
|
80
|
+
createResourceGroup() {
|
|
81
|
+
if (this.resourceGroup)
|
|
82
|
+
return;
|
|
83
|
+
this.resourceGroup = this.resourceGroupManager.createResourceGroup(`${this.id}`, this, {
|
|
84
|
+
resourceGroupName: this.props.stackName,
|
|
85
|
+
location: this.props.location,
|
|
86
|
+
});
|
|
87
|
+
this.registerOutputs({
|
|
88
|
+
resourceGroupId: this.resourceGroup.id,
|
|
89
|
+
resourceGroupName: this.resourceGroup.name,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
resolveCommonLogAnalyticsWorkspace() {
|
|
93
|
+
if (!this.props.commonLogAnalyticsWorkspace || !this.props.commonLogAnalyticsWorkspace.workspaceName)
|
|
94
|
+
throw 'Props undefined for commonLogAnalyticsWorkspace';
|
|
95
|
+
this.commonLogAnalyticsWorkspace = getWorkspaceOutput({
|
|
96
|
+
workspaceName: this.props.commonLogAnalyticsWorkspace.workspaceName,
|
|
97
|
+
resourceGroupName: this.props.commonLogAnalyticsWorkspace.resourceGroupName,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
64
100
|
/**
|
|
65
101
|
* @summary Determine the fully qualified domain name based on domainName & subDomain
|
|
66
102
|
*/
|
|
@@ -16,6 +16,7 @@ import { CommonAzureStackProps } from './types.js';
|
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
18
|
export declare class CommonAzureStack extends ComponentResource {
|
|
19
|
+
static NODEJS_RUNTIME: string;
|
|
19
20
|
construct: CommonAzureConstruct;
|
|
20
21
|
props: CommonAzureStackProps;
|
|
21
22
|
config: Config;
|
|
@@ -31,13 +32,13 @@ export declare class CommonAzureStack extends ComponentResource {
|
|
|
31
32
|
* - Sets the properties from the extra contexts
|
|
32
33
|
* - Primary use is to have layered config in separate files to enable easier maintenance and readability
|
|
33
34
|
*/
|
|
34
|
-
protected determineExtraContexts(
|
|
35
|
+
protected determineExtraContexts(): Record<string, any>;
|
|
35
36
|
/**
|
|
36
37
|
* @summary Method to determine extra stage contexts apart from the main context
|
|
37
38
|
* - Sets the properties from the extra stage contexts
|
|
38
39
|
* - Primary use is to have layered config for each environment which is injected into the context
|
|
39
40
|
*/
|
|
40
|
-
protected determineStageContexts(
|
|
41
|
+
protected determineStageContexts(): any;
|
|
41
42
|
/**
|
|
42
43
|
* @summary Determine the fully qualified domain name based on domainName & subDomain
|
|
43
44
|
*/
|
|
@@ -20,6 +20,7 @@ import { registerTagTransformation } from './tagging.js';
|
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
22
|
export class CommonAzureStack extends ComponentResource {
|
|
23
|
+
static NODEJS_RUNTIME = '22';
|
|
23
24
|
construct;
|
|
24
25
|
props;
|
|
25
26
|
config;
|
|
@@ -39,36 +40,13 @@ export class CommonAzureStack extends ComponentResource {
|
|
|
39
40
|
* @returns The stack properties
|
|
40
41
|
*/
|
|
41
42
|
determineConstructProps(props) {
|
|
42
|
-
let projectProps = props;
|
|
43
|
-
if (!projectProps) {
|
|
44
|
-
const projectPropsPath = path.join(appRoot.path, 'pulumi.json');
|
|
45
|
-
if (!fs.existsSync(projectPropsPath))
|
|
46
|
-
throw `Context properties unavailable in path:${projectPropsPath}`;
|
|
47
|
-
const projectPropsBuffer = fs.readFileSync(projectPropsPath);
|
|
48
|
-
projectProps = JSON.parse(projectPropsBuffer.toString('utf-8'));
|
|
49
|
-
}
|
|
50
43
|
return {
|
|
51
|
-
|
|
52
|
-
extraContexts:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
globalSuffix: projectProps.globalSuffix,
|
|
58
|
-
resourceNameOptions: projectProps.resourceNameOptions,
|
|
59
|
-
resourcePrefix: projectProps.resourcePrefix,
|
|
60
|
-
resourceSuffix: projectProps.resourceSuffix,
|
|
61
|
-
skipStageForARecords: projectProps.skipStageForARecords,
|
|
62
|
-
stage: projectProps.stage,
|
|
63
|
-
stageContextPath: projectProps.stageContextPath,
|
|
64
|
-
subDomain: projectProps.subDomain,
|
|
65
|
-
subscriptionId: projectProps.subscriptionId,
|
|
66
|
-
tenantId: projectProps.tenantId,
|
|
67
|
-
clientId: projectProps.clientId,
|
|
68
|
-
clientSecret: projectProps.clientSecret,
|
|
69
|
-
defaultTags: projectProps.defaultTags,
|
|
70
|
-
...this.determineExtraContexts(props),
|
|
71
|
-
...this.determineStageContexts(props),
|
|
44
|
+
...props,
|
|
45
|
+
extraContexts: this.config.getObject('extraContexts'),
|
|
46
|
+
stage: this.config.require('stage'),
|
|
47
|
+
stageContextPath: this.config.require('stageContextPath'),
|
|
48
|
+
...this.determineExtraContexts(),
|
|
49
|
+
...this.determineStageContexts(),
|
|
72
50
|
};
|
|
73
51
|
}
|
|
74
52
|
/**
|
|
@@ -76,21 +54,23 @@ export class CommonAzureStack extends ComponentResource {
|
|
|
76
54
|
* - Sets the properties from the extra contexts
|
|
77
55
|
* - Primary use is to have layered config in separate files to enable easier maintenance and readability
|
|
78
56
|
*/
|
|
79
|
-
determineExtraContexts(
|
|
80
|
-
|
|
81
|
-
|
|
57
|
+
determineExtraContexts() {
|
|
58
|
+
const extraContexts = this.config.getObject('extraContexts');
|
|
59
|
+
const debug = this.config.getBoolean('debug');
|
|
60
|
+
if (!extraContexts) {
|
|
61
|
+
if (debug)
|
|
82
62
|
console.debug(`No additional contexts provided. Using default context properties`);
|
|
83
63
|
return {};
|
|
84
64
|
}
|
|
85
65
|
let extraContextProps = {};
|
|
86
|
-
_.forEach(
|
|
66
|
+
_.forEach(extraContexts, (context) => {
|
|
87
67
|
const extraContextPath = path.join(appRoot.path, context);
|
|
88
68
|
/* scenario where extra context is configured but absent in file system */
|
|
89
69
|
if (!fs.existsSync(extraContextPath))
|
|
90
70
|
throw `Extra context properties unavailable in path:${extraContextPath}`;
|
|
91
71
|
/* read the extra properties */
|
|
92
72
|
const extraContextPropsBuffer = fs.readFileSync(extraContextPath);
|
|
93
|
-
if (
|
|
73
|
+
if (debug)
|
|
94
74
|
console.debug(`Adding additional contexts provided in ${extraContextPath}`);
|
|
95
75
|
/* parse as JSON properties */
|
|
96
76
|
extraContextProps = {
|
|
@@ -105,23 +85,26 @@ export class CommonAzureStack extends ComponentResource {
|
|
|
105
85
|
* - Sets the properties from the extra stage contexts
|
|
106
86
|
* - Primary use is to have layered config for each environment which is injected into the context
|
|
107
87
|
*/
|
|
108
|
-
determineStageContexts(
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
88
|
+
determineStageContexts() {
|
|
89
|
+
const debug = this.config.getBoolean('debug');
|
|
90
|
+
const stage = this.config.require('stage');
|
|
91
|
+
const stageContextPath = this.config.get('stageContextPath');
|
|
92
|
+
const stageContextFilePath = path.join(appRoot.path, stageContextPath ?? 'env', `${stage}.json`);
|
|
93
|
+
if (isDevStage(stage)) {
|
|
94
|
+
if (debug)
|
|
112
95
|
console.debug(`Development stage. Using default stage context properties`);
|
|
113
96
|
}
|
|
114
97
|
/* alert default context usage when extra stage config is missing */
|
|
115
98
|
if (!fs.existsSync(stageContextFilePath)) {
|
|
116
|
-
if (
|
|
99
|
+
if (debug)
|
|
117
100
|
console.debug(`Stage specific context properties unavailable in path:${stageContextFilePath}`);
|
|
118
|
-
if (
|
|
119
|
-
console.debug(`Using default stage context properties for ${
|
|
101
|
+
if (debug)
|
|
102
|
+
console.debug(`Using default stage context properties for ${stage} stage`);
|
|
120
103
|
return {};
|
|
121
104
|
}
|
|
122
105
|
/* read the extra properties */
|
|
123
106
|
const stageContextPropsBuffer = fs.readFileSync(stageContextFilePath);
|
|
124
|
-
if (
|
|
107
|
+
if (debug)
|
|
125
108
|
console.debug(`Adding additional stage contexts provided in ${stageContextFilePath}`);
|
|
126
109
|
/* parse as JSON properties */
|
|
127
110
|
return JSON.parse(stageContextPropsBuffer.toString('utf-8'));
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
import { GetComponentOutputArgs } from '@pulumi/azure-native/applicationinsights/index.js';
|
|
2
|
+
import { GetWorkspaceOutputArgs } from '@pulumi/azure-native/operationalinsights/index.js';
|
|
1
3
|
import { BaseProps } from '../../common/index.js';
|
|
2
|
-
import { AzureRemoteBackend } from './constants.js';
|
|
4
|
+
import { AzureLocation, AzureRemoteBackend } from './constants.js';
|
|
5
|
+
export interface AzureLocationConfig {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
}
|
|
3
9
|
/**
|
|
4
10
|
* @interface CommonAzureStackProps
|
|
5
11
|
* @description Common properties for Azure stack configuration using Pulumi
|
|
6
12
|
*/
|
|
7
13
|
export interface CommonAzureStackProps extends BaseProps {
|
|
14
|
+
stackName?: string;
|
|
8
15
|
resourceGroupName?: string;
|
|
9
16
|
remoteBackend?: AzureRemoteBackendProps;
|
|
10
17
|
globalPrefix?: string;
|
|
@@ -14,10 +21,14 @@ export interface CommonAzureStackProps extends BaseProps {
|
|
|
14
21
|
resourceNameOptions?: {
|
|
15
22
|
[key: string]: AzureResourceNameFormatterProps;
|
|
16
23
|
};
|
|
17
|
-
location
|
|
24
|
+
location: AzureLocation;
|
|
25
|
+
locationConfig?: Record<AzureLocation, AzureLocationConfig>;
|
|
26
|
+
locales?: string[];
|
|
18
27
|
defaultTags?: {
|
|
19
28
|
[key: string]: string;
|
|
20
29
|
};
|
|
30
|
+
commonLogAnalyticsWorkspace?: GetWorkspaceOutputArgs;
|
|
31
|
+
commonApplicationInsights?: GetComponentOutputArgs;
|
|
21
32
|
subscriptionId?: string;
|
|
22
33
|
tenantId?: string;
|
|
23
34
|
clientId?: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GetTopicResult, Topic } from '@pulumi/azure-native/eventgrid/index.js';
|
|
2
|
+
import { Output } from '@pulumi/pulumi';
|
|
3
|
+
import { AzureFunctionApp } from '../function-app/index.js';
|
|
4
|
+
import { AzureEventHandlerProps, EventHandlerEventGridSubscription, EventHandlerServiceBus } from './types.js';
|
|
5
|
+
export declare class AzureEventHandler extends AzureFunctionApp {
|
|
6
|
+
props: AzureEventHandlerProps;
|
|
7
|
+
eventGridEventSubscription: EventHandlerEventGridSubscription;
|
|
8
|
+
eventGridTopic: Topic | Output<GetTopicResult>;
|
|
9
|
+
serviceBus: EventHandlerServiceBus;
|
|
10
|
+
constructor(id: string, props: AzureEventHandlerProps);
|
|
11
|
+
initResources(): void;
|
|
12
|
+
protected createEventGridSubscriptionDlqStorageAccount(): void;
|
|
13
|
+
protected createEventGridSubscriptionDlqStorageContainer(): void;
|
|
14
|
+
protected createServiceBusNamespace(): void;
|
|
15
|
+
protected createServiceBusQueue(): void;
|
|
16
|
+
protected createEventGrid(): void;
|
|
17
|
+
protected createEventGridEventSubscription(): void;
|
|
18
|
+
protected createServiceBusDiagnosticLog(): void;
|
|
19
|
+
protected enableMalwareScanningOnDataStorageAccount(): void;
|
|
20
|
+
}
|