@exabugs/dynamodb-client 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.6.1] - 2026-10-11
11
+
12
+ ### Fixed
13
+
14
+ - `terraform/modules/parameter-store`: **新規環境への初回デプロイで `terraform plan` が `Invalid count argument` で失敗する不具合を修正**(1.5.3〜1.6.0 が対象)。IAM認証URLのパラメータの個数を、同じ apply で作成する Function URL の属性(初回は未確定)の有無で決めていたため。確定している真偽値の変数 `create_records_iam_url_parameter` を追加し、トップの `terraform/main.tf` は `true` を渡す。変数を渡さない既存の呼び出し元は従来どおりの動作
15
+
10
16
  ## [1.5.3] - 2026-10-04
11
17
 
12
18
  ### Fixed
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v1.6.0
2
- // Built: 2026-10-04T23:59:48.659Z
1
+ // @exabugs/dynamodb-client v1.6.1
2
+ // Built: 2026-10-11T12:45:55.244Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -38701,7 +38701,7 @@ async function handler(event) {
38701
38701
  return createCorsResponse(HTTP_STATUS.OK);
38702
38702
  }
38703
38703
  if (event.requestContext.http.method === "GET" && event.requestContext.http.path === "/version") {
38704
- const version = "1.6.0";
38704
+ const version = "1.6.1";
38705
38705
  return createSuccessResponse({ version, timestamp: (/* @__PURE__ */ new Date()).toISOString() }, requestId);
38706
38706
  }
38707
38707
  if (event.requestContext.http.method !== "POST") {
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v1.6.0
2
- // Built: 2026-10-04T23:59:48.659Z
1
+ // @exabugs/dynamodb-client v1.6.1
2
+ // Built: 2026-10-11T12:45:55.244Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v1.6.0
2
- // Built: 2026-10-04T23:59:48.659Z
1
+ // @exabugs/dynamodb-client v1.6.1
2
+ // Built: 2026-10-11T12:45:55.244Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v1.6.0
2
- // Built: 2026-10-04T23:59:48.659Z
1
+ // @exabugs/dynamodb-client v1.6.1
2
+ // Built: 2026-10-11T12:45:55.244Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exabugs/dynamodb-client",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "DynamoDB Single-Table Client SDK with MongoDB-like API, Shadow Records, and Lambda implementation for serverless applications",
5
5
  "author": "exabugs",
6
6
  "license": "MIT",
package/terraform/main.tf CHANGED
@@ -213,6 +213,8 @@ module "parameter_store" {
213
213
  # Records Lambda設定
214
214
  records_function_url = aws_lambda_function_url.records.function_url
215
215
  records_iam_function_url = aws_lambda_function_url.records_iam.function_url
216
+ # IAM URL は常に同じ apply で作るため true を明示する(未確定の値の有無で count を決めない)
217
+ create_records_iam_url_parameter = true
216
218
  records_function_arn = aws_lambda_function.records.arn
217
219
 
218
220
  # Cognito設定
@@ -31,6 +31,8 @@ module "parameter_store" {
31
31
  }
32
32
  ```
33
33
 
34
+ AWS_IAM認証URL(サーバー間呼び出し・運用スクリプト向け)のパラメータも作る場合は、`records_iam_function_url` と一緒に `create_records_iam_url_parameter = true` を渡す。値に同じ apply で作成するリソースの属性を渡すと、初回の plan で値が未確定になり、値の有無では個数を決められないため。
35
+
34
36
  **Note**: このモジュールは外部参照用のプレースホルダーパラメータも作成します。実際の値は他のTerraformモジュール(Cognito、DynamoDB等)から設定してください。
35
37
 
36
38
  ### プレースホルダーパラメータの更新
@@ -33,7 +33,15 @@ resource "aws_ssm_parameter" "infra_dynamodb_client_api_url" {
33
33
  # DynamoDB Client API URL, AWS_IAM認証版 (外部参照用)
34
34
  # サーバー間呼び出し・運用スクリプト(IAM署名クライアント)向け
35
35
  resource "aws_ssm_parameter" "infra_dynamodb_client_api_iam_url" {
36
- count = var.records_iam_function_url != null ? 1 : 0
36
+ # 個数は plan 時に確定している必要がある。records_iam_function_url は、同じ apply で
37
+ # 作成する Function URL の属性(初回は未確定)を渡されることが多く、それで個数を決めると
38
+ # "Invalid count argument" になる。呼び出し元が create_records_iam_url_parameter で
39
+ # 明示した場合はそれに従う。未指定(null)のときだけ、従来どおり値の有無で判定する。
40
+ count = (
41
+ var.create_records_iam_url_parameter == null
42
+ ? (var.records_iam_function_url != null ? 1 : 0)
43
+ : (var.create_records_iam_url_parameter ? 1 : 0)
44
+ )
37
45
 
38
46
  name = "/${var.project_name}/${var.environment}/infra/dynamodb-client-api-iam-url"
39
47
  type = local.parameter_type
@@ -26,6 +26,12 @@ variable "records_iam_function_url" {
26
26
  default = null
27
27
  }
28
28
 
29
+ variable "create_records_iam_url_parameter" {
30
+ description = "AWS_IAM認証URLのパラメータを作成するか。records_iam_function_url に同じ apply で作成するリソースの属性を渡す場合は true を明示する(値の有無で個数を決めると初回 plan が失敗するため)。null(既定)のときは records_iam_function_url が null でなければ作成する(従来の動作)"
31
+ type = bool
32
+ default = null
33
+ }
34
+
29
35
  variable "records_function_arn" {
30
36
  description = "Records Lambda Function ARN"
31
37
  type = string