From 3ed407ebfbdbb2c7b09fe689d26b2bcc65474346 Mon Sep 17 00:00:00 2001 From: Kevin DeJong Date: Tue, 27 Aug 2024 10:12:39 -0700 Subject: [PATCH] Require at least one element in LSI if --- scripts/update_schemas_manually.py | 6 ++++++ .../patches/extensions/all/aws_dynamodb_table/manual.json | 6 ++++++ .../schemas/providers/us_east_1/aws-dynamodb-table.json | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/scripts/update_schemas_manually.py b/scripts/update_schemas_manually.py index 28ebb8e7de..62167c0756 100755 --- a/scripts/update_schemas_manually.py +++ b/scripts/update_schemas_manually.py @@ -617,6 +617,12 @@ { "if": { "type": "object", + "properties": { + "LocalSecondaryIndexes": { + "type": "array", + "minItems": 1, + } + }, "required": ["LocalSecondaryIndexes"], }, "then": { diff --git a/src/cfnlint/data/schemas/patches/extensions/all/aws_dynamodb_table/manual.json b/src/cfnlint/data/schemas/patches/extensions/all/aws_dynamodb_table/manual.json index 1f8fda3711..99d9a80933 100644 --- a/src/cfnlint/data/schemas/patches/extensions/all/aws_dynamodb_table/manual.json +++ b/src/cfnlint/data/schemas/patches/extensions/all/aws_dynamodb_table/manual.json @@ -5,6 +5,12 @@ "value": [ { "if": { + "properties": { + "LocalSecondaryIndexes": { + "minItems": 1, + "type": "array" + } + }, "required": [ "LocalSecondaryIndexes" ], diff --git a/src/cfnlint/data/schemas/providers/us_east_1/aws-dynamodb-table.json b/src/cfnlint/data/schemas/providers/us_east_1/aws-dynamodb-table.json index f524b710f5..a011b7cf91 100644 --- a/src/cfnlint/data/schemas/providers/us_east_1/aws-dynamodb-table.json +++ b/src/cfnlint/data/schemas/providers/us_east_1/aws-dynamodb-table.json @@ -3,6 +3,12 @@ "allOf": [ { "if": { + "properties": { + "LocalSecondaryIndexes": { + "minItems": 1, + "type": "array" + } + }, "required": [ "LocalSecondaryIndexes" ],