@gradientedge/cdk-utils 8.87.0 → 8.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/lib/manager/aws/app-config-manager.d.ts +3 -10
- package/dist/src/lib/manager/aws/app-config-manager.js +64 -25
- package/dist/src/lib/manager/aws/constants.d.ts +4 -0
- package/dist/src/lib/manager/aws/constants.js +8 -0
- package/dist/src/lib/manager/aws/index.d.ts +1 -0
- package/dist/src/lib/manager/aws/index.js +1 -0
- package/package.json +7 -7
- package/src/lib/manager/aws/app-config-manager.ts +64 -24
- package/src/lib/manager/aws/constants.ts +4 -0
- package/src/lib/manager/aws/index.ts +1 -0
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import * as appconfig from 'aws-cdk-lib/aws-appconfig';
|
|
2
2
|
import * as common from '../../common';
|
|
3
3
|
import * as types from '../../types';
|
|
4
|
-
|
|
5
|
-
* @stability stable
|
|
6
|
-
* @category cdk-utils.app-config-manager
|
|
7
|
-
* @subcategory Construct
|
|
8
|
-
* @returns { Map<string, string> } ArnsByRegion
|
|
9
|
-
*/
|
|
10
|
-
export declare const ArnsByRegion: {
|
|
11
|
-
[key: string]: string;
|
|
12
|
-
};
|
|
4
|
+
import { Architecture } from './constants';
|
|
13
5
|
/**
|
|
14
6
|
* @category cdk-utils.app-config-manager
|
|
15
7
|
* @subcategory Construct
|
|
@@ -33,8 +25,9 @@ export declare class AppConfigManager {
|
|
|
33
25
|
/**
|
|
34
26
|
* Method to get static ARNs for AppConfig extensions
|
|
35
27
|
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
28
|
+
* @param {Architecture} type type of the architecture
|
|
36
29
|
*/
|
|
37
|
-
getArnForAppConfigExtension(scope: common.CommonConstruct): string;
|
|
30
|
+
getArnForAppConfigExtension(scope: common.CommonConstruct, type: Architecture): string;
|
|
38
31
|
/**
|
|
39
32
|
* @summary Method to create an AppConfig Application
|
|
40
33
|
* @param {string} id scoped id of the resource
|
|
@@ -23,37 +23,67 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.AppConfigManager =
|
|
26
|
+
exports.AppConfigManager = void 0;
|
|
27
27
|
const cdk = __importStar(require("aws-cdk-lib"));
|
|
28
28
|
const appconfig = __importStar(require("aws-cdk-lib/aws-appconfig"));
|
|
29
29
|
const utils = __importStar(require("../../utils"));
|
|
30
|
+
const constants_1 = require("./constants");
|
|
30
31
|
/**
|
|
31
32
|
* @stability stable
|
|
32
33
|
* @category cdk-utils.app-config-manager
|
|
33
34
|
* @subcategory Construct
|
|
34
|
-
* @returns { Map<string, string> }
|
|
35
|
+
* @returns { Map<string, string> } AppConfig extension ARN by region for x84
|
|
35
36
|
*/
|
|
36
|
-
|
|
37
|
-
'us-east-1': 'arn:aws:lambda:us-east-1:027255383542:layer:AWS-AppConfig-Extension:
|
|
38
|
-
'us-east-2': 'arn:aws:lambda:us-east-2:728743619870:layer:AWS-AppConfig-Extension:
|
|
39
|
-
'us-west-1': 'arn:aws:lambda:us-west-1:958113053741:layer:AWS-AppConfig-Extension:
|
|
40
|
-
'us-west-2': 'arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension:
|
|
41
|
-
'ca-central-1': 'arn:aws:lambda:ca-central-1:039592058896:layer:AWS-AppConfig-Extension:
|
|
42
|
-
'eu-central-1': 'arn:aws:lambda:eu-central-1:066940009817:layer:AWS-AppConfig-Extension:
|
|
43
|
-
'eu-
|
|
44
|
-
'eu-west-
|
|
45
|
-
'eu-west-
|
|
46
|
-
'eu-
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'ap-
|
|
53
|
-
'ap-
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
37
|
+
const ArnsByRegionForX86_64 = {
|
|
38
|
+
'us-east-1': 'arn:aws:lambda:us-east-1:027255383542:layer:AWS-AppConfig-Extension:110',
|
|
39
|
+
'us-east-2': 'arn:aws:lambda:us-east-2:728743619870:layer:AWS-AppConfig-Extension:79',
|
|
40
|
+
'us-west-1': 'arn:aws:lambda:us-west-1:958113053741:layer:AWS-AppConfig-Extension:121',
|
|
41
|
+
'us-west-2': 'arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension:143',
|
|
42
|
+
'ca-central-1': 'arn:aws:lambda:ca-central-1:039592058896:layer:AWS-AppConfig-Extension:79',
|
|
43
|
+
'eu-central-1': 'arn:aws:lambda:eu-central-1:066940009817:layer:AWS-AppConfig-Extension:91',
|
|
44
|
+
'eu-central-2': 'arn:aws:lambda:eu-central-2:758369105281:layer:AWS-AppConfig-Extension:29',
|
|
45
|
+
'eu-west-1': 'arn:aws:lambda:eu-west-1:434848589818:layer:AWS-AppConfig-Extension:108',
|
|
46
|
+
'eu-west-2': 'arn:aws:lambda:eu-west-2:282860088358:layer:AWS-AppConfig-Extension:79',
|
|
47
|
+
'eu-west-3': 'arn:aws:lambda:eu-west-3:493207061005:layer:AWS-AppConfig-Extension:80',
|
|
48
|
+
'eu-north-1': 'arn:aws:lambda:eu-north-1:646970417810:layer:AWS-AppConfig-Extension:139',
|
|
49
|
+
'eu-south-1': 'arn:aws:lambda:eu-south-1:203683718741:layer:AWS-AppConfig-Extension:71',
|
|
50
|
+
'eu-south-2': 'arn:aws:lambda:eu-south-2:586093569114:layer:AWS-AppConfig-Extension:26',
|
|
51
|
+
'cn-north-1': 'arn:aws-cn:lambda:cn-north-1:615057806174:layer:AWS-AppConfig-Extension:66',
|
|
52
|
+
'cn-northwest-1': 'arn:aws-cn:lambda:cn-northwest-1:615084187847:layer:AWS-AppConfig-Extension:66',
|
|
53
|
+
'ap-east-1': 'arn:aws:lambda:ap-east-1:630222743974:layer:AWS-AppConfig-Extension:71',
|
|
54
|
+
'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:980059726660:layer:AWS-AppConfig-Extension:82',
|
|
55
|
+
'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:826293736237:layer:AWS-AppConfig-Extension:91',
|
|
56
|
+
'ap-northeast-3': 'arn:aws:lambda:ap-northeast-3:706869817123:layer:AWS-AppConfig-Extension:84',
|
|
57
|
+
'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:421114256042:layer:AWS-AppConfig-Extension:89',
|
|
58
|
+
'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:080788657173:layer:AWS-AppConfig-Extension:91',
|
|
59
|
+
'ap-southeast-3': 'arn:aws:lambda:ap-southeast-3:418787028745:layer:AWS-AppConfig-Extension:60',
|
|
60
|
+
'ap-southeast-4': 'arn:aws:lambda:ap-southeast-4:307021474294:layer:AWS-AppConfig-Extension:2',
|
|
61
|
+
'ap-south-1': 'arn:aws:lambda:ap-south-1:554480029851:layer:AWS-AppConfig-Extension:92',
|
|
62
|
+
'ap-south-2': 'arn:aws:lambda:ap-south-2:489524808438:layer:AWS-AppConfig-Extension:29',
|
|
63
|
+
'sa-east-1': 'arn:aws:lambda:sa-east-1:000010852771:layer:AWS-AppConfig-Extension:110',
|
|
64
|
+
'af-south-1': 'arn:aws:lambda:af-south-1:574348263942:layer:AWS-AppConfig-Extension:71',
|
|
65
|
+
'me-central-1': 'arn:aws:lambda:me-central-1:662846165436:layer:AWS-AppConfig-Extension:31',
|
|
66
|
+
'me-south-1': 'arn:aws:lambda:me-south-1:559955524753:layer:AWS-AppConfig-Extension:71',
|
|
67
|
+
'us-gov-east-1': 'arn:aws-us-gov:lambda:us-gov-east-1:946561847325:layer:AWS-AppConfig-Extension:44',
|
|
68
|
+
'us-gov-west-1': 'arn:aws-us-gov:lambda:us-gov-west-1:946746059096:layer:AWS-AppConfig-Extension:44',
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* @stability stable
|
|
72
|
+
* @category cdk-utils.app-config-manager
|
|
73
|
+
* @subcategory Construct
|
|
74
|
+
* @returns { Map<string, string> } AppConfig extension ARN by region for x84
|
|
75
|
+
*/
|
|
76
|
+
const ArnsByRegionForArm = {
|
|
77
|
+
'us-east-1': 'arn:aws:lambda:us-east-1:027255383542:layer:AWS-AppConfig-Extension-Arm64:43',
|
|
78
|
+
'us-east-2': 'arn:aws:lambda:us-east-2:728743619870:layer:AWS-AppConfig-Extension-Arm64:31',
|
|
79
|
+
'us-west-2': 'arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension-Arm64:45',
|
|
80
|
+
'eu-central-1': 'arn:aws:lambda:eu-central-1:066940009817:layer:AWS-AppConfig-Extension-Arm64:34',
|
|
81
|
+
'eu-west-1': 'arn:aws:lambda:eu-west-1:434848589818:layer:AWS-AppConfig-Extension-Arm64:46',
|
|
82
|
+
'eu-west-2': 'arn:aws:lambda:eu-west-2:282860088358:layer:AWS-AppConfig-Extension-Arm64:31',
|
|
83
|
+
'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:980059726660:layer:AWS-AppConfig-Extension-Arm64:35',
|
|
84
|
+
'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:421114256042:layer:AWS-AppConfig-Extension-Arm64:41',
|
|
85
|
+
'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:080788657173:layer:AWS-AppConfig-Extension-Arm64:34',
|
|
86
|
+
'ap-south-1': 'arn:aws:lambda:ap-south-1:554480029851:layer:AWS-AppConfig-Extension-Arm64:34',
|
|
57
87
|
};
|
|
58
88
|
/**
|
|
59
89
|
* @category cdk-utils.app-config-manager
|
|
@@ -78,9 +108,17 @@ class AppConfigManager {
|
|
|
78
108
|
/**
|
|
79
109
|
* Method to get static ARNs for AppConfig extensions
|
|
80
110
|
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
111
|
+
* @param {Architecture} type type of the architecture
|
|
81
112
|
*/
|
|
82
|
-
getArnForAppConfigExtension(scope) {
|
|
83
|
-
|
|
113
|
+
getArnForAppConfigExtension(scope, type) {
|
|
114
|
+
switch (type) {
|
|
115
|
+
case constants_1.Architecture.ARM_64:
|
|
116
|
+
return ArnsByRegionForArm[scope.props.region];
|
|
117
|
+
case constants_1.Architecture.X86_64:
|
|
118
|
+
return ArnsByRegionForX86_64[scope.props.region];
|
|
119
|
+
default:
|
|
120
|
+
throw `Invalid type ${type} specified`;
|
|
121
|
+
}
|
|
84
122
|
}
|
|
85
123
|
/**
|
|
86
124
|
* @summary Method to create an AppConfig Application
|
|
@@ -142,6 +180,7 @@ class AppConfigManager {
|
|
|
142
180
|
description: props.configurationProfile.description,
|
|
143
181
|
retrievalRoleArn: props.configurationProfile.retrievalRoleArn,
|
|
144
182
|
tags: props.configurationProfile.tags,
|
|
183
|
+
type: props.configurationProfile.type,
|
|
145
184
|
validators: props.configurationProfile.validators,
|
|
146
185
|
});
|
|
147
186
|
utils.createCfnOutput(`${id}-configurationProfileId`, scope, cdk.Fn.ref(profile.logicalId));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Architecture = void 0;
|
|
4
|
+
var Architecture;
|
|
5
|
+
(function (Architecture) {
|
|
6
|
+
Architecture["ARM_64"] = "ARM_64";
|
|
7
|
+
Architecture["X86_64"] = "X86_64";
|
|
8
|
+
})(Architecture || (exports.Architecture = Architecture = {}));
|
|
@@ -5,6 +5,7 @@ export * from './cloudfront-manager';
|
|
|
5
5
|
export * from './cloudtrail-manager';
|
|
6
6
|
export * from './cloudwatch-manager';
|
|
7
7
|
export * from './codebuild-manager';
|
|
8
|
+
export * from './constants';
|
|
8
9
|
export * from './dynamodb-manager';
|
|
9
10
|
export * from './ecr-manager';
|
|
10
11
|
export * from './ecs-manager';
|
|
@@ -21,6 +21,7 @@ __exportStar(require("./cloudfront-manager"), exports);
|
|
|
21
21
|
__exportStar(require("./cloudtrail-manager"), exports);
|
|
22
22
|
__exportStar(require("./cloudwatch-manager"), exports);
|
|
23
23
|
__exportStar(require("./codebuild-manager"), exports);
|
|
24
|
+
__exportStar(require("./constants"), exports);
|
|
24
25
|
__exportStar(require("./dynamodb-manager"), exports);
|
|
25
26
|
__exportStar(require("./ecr-manager"), exports);
|
|
26
27
|
__exportStar(require("./ecs-manager"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradientedge/cdk-utils",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.89.0",
|
|
4
4
|
"description": "Utilities for AWS CDK provisioning",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@aws-sdk/client-secrets-manager": "^3.
|
|
49
|
+
"@aws-sdk/client-secrets-manager": "^3.353.0",
|
|
50
50
|
"@types/lodash": "^4.14.195",
|
|
51
|
-
"@types/node": "^20.3.
|
|
51
|
+
"@types/node": "^20.3.1",
|
|
52
52
|
"@types/uuid": "^9.0.2",
|
|
53
53
|
"app-root-path": "^3.1.0",
|
|
54
|
-
"aws-cdk-lib": "^2.
|
|
55
|
-
"constructs": "^10.2.
|
|
54
|
+
"aws-cdk-lib": "^2.84.0",
|
|
55
|
+
"constructs": "^10.2.52",
|
|
56
56
|
"lodash": "^4.17.21",
|
|
57
57
|
"moment": "^2.29.4",
|
|
58
58
|
"nconf": "^0.12.0",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
"@types/jest": "^29.5.2",
|
|
68
68
|
"@typescript-eslint/eslint-plugin": "^5.59.11",
|
|
69
69
|
"@typescript-eslint/parser": "^5.59.11",
|
|
70
|
-
"aws-cdk": "^2.
|
|
70
|
+
"aws-cdk": "^2.84.0",
|
|
71
71
|
"better-docs": "^2.7.2",
|
|
72
72
|
"codecov": "^3.8.3",
|
|
73
73
|
"commitizen": "^4.3.0",
|
|
74
74
|
"docdash": "^2.0.1",
|
|
75
|
-
"dotenv": "^16.
|
|
75
|
+
"dotenv": "^16.2.0",
|
|
76
76
|
"eslint": "^8.42.0",
|
|
77
77
|
"eslint-config-prettier": "^8.8.0",
|
|
78
78
|
"eslint-plugin-import": "^2.27.5",
|
|
@@ -3,34 +3,65 @@ import * as appconfig from 'aws-cdk-lib/aws-appconfig'
|
|
|
3
3
|
import * as common from '../../common'
|
|
4
4
|
import * as types from '../../types'
|
|
5
5
|
import * as utils from '../../utils'
|
|
6
|
+
import { Architecture } from './constants'
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* @stability stable
|
|
9
10
|
* @category cdk-utils.app-config-manager
|
|
10
11
|
* @subcategory Construct
|
|
11
|
-
* @returns { Map<string, string> }
|
|
12
|
+
* @returns { Map<string, string> } AppConfig extension ARN by region for x84
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
-
'us-east-1': 'arn:aws:lambda:us-east-1:027255383542:layer:AWS-AppConfig-Extension:
|
|
15
|
-
'us-east-2': 'arn:aws:lambda:us-east-2:728743619870:layer:AWS-AppConfig-Extension:
|
|
16
|
-
'us-west-1': 'arn:aws:lambda:us-west-1:958113053741:layer:AWS-AppConfig-Extension:
|
|
17
|
-
'us-west-2': 'arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension:
|
|
18
|
-
'ca-central-1': 'arn:aws:lambda:ca-central-1:039592058896:layer:AWS-AppConfig-Extension:
|
|
19
|
-
'eu-central-1': 'arn:aws:lambda:eu-central-1:066940009817:layer:AWS-AppConfig-Extension:
|
|
20
|
-
'eu-
|
|
21
|
-
'eu-west-
|
|
22
|
-
'eu-west-
|
|
23
|
-
'eu-
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'ap-
|
|
30
|
-
'ap-
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
14
|
+
const ArnsByRegionForX86_64: { [region: string]: string } = {
|
|
15
|
+
'us-east-1': 'arn:aws:lambda:us-east-1:027255383542:layer:AWS-AppConfig-Extension:110',
|
|
16
|
+
'us-east-2': 'arn:aws:lambda:us-east-2:728743619870:layer:AWS-AppConfig-Extension:79',
|
|
17
|
+
'us-west-1': 'arn:aws:lambda:us-west-1:958113053741:layer:AWS-AppConfig-Extension:121',
|
|
18
|
+
'us-west-2': 'arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension:143',
|
|
19
|
+
'ca-central-1': 'arn:aws:lambda:ca-central-1:039592058896:layer:AWS-AppConfig-Extension:79',
|
|
20
|
+
'eu-central-1': 'arn:aws:lambda:eu-central-1:066940009817:layer:AWS-AppConfig-Extension:91',
|
|
21
|
+
'eu-central-2': 'arn:aws:lambda:eu-central-2:758369105281:layer:AWS-AppConfig-Extension:29',
|
|
22
|
+
'eu-west-1': 'arn:aws:lambda:eu-west-1:434848589818:layer:AWS-AppConfig-Extension:108',
|
|
23
|
+
'eu-west-2': 'arn:aws:lambda:eu-west-2:282860088358:layer:AWS-AppConfig-Extension:79',
|
|
24
|
+
'eu-west-3': 'arn:aws:lambda:eu-west-3:493207061005:layer:AWS-AppConfig-Extension:80',
|
|
25
|
+
'eu-north-1': 'arn:aws:lambda:eu-north-1:646970417810:layer:AWS-AppConfig-Extension:139',
|
|
26
|
+
'eu-south-1': 'arn:aws:lambda:eu-south-1:203683718741:layer:AWS-AppConfig-Extension:71',
|
|
27
|
+
'eu-south-2': 'arn:aws:lambda:eu-south-2:586093569114:layer:AWS-AppConfig-Extension:26',
|
|
28
|
+
'cn-north-1': 'arn:aws-cn:lambda:cn-north-1:615057806174:layer:AWS-AppConfig-Extension:66',
|
|
29
|
+
'cn-northwest-1': 'arn:aws-cn:lambda:cn-northwest-1:615084187847:layer:AWS-AppConfig-Extension:66',
|
|
30
|
+
'ap-east-1': 'arn:aws:lambda:ap-east-1:630222743974:layer:AWS-AppConfig-Extension:71',
|
|
31
|
+
'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:980059726660:layer:AWS-AppConfig-Extension:82',
|
|
32
|
+
'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:826293736237:layer:AWS-AppConfig-Extension:91',
|
|
33
|
+
'ap-northeast-3': 'arn:aws:lambda:ap-northeast-3:706869817123:layer:AWS-AppConfig-Extension:84',
|
|
34
|
+
'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:421114256042:layer:AWS-AppConfig-Extension:89',
|
|
35
|
+
'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:080788657173:layer:AWS-AppConfig-Extension:91',
|
|
36
|
+
'ap-southeast-3': 'arn:aws:lambda:ap-southeast-3:418787028745:layer:AWS-AppConfig-Extension:60',
|
|
37
|
+
'ap-southeast-4': 'arn:aws:lambda:ap-southeast-4:307021474294:layer:AWS-AppConfig-Extension:2',
|
|
38
|
+
'ap-south-1': 'arn:aws:lambda:ap-south-1:554480029851:layer:AWS-AppConfig-Extension:92',
|
|
39
|
+
'ap-south-2': 'arn:aws:lambda:ap-south-2:489524808438:layer:AWS-AppConfig-Extension:29',
|
|
40
|
+
'sa-east-1': 'arn:aws:lambda:sa-east-1:000010852771:layer:AWS-AppConfig-Extension:110',
|
|
41
|
+
'af-south-1': 'arn:aws:lambda:af-south-1:574348263942:layer:AWS-AppConfig-Extension:71',
|
|
42
|
+
'me-central-1': 'arn:aws:lambda:me-central-1:662846165436:layer:AWS-AppConfig-Extension:31',
|
|
43
|
+
'me-south-1': 'arn:aws:lambda:me-south-1:559955524753:layer:AWS-AppConfig-Extension:71',
|
|
44
|
+
'us-gov-east-1': 'arn:aws-us-gov:lambda:us-gov-east-1:946561847325:layer:AWS-AppConfig-Extension:44',
|
|
45
|
+
'us-gov-west-1': 'arn:aws-us-gov:lambda:us-gov-west-1:946746059096:layer:AWS-AppConfig-Extension:44',
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @stability stable
|
|
50
|
+
* @category cdk-utils.app-config-manager
|
|
51
|
+
* @subcategory Construct
|
|
52
|
+
* @returns { Map<string, string> } AppConfig extension ARN by region for x84
|
|
53
|
+
*/
|
|
54
|
+
const ArnsByRegionForArm: { [region: string]: string } = {
|
|
55
|
+
'us-east-1': 'arn:aws:lambda:us-east-1:027255383542:layer:AWS-AppConfig-Extension-Arm64:43',
|
|
56
|
+
'us-east-2': 'arn:aws:lambda:us-east-2:728743619870:layer:AWS-AppConfig-Extension-Arm64:31',
|
|
57
|
+
'us-west-2': 'arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension-Arm64:45',
|
|
58
|
+
'eu-central-1': 'arn:aws:lambda:eu-central-1:066940009817:layer:AWS-AppConfig-Extension-Arm64:34',
|
|
59
|
+
'eu-west-1': 'arn:aws:lambda:eu-west-1:434848589818:layer:AWS-AppConfig-Extension-Arm64:46',
|
|
60
|
+
'eu-west-2': 'arn:aws:lambda:eu-west-2:282860088358:layer:AWS-AppConfig-Extension-Arm64:31',
|
|
61
|
+
'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:980059726660:layer:AWS-AppConfig-Extension-Arm64:35',
|
|
62
|
+
'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:421114256042:layer:AWS-AppConfig-Extension-Arm64:41',
|
|
63
|
+
'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:080788657173:layer:AWS-AppConfig-Extension-Arm64:34',
|
|
64
|
+
'ap-south-1': 'arn:aws:lambda:ap-south-1:554480029851:layer:AWS-AppConfig-Extension-Arm64:34',
|
|
34
65
|
}
|
|
35
66
|
|
|
36
67
|
/**
|
|
@@ -56,9 +87,17 @@ export class AppConfigManager {
|
|
|
56
87
|
/**
|
|
57
88
|
* Method to get static ARNs for AppConfig extensions
|
|
58
89
|
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
90
|
+
* @param {Architecture} type type of the architecture
|
|
59
91
|
*/
|
|
60
|
-
public getArnForAppConfigExtension(scope: common.CommonConstruct) {
|
|
61
|
-
|
|
92
|
+
public getArnForAppConfigExtension(scope: common.CommonConstruct, type: Architecture) {
|
|
93
|
+
switch (type) {
|
|
94
|
+
case Architecture.ARM_64:
|
|
95
|
+
return ArnsByRegionForArm[scope.props.region]
|
|
96
|
+
case Architecture.X86_64:
|
|
97
|
+
return ArnsByRegionForX86_64[scope.props.region]
|
|
98
|
+
default:
|
|
99
|
+
throw `Invalid type ${type} specified`
|
|
100
|
+
}
|
|
62
101
|
}
|
|
63
102
|
|
|
64
103
|
/**
|
|
@@ -141,6 +180,7 @@ export class AppConfigManager {
|
|
|
141
180
|
description: props.configurationProfile.description,
|
|
142
181
|
retrievalRoleArn: props.configurationProfile.retrievalRoleArn,
|
|
143
182
|
tags: props.configurationProfile.tags,
|
|
183
|
+
type: props.configurationProfile.type,
|
|
144
184
|
validators: props.configurationProfile.validators,
|
|
145
185
|
})
|
|
146
186
|
|
|
@@ -5,6 +5,7 @@ export * from './cloudfront-manager'
|
|
|
5
5
|
export * from './cloudtrail-manager'
|
|
6
6
|
export * from './cloudwatch-manager'
|
|
7
7
|
export * from './codebuild-manager'
|
|
8
|
+
export * from './constants'
|
|
8
9
|
export * from './dynamodb-manager'
|
|
9
10
|
export * from './ecr-manager'
|
|
10
11
|
export * from './ecs-manager'
|