docs: clarify that domainName is optional with auto-generated defaults #72
+56
−2
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.
Problem
The current documentation and code comments don't clearly explain why
domainNameis optional and what happens when it's not provided. Users might assume that a custom domain is required for the infrastructure to work, especially for Cognito authentication and CloudFront distribution.Solution
Added comprehensive documentation comments throughout the codebase to clarify that:
webapp-abc123def4.auth.us-west-2.amazoncognito.com)d1234567890.cloudfront.net)Changes
Updated documentation comments in:
cdk/bin/cdk.ts-EnvironmentProps.domainNamecdk/lib/main-stack.ts-MainStackPropscdk/lib/us-east-1-stack.ts-UsEast1StackPropscdk/lib/constructs/auth/index.ts-AuthPropsand inline commentscdk/lib/constructs/webapp.ts-WebappPropscdk/lib/constructs/cf-lambda-furl-service/service.ts-CloudFrontLambdaFunctionUrlServicePropsThese improvements make it easier for users to understand that the custom domain is truly optional and how the system behaves in both scenarios.