Skip to content

Commit 241d73b

Browse files
authored
Merge branch 'master' into ChristopheBougere/elasticloadbalancingv2-targetgroup-protocolversion
2 parents 24a9841 + 64da84b commit 241d73b

File tree

4 files changed

+110
-74
lines changed

4 files changed

+110
-74
lines changed

packages/@aws-cdk/region-info/build-tools/aws-entities.ts

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,33 @@
44
* Not in the list ==> no built-in data for that region.
55
*/
66
export const AWS_REGIONS = [
7-
'us-east-2',
8-
'us-east-1',
9-
'us-west-1',
10-
'us-west-2',
11-
'us-gov-east-1',
12-
'us-gov-west-1',
13-
'us-iso-east-1',
14-
'us-isob-east-1',
15-
'af-south-1',
16-
'ap-east-1',
17-
'ap-south-1',
18-
'ap-northeast-2',
19-
'ap-southeast-1',
20-
'ap-southeast-2',
21-
'ap-northeast-1',
22-
'ca-central-1',
23-
'cn-north-1',
24-
'cn-northwest-1',
25-
'eu-central-1',
26-
'eu-west-1',
27-
'eu-west-2',
28-
'eu-west-3',
29-
'eu-north-1',
30-
'eu-south-1',
31-
'me-south-1',
32-
'sa-east-1',
7+
'af-south-1', // Africa (Cape Town)
8+
'ap-east-1', // Asia Pacific (Hong Kong)
9+
'ap-northeast-1', // Asia Pacific (Tokyo)
10+
'ap-northeast-2', // Asia Pacific (Seoul)
11+
'ap-northeast-3', // Asia Pacific (Osaka)
12+
'ap-south-1', // Asia Pacific (Mumbai)
13+
'ap-southeast-1', // Asia Pacific (Singapore)
14+
'ap-southeast-2', // Asia Pacific (Sydney)
15+
'ca-central-1', // Canada (Central)
16+
'cn-north-1', // China (Beijing)
17+
'cn-northwest-1', // China (Ningxia)
18+
'eu-central-1', // Europe (Frankfurt)
19+
'eu-north-1', // Europe (Stockholm)
20+
'eu-south-1', // Europe (Milan)
21+
'eu-west-1', // Europe (Ireland)
22+
'eu-west-2', // Europe (London)
23+
'eu-west-3', // Europe (Paris)
24+
'me-south-1', // Middle East (Bahrain)
25+
'sa-east-1', // South America (São Paulo)
26+
'us-east-1', // US East (N. Virginia)
27+
'us-east-2', // US East (Ohio)
28+
'us-gov-east-1', // AWS GovCloud (US-East)
29+
'us-gov-west-1', // AWS GovCloud (US-West)
30+
'us-iso-east-1', // AWS ISO
31+
'us-isob-east-1', // AWS ISO-B
32+
'us-west-1', // US West (N. California)
33+
'us-west-2', // US West (Oregon)
3334
].sort();
3435

3536
/**

packages/@aws-cdk/region-info/build-tools/fact-tables.ts

Lines changed: 45 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,29 @@ export const AWS_CDK_METADATA = new Set([
4646
* @see https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints
4747
*/
4848
export const ROUTE_53_BUCKET_WEBSITE_ZONE_IDS: { [region: string]: string } = {
49-
'us-east-2': 'Z2O1EMRO9K5GLX',
50-
'us-east-1': 'Z3AQBSTGFYJSTF',
51-
'us-west-1': 'Z2F56UZL2M1ACD',
52-
'us-west-2': 'Z3BJ6K6RIION7M',
53-
'us-gov-east-1': 'Z2NIFVYYW2VKV1',
54-
'us-gov-west-1': 'Z31GFT0UA1I2HV',
5549
'af-south-1': 'Z11KHD8FBVPUYU',
5650
'ap-east-1': 'ZNB98KWMFR0R6',
57-
'ap-south-1': 'Z11RGJOFQNVJUP',
58-
'ap-northeast-3': 'Z2YQB5RD63NC85',
51+
'ap-northeast-1': 'Z2M4EHUR26P7ZW',
5952
'ap-northeast-2': 'Z3W03O7B5YMIYP',
53+
'ap-northeast-3': 'Z2YQB5RD63NC85',
54+
'ap-south-1': 'Z11RGJOFQNVJUP',
6055
'ap-southeast-1': 'Z3O0J2DXBE1FTB',
6156
'ap-southeast-2': 'Z1WCIGYICN2BYD',
62-
'ap-northeast-1': 'Z2M4EHUR26P7ZW',
6357
'ca-central-1': 'Z1QDHH18159H29',
6458
'eu-central-1': 'Z21DNDUVLTQW6Q',
59+
'eu-north-1': 'Z3BAZG2TWCNX0D',
60+
'eu-south-1': 'Z3IXVV8C73GIO3',
6561
'eu-west-1': 'Z1BKCTXD74EZPE',
6662
'eu-west-2': 'Z3GKZC51ZF0DB4',
6763
'eu-west-3': 'Z3R1K369G5AVDG',
68-
'eu-north-1': 'Z3BAZG2TWCNX0D',
69-
'eu-south-1': 'Z3IXVV8C73GIO3',
70-
'sa-east-1': 'Z7KQH4QJS55SO',
7164
'me-south-1': 'Z1MPMWCPA7YB62',
65+
'sa-east-1': 'Z7KQH4QJS55SO',
66+
'us-east-1': 'Z3AQBSTGFYJSTF',
67+
'us-east-2': 'Z2O1EMRO9K5GLX',
68+
'us-gov-east-1': 'Z2NIFVYYW2VKV1',
69+
'us-gov-west-1': 'Z31GFT0UA1I2HV',
70+
'us-west-1': 'Z2F56UZL2M1ACD',
71+
'us-west-2': 'Z3BJ6K6RIION7M',
7272
};
7373

7474
interface Region { partition: string, domainSuffix: string }
@@ -83,63 +83,64 @@ export const PARTITION_MAP: { [region: string]: Region } = {
8383

8484
// https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html#access-logging-bucket-permissions
8585
export const ELBV2_ACCOUNTS: { [region: string]: string } = {
86-
'us-east-1': '127311923021',
87-
'us-east-2': '033677994240',
88-
'us-west-1': '027434742980',
89-
'us-west-2': '797873946194',
9086
'af-south-1': '098369216593',
91-
'ca-central-1': '985666609251',
92-
'eu-central-1': '054676820928',
93-
'eu-west-1': '156460612806',
94-
'eu-west-2': '652711504416',
95-
'eu-west-3': '009996457667',
96-
'eu-south-1': '635631232127',
97-
'eu-north-1': '897822967062',
9887
'ap-east-1': '754344448648',
9988
'ap-northeast-1': '582318560864',
10089
'ap-northeast-2': '600734575887',
10190
'ap-northeast-3': '383597477331',
91+
'ap-south-1': '718504428378',
10292
'ap-southeast-1': '114774131450',
10393
'ap-southeast-2': '783225319266',
104-
'ap-south-1': '718504428378',
94+
'ca-central-1': '985666609251',
95+
'cn-north-1': '638102146993',
96+
'cn-northwest-1': '037604701340',
97+
'eu-central-1': '054676820928',
98+
'eu-north-1': '897822967062',
99+
'eu-south-1': '635631232127',
100+
'eu-west-1': '156460612806',
101+
'eu-west-2': '652711504416',
102+
'eu-west-3': '009996457667',
105103
'me-south-1': '076674570225',
106104
'sa-east-1': '507241528517',
107-
'us-gov-west-1': '048591011584',
105+
'us-east-1': '127311923021',
106+
'us-east-2': '033677994240',
108107
'us-gov-east-1': '190560391635',
109-
'cn-north-1': '638102146993',
110-
'cn-northwest-1': '037604701340',
108+
'us-gov-west-1': '048591011584',
109+
'us-west-1': '027434742980',
110+
'us-west-2': '797873946194',
111111
};
112112

113113
// https://aws.amazon.com/releasenotes/available-deep-learning-containers-images
114114
export const DLC_REPOSITORY_ACCOUNTS: { [region: string]: string } = {
115-
'us-east-1': '763104351884',
116-
'us-east-2': '763104351884',
117-
'us-west-1': '763104351884',
118-
'us-west-2': '763104351884',
119-
'ca-central-1': '763104351884',
120-
'eu-west-1': '763104351884',
121-
'eu-west-2': '763104351884',
122-
'eu-west-3': '763104351884',
123-
'eu-central-1': '763104351884',
124-
'eu-north-1': '763104351884',
125-
'sa-east-1': '763104351884',
126-
'ap-south-1': '763104351884',
115+
'ap-east-1': '871362719292',
127116
'ap-northeast-1': '763104351884',
128117
'ap-northeast-2': '763104351884',
118+
'ap-south-1': '763104351884',
129119
'ap-southeast-1': '763104351884',
130120
'ap-southeast-2': '763104351884',
131-
132-
'ap-east-1': '871362719292',
133-
'me-south-1': '217643126080',
134-
121+
'ca-central-1': '763104351884',
135122
'cn-north-1': '727897471807',
136123
'cn-northwest-1': '727897471807',
124+
'eu-central-1': '763104351884',
125+
'eu-north-1': '763104351884',
126+
'eu-west-1': '763104351884',
127+
'eu-west-2': '763104351884',
128+
'eu-west-3': '763104351884',
129+
'me-south-1': '217643126080',
130+
'sa-east-1': '763104351884',
131+
'us-east-1': '763104351884',
132+
'us-east-2': '763104351884',
133+
'us-west-1': '763104351884',
134+
'us-west-2': '763104351884',
137135
};
138136

139137
// https://docs.aws.amazon.com/app-mesh/latest/userguide/envoy.html
140138
export const APPMESH_ECR_ACCOUNTS: { [region: string]: string } = {
139+
'af-south-1': '924023996002',
140+
'ap-east-1': '856666278305',
141141
'ap-northeast-1': '840364872350',
142142
'ap-northeast-2': '840364872350',
143+
'ap-northeast-3': '840364872350',
143144
'ap-south-1': '840364872350',
144145
'ap-southeast-1': '840364872350',
145146
'ap-southeast-2': '840364872350',
@@ -150,14 +151,10 @@ export const APPMESH_ECR_ACCOUNTS: { [region: string]: string } = {
150151
'eu-west-1': '840364872350',
151152
'eu-west-2': '840364872350',
152153
'eu-west-3': '840364872350',
154+
'me-south-1': '772975370895',
153155
'sa-east-1': '840364872350',
154156
'us-east-1': '840364872350',
155157
'us-east-2': '840364872350',
156158
'us-west-1': '840364872350',
157159
'us-west-2': '840364872350',
158-
159-
'me-south-1': '772975370895',
160-
'ap-east-1': '856666278305',
161-
'af-south-1': '924023996002',
162-
163160
};

packages/@aws-cdk/region-info/build-tools/generate-static-data.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ import {
88
} from './fact-tables';
99

1010
async function main(): Promise<void> {
11+
checkRegions(APPMESH_ECR_ACCOUNTS);
12+
checkRegions(DLC_REPOSITORY_ACCOUNTS);
13+
checkRegions(ELBV2_ACCOUNTS);
14+
checkRegions(ROUTE_53_BUCKET_WEBSITE_ZONE_IDS);
15+
1116
const lines = [
1217
"import { Fact, FactName } from './fact';",
1318
'',
@@ -76,6 +81,19 @@ async function main(): Promise<void> {
7681
}
7782
}
7883

84+
/**
85+
* Verifies that the provided map of region to fact does not contain an entry
86+
* for a region that was not registered in `AWS_REGIONS`.
87+
*/
88+
function checkRegions(map: Record<string, unknown>) {
89+
const allRegions = new Set(AWS_REGIONS);
90+
for (const region of Object.keys(map)) {
91+
if (!allRegions.has(region)) {
92+
throw new Error(`Un-registered region fact found: ${region}. Add to AWS_REGIONS list!`);
93+
}
94+
}
95+
}
96+
7997
main().catch(e => {
8098
// eslint-disable-next-line no-console
8199
console.error(e);

packages/@aws-cdk/region-info/test/__snapshots__/region-info.test.js.snap

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,26 @@ Object {
8282
},
8383
"vpcEndPointServiceNamePrefix": "com.amazonaws.vpce",
8484
},
85+
"ap-northeast-3": Object {
86+
"cdkMetadataResourceAvailable": false,
87+
"domainSuffix": "amazonaws.com",
88+
"partition": "aws",
89+
"s3StaticWebsiteEndpoint": "s3-website.ap-northeast-3.amazonaws.com",
90+
"servicePrincipals": Object {
91+
"application-autoscaling": "application-autoscaling.amazonaws.com",
92+
"autoscaling": "autoscaling.amazonaws.com",
93+
"codedeploy": "codedeploy.ap-northeast-3.amazonaws.com",
94+
"ec2": "ec2.amazonaws.com",
95+
"events": "events.amazonaws.com",
96+
"lambda": "lambda.amazonaws.com",
97+
"logs": "logs.ap-northeast-3.amazonaws.com",
98+
"s3": "s3.amazonaws.com",
99+
"sns": "sns.amazonaws.com",
100+
"sqs": "sqs.amazonaws.com",
101+
"states": "states.ap-northeast-3.amazonaws.com",
102+
},
103+
"vpcEndPointServiceNamePrefix": "com.amazonaws.vpce",
104+
},
85105
"ap-south-1": Object {
86106
"cdkMetadataResourceAvailable": true,
87107
"domainSuffix": "amazonaws.com",

0 commit comments

Comments
 (0)