mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(cloudformation): refuse a provisioned DynamoDB table without capacity (#9126)
* fix(cloudformation): refuse a provisioned DynamoDB table without capacity * chore(cloudformation): share the on-demand createTable test matcher
This commit is contained in:
1 parent
a87e8e47e0
commit
d22ea96ecf
9 files changed
+225
-80
No files matched your search
+4
@@ -282,6 +282,10 @@ public class DynamoDbCfnProvisioner implements CfnResourceProvisioner {
|
||||
throw new AwsException("InvalidRequest",
|
||||
"Property ProvisionedThroughput can't be used with PAY_PER_REQUEST BillingMode.", 400);
|
||||
}
|
||||
if (plainTable && !onDemand && (tableThroughput.capacity() == null
|
||||
|| indexThroughput.values().stream().anyMatch(spec -> spec.capacity() == null))) {
|
||||
throw new AwsException("InvalidRequest", "Property ProvisionedThroughput cannot be empty", 400);
|
||||
}
|
||||
boolean throughputDeclared = isDeclared(tableThroughput) || indexThroughput.values().stream()
|
||||
.anyMatch(DynamoDbCfnProvisioner::isDeclared);
|
||||
TableDefinition table;
|
||||
|
||||
Reference in new issue
Block a user