From d9dd49e669be3243a5a33172f745b75af6a82faa Mon Sep 17 00:00:00 2001 From: Kevin DeJong Date: Tue, 27 Aug 2024 10:32:08 -0700 Subject: [PATCH] Require at least one element in LSI if (#3623) --- 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" ],