Repository navigation
Conversation
…ast-1 NextjsDomain creates its ACM certificate in the stack's region, but CloudFront only accepts certificates from us-east-1. Stacks in other regions synthesized fine and then failed at deploy time. Throw a clear error at synth instead, pointing at the certificate prop and cross region references. Environment-agnostic stacks are left alone since their region isn't known until deploy. Fixes #255 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NextjsDomain creates its ACM certificate in the stack's region, but CloudFront only accepts certificates from us-east-1. A stack in eu-west-1 without a
certificateprop synthesizes fine and then fails when CloudFront rejects the cert at deploy time. That's what #255 hit after upgrading from 3.x, which used to create the cert in us-east-1 via a cross-region function.Now it throws at synth with a message pointing at the
certificateprop andcrossRegionReferences. Environment-agnostic stacks are skipped since their region is a token until deploy. No working setup changes behaviour, since anything that hits the new error couldn't deploy before either.I didn't bring back the 3.x behaviour of creating the cert in us-east-1 automatically. The only built-in way is the deprecated
DnsValidatedCertificate, and the supported route is a separate us-east-1 stack, which a construct can't create on its own.Adds the first construct tests for NextjsDomain.
Fixes #255
🤖 Generated with Claude Code