-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(elbv2): move accounts to region-info module (#8998)
The ELBv2 module needs to know the ELBv2 team's accounts in order to enable access logging. This used to be a non-modifiable table buried in the library. Move that information into the `region-info` module, so users are free to add facts if they deploy to a new, unknown region. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
6 changed files
with
131 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
packages/@aws-cdk/region-info/build-tools/fact-tables.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
export const AWS_OLDER_REGIONS = new Set([ | ||
'us-east-1', | ||
'us-west-1', | ||
'us-west-2', | ||
'ap-southeast-1', | ||
'ap-southeast-2', | ||
'ap-northeast-1', | ||
'sa-east-1', | ||
'eu-west-1', | ||
]); | ||
|
||
export const AWS_CDK_METADATA = new Set([ | ||
'us-east-2', | ||
'us-east-1', | ||
'us-west-1', | ||
'us-west-2', | ||
// 'us-gov-east-1', | ||
// 'us-gov-west-1', | ||
// 'us-iso-east-1', | ||
// 'us-isob-east-1', | ||
'ap-south-1', | ||
'ap-east-1', | ||
// 'ap-northeast-3', | ||
'ap-northeast-2', | ||
'ap-southeast-1', | ||
'ap-southeast-2', | ||
'ap-northeast-1', | ||
'ca-central-1', | ||
'cn-north-1', | ||
'cn-northwest-1', | ||
'eu-central-1', | ||
'eu-west-1', | ||
'eu-west-2', | ||
'eu-west-3', | ||
'eu-north-1', | ||
'me-south-1', | ||
'sa-east-1', | ||
]); | ||
|
||
/** | ||
* The hosted zone Id if using an alias record in Route53. | ||
* | ||
* @see https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints | ||
*/ | ||
export const ROUTE_53_BUCKET_WEBSITE_ZONE_IDS: { [region: string]: string } = { | ||
'us-east-2': 'Z2O1EMRO9K5GLX', | ||
'us-east-1': 'Z3AQBSTGFYJSTF', | ||
'us-west-1': 'Z2F56UZL2M1ACD', | ||
'us-west-2': 'Z3BJ6K6RIION7M', | ||
'us-gov-east-1': 'Z2NIFVYYW2VKV1', | ||
'us-gov-west-1': 'Z31GFT0UA1I2HV', | ||
'ap-east-1': 'ZNB98KWMFR0R6', | ||
'ap-south-1': 'Z11RGJOFQNVJUP', | ||
'ap-northeast-3': 'Z2YQB5RD63NC85', | ||
'ap-northeast-2': 'Z3W03O7B5YMIYP', | ||
'ap-southeast-1': 'Z3O0J2DXBE1FTB', | ||
'ap-southeast-2': 'Z1WCIGYICN2BYD', | ||
'ap-northeast-1': 'Z2M4EHUR26P7ZW', | ||
'ca-central-1': 'Z1QDHH18159H29', | ||
'eu-central-1': 'Z21DNDUVLTQW6Q', | ||
'eu-west-1': 'Z1BKCTXD74EZPE', | ||
'eu-west-2': 'Z3GKZC51ZF0DB4', | ||
'eu-west-3': 'Z3R1K369G5AVDG', | ||
'eu-north-1': 'Z3BAZG2TWCNX0D', | ||
'sa-east-1': 'Z7KQH4QJS55SO', | ||
'me-south-1': 'Z1MPMWCPA7YB62', | ||
}; | ||
|
||
interface Region { partition: string, domainSuffix: string } | ||
|
||
export const PARTITION_MAP: { [region: string]: Region } = { | ||
'default': { partition: 'aws', domainSuffix: 'amazonaws.com' }, | ||
'cn-': { partition: 'aws-cn', domainSuffix: 'amazonaws.com.cn' }, | ||
'us-gov-': { partition: 'aws-us-gov', domainSuffix: 'amazonaws.com' }, | ||
'us-iso-': { partition: 'aws-iso', domainSuffix: 'c2s.ic.gov' }, | ||
'us-isob-': { partition: 'aws-iso-b', domainSuffix: 'sc2s.sgov.gov' }, | ||
}; | ||
|
||
// https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html#access-logging-bucket-permissions | ||
export const ELBV2_ACCOUNTS: { [region: string]: string } = { | ||
'us-east-1': '127311923021', | ||
'us-east-2': '033677994240', | ||
'us-west-1': '027434742980', | ||
'us-west-2': '797873946194', | ||
'af-south-1': '098369216593', | ||
'ca-central-1': '985666609251', | ||
'eu-central-1': '054676820928', | ||
'eu-west-1': '156460612806', | ||
'eu-west-2': '652711504416', | ||
'eu-west-3': '009996457667', | ||
'eu-south-1': '635631232127', | ||
'eu-north-1': '897822967062', | ||
'ap-east-1': '754344448648', | ||
'ap-northeast-1': '582318560864', | ||
'ap-northeast-2': '600734575887', | ||
'ap-northeast-3': '383597477331', | ||
'ap-southeast-1': '114774131450', | ||
'ap-southeast-2': '783225319266', | ||
'ap-south-1': '718504428378', | ||
'me-south-1': '076674570225', | ||
'sa-east-1': '507241528517', | ||
'us-gov-west-1': '048591011584', | ||
'us-gov-east-1': '190560391635', | ||
'cn-north-1': '638102146993', | ||
'cn-northwest-1': '037604701340', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters