Commit 5dfdbf9
docs: clarify that domainName is optional with auto-generated defaults (#72)
## Problem
The current documentation and code comments don't clearly explain why
`domainName` is 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:
1. **For Cognito**: When no custom domain is provided, a random prefix
is automatically generated to create a unique Cognito domain (e.g.,
`webapp-abc123def4.auth.us-west-2.amazoncognito.com`)
2. **For CloudFront**: When no custom domain is provided, CloudFront's
default domain is used (e.g., `d1234567890.cloudfront.net`)
3. The infrastructure is fully functional without a custom domain setup
## Changes
Updated documentation comments in:
- `cdk/bin/cdk.ts` - `EnvironmentProps.domainName`
- `cdk/lib/main-stack.ts` - `MainStackProps`
- `cdk/lib/us-east-1-stack.ts` - `UsEast1StackProps`
- `cdk/lib/constructs/auth/index.ts` - `AuthProps` and inline comments
- `cdk/lib/constructs/webapp.ts` - `WebappProps`
- `cdk/lib/constructs/cf-lambda-furl-service/service.ts` -
`CloudFrontLambdaFunctionUrlServiceProps`
These improvements make it easier for users to understand that the
custom domain is truly optional and how the system behaves in both
scenarios.
<!-- DO NOT EDIT: System generated metadata -->
<!-- WORKER_ID:1765070357823049 -->
Co-authored-by: remote-swe-app[bot] <123456+remote-swe-app[bot]@users.noreply.github.com>1 parent 23c9e31 commit 5dfdbf9
File tree
6 files changed
+56
-2
lines changed- cdk
- bin
- lib
- constructs
- auth
- cf-lambda-furl-service
6 files changed
+56
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
14 | 24 | | |
15 | 25 | | |
16 | 26 | | |
| |||
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
| 42 | + | |
32 | 43 | | |
33 | 44 | | |
34 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
42 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
30 | 40 | | |
31 | 41 | | |
32 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
33 | 45 | | |
34 | 46 | | |
35 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
| 31 | + | |
| 32 | + | |
21 | 33 | | |
22 | 34 | | |
23 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
| |||
0 commit comments