* fix(partitions): source the China CloudFront suffix and GovCloud API Gateway zones
Two values listed as open questions have a published source in the China and
GovCloud user guides, so they become vendored facts in aws/region-facts.json
instead of a commercial constant.
A generated CloudFront distribution domain name ended in cloudfront.net in
every partition. The China guide's CloudFront page names the default domain
there as *.cloudfront.cn
(https://docs.amazonaws.cn/en_us/aws/latest/userguide/cloudfront.html), and
the commercial suffix is the one in the example name of the botocore
CloudFront model (Distribution$DomainName, DistributionSummary$DomainName).
floci.services.cloudfront.domain-suffix loses its cloudfront.net default and
becomes optional: unset, the suffix follows the request's partition, with the
commercial one where a partition has no CloudFront; set, it applies in every
partition as before. CloudFront distributions and streaming distributions,
Cognito and AppSync custom domains and edge-optimized API Gateway domains all
resolve it through CloudFrontEdgeDomain.domainSuffix.
A regional API Gateway custom domain reported one placeholder hosted zone id in
every region. The GovCloud guide's API Gateway page states the regional
endpoint zone for us-gov-west-1 (Z1K6XKP9SAGWDV) and us-gov-east-1
(Z3SE9ATJYCRCZJ)
(https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-abp.html);
those two regions now report it, and the generator resolves each region
through its description in partitions.json. No source gives the zone for any
other region, which keeps the placeholder and stays an open question.
The generator reads both sentences from either rendering of a guide page: the
page text, or the Markdown AWS serves at the same URL with .md, which escapes
the asterisk in the CloudFront sentence.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* fix(partitions): require each sourced fact and resolve edge domains in the request's partition
The GovCloud API Gateway page parser accepted a page stating only one
region's regional hosted zone, so an edited guide would have dropped the
other zone from region-facts.json without failing. It now requires a zone
for every aws-us-gov region.
The region-facts self check validated cloudfrontDomainSuffix only when it
was present. It now requires the suffix for aws and aws-cn, and the
regional hosted zone for both GovCloud regions, as it already requires
consoleHost; a missing commercial suffix would otherwise have reached
the orElseThrow in CloudFrontEdgeDomain.domainSuffix at runtime.
CloudFrontEdgeDomain.create resolved its partition from the region alone,
falling back to the commercial one, so an AppSync or API Gateway custom
domain in a region no partition publishes (allowed under
allow-unknown-regions) took the commercial suffix and hosted zone in a
China deployment. It now takes the partition the caller's RegionResolver
resolves, which falls back to the deployment's partition, as the
CloudFront and Cognito paths already do.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>