Skip to content

Commit f1d447d

Browse files
committed
chore: prepare
v1.3.0 release with Japanese docs
1 parent 3882eb4 commit f1d447d

File tree

2 files changed

+86
-1
lines changed

2 files changed

+86
-1
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.3.0] - 2025-06-29
9+
10+
### Added
11+
12+
- Full SPA (Single Page Application) support via `custom_error_responses` variable
13+
- Configurable error response handling for 404 and 403 errors
14+
- Enables proper client-side routing for React, Vue, Angular apps
15+
- Customizable response codes, paths, and caching TTL
16+
- Option to skip ACM certificate DNS validation via `skip_certificate_validation` variable
17+
- Useful when DNS is managed externally
18+
- Certificate must be validated manually when enabled
19+
- New example: SPA with custom error handling
20+
- Demonstrates proper SPA configuration
21+
- Shows CloudFront error response setup
22+
- New example: PR preview deployments with SPA support
23+
- Combines wildcard domains with SPA error handling
24+
- Full example for PR-based preview environments
25+
- Japanese documentation (README-ja.md)
26+
27+
### Removed
28+
29+
- Outdated PUBLISHING.md file (superseded by release workflow)
30+
831
## [1.2.0] - 2025-06-12
932

1033
### Added

README-ja.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,57 @@ module "static_site" {
309309

310310
これにより、必要に応じてルートとサブフォルダで異なるデフォルトファイルを使用できます。
311311

312+
### カスタムエラーページ使用時(SPAサポート)
313+
314+
シングルページアプリケーション(SPA)のクライアントサイドルーティングに不可欠な、CloudFront のカスタムエラーレスポンスを設定できます:
315+
316+
```hcl
317+
module "static_site" {
318+
source = "path/to/terraform-aws-static-site"
319+
320+
s3_bucket_name = "my-spa-bucket"
321+
cloudfront_distribution_name = "my-spa-site"
322+
323+
# SPA クライアントサイドルーティング用のエラーレスポンス設定
324+
custom_error_responses = [
325+
{
326+
error_code = 403
327+
response_code = 200
328+
response_page_path = "/index.html"
329+
},
330+
{
331+
error_code = 404
332+
response_code = 200
333+
response_page_path = "/index.html"
334+
}
335+
]
336+
337+
providers = {
338+
aws = aws
339+
aws.us_east_1 = aws.us_east_1
340+
}
341+
}
342+
```
343+
344+
より良いユーザーエクスペリエンスのためにカスタムエラーページを設定することもできます:
345+
346+
```hcl
347+
custom_error_responses = [
348+
{
349+
error_code = 404
350+
response_code = 404
351+
response_page_path = "/errors/404.html"
352+
error_caching_min_ttl = 300 # 5分間キャッシュ
353+
},
354+
{
355+
error_code = 500
356+
response_code = 500
357+
response_page_path = "/errors/500.html"
358+
error_caching_min_ttl = 60 # 1分間キャッシュ
359+
}
360+
]
361+
```
362+
312363
### 自動キャッシュ無効化使用時
313364

314365
キャッシュ無効化機能はメインモジュールに直接組み込まれています - サブモジュールは不要です。有効にすると、Lambda 関数、SQS キュー、IAM ロールを含む必要なすべての AWS リソースが自動的に作成されます。
@@ -422,6 +473,8 @@ module "static_site" {
422473
| cloudfront_function_associations | デフォルトキャッシュ動作用 CloudFront 関数アソシエーションのリスト | `list(object)` | `[]` | いいえ |
423474
| default_root_object | ルート URL へのリクエスト時に CloudFront が返すオブジェクト | `string` | `"index.html"` | いいえ |
424475
| subfolder_root_object | 設定時、サブフォルダリクエストのデフォルトオブジェクトとしてこのファイルを提供する CloudFront 関数を作成 | `string` | `""` | いいえ |
476+
| custom_error_responses | CloudFront のカスタムエラーレスポンス設定のリスト(SPA ルーティング用の例を参照) | `list(object)` | `[]` | いいえ |
477+
| skip_certificate_validation | ACM 証明書の DNS 検証レコードをスキップ(テスト用に便利) | `bool` | `false` | いいえ |
425478
| tags | すべてのリソースに適用するタグ | `map(string)` | `{}` | いいえ |
426479

427480
## 出力変数
@@ -662,7 +715,16 @@ module "static_site" {
662715

663716
##
664717

665-
完全な例については、[examples](./examples/)ディレクトリを参照してください。
718+
完全な例については、[examples](./examples/)ディレクトリを参照してください:
719+
720+
- [基本的な使用法](./examples/basic/) - シンプルな静的ウェブサイトホスティング
721+
- [カスタムドメイン使用例](./examples/with-custom-domain/) - ACM 証明書付きカスタムドメインの使用
722+
- [SPAエラーハンドリング例](./examples/spa-with-error-handling/) - クライアントサイドルーティング付きシングルページアプリケーション
723+
- [キャッシュ無効化使用例](./examples/with-cache-invalidation/) - 自動 CloudFront キャッシュ無効化
724+
- [CloudWatch ログ使用例](./examples/with-logging/) - クロスアカウントログ配信
725+
- [サブフォルダルートオブジェクト使用例](./examples/with-subfolder-root-object/) - サブディレクトリからインデックスファイルを提供
726+
- [PR プレビュー環境](./examples/with-pr-preview/) - PR プレビュー用ワイルドカードドメイン
727+
- [SPAサポート付きPRプレビュー](./examples/with-pr-spa-preview/) - フル SPA ルーティングサポート付き PR プレビュー
666728

667729
## ライセンス
668730

0 commit comments

Comments
 (0)