Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(cfnspec): Unable to run bump-cfnspec.sh due to AWS::DynamoDB::Table changes #21957

Closed
laurelmay opened this issue Sep 7, 2022 · 2 comments
Closed
Assignees
Labels
@aws-cdk/cfnspec bug This issue is a bug.

Comments

@laurelmay
Copy link
Contributor

laurelmay commented Sep 7, 2022

Describe the bug

There has not been an update to cfnspec in a few weeks. The current spec version is v87.0.0. The latest version in the AWS CDK repo is v85.0.0.

Running ./scripts/bump-cfnspec.sh results in an error:

Updating CHANGELOG.md...
Error: Unexpected update to AWS::DynamoDB::Table: AllowCreationPolicy
    at classifyResourceTypeUpdate (/home/kyle/Documents/aws-cdk/packages/@aws-cdk/cfnspec/build-tools/spec-diff.js:97:27)
    at main (/home/kyle/Documents/aws-cdk/packages/@aws-cdk/cfnspec/build-tools/spec-diff.js:35:9)

Expected Behavior

Running ./scripts/bump-cfnspec.sh should properly apply the latest version of the CloudFormation Resource Specification.

Current Behavior

The ./scripts/bump-cfnspec.sh script fails with the following error message

Full error message
yarn run v1.22.19
$ cdk-build && /bin/bash build-tools/update.sh && /bin/bash build-tools/update-cfnlint.sh
Build times for @aws-cdk/cfnspec: Total time (4.3s) | /home/kyle/Documents/aws-cdk/node_modules/typescript/bin/tsc (0.2s)
Downloading from https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json...
Updating source spec...
Loading specification: /tmp/tmp.6l9SC00Han/new_proposed.json
Splitting
Writing
======================================================================
                            AWS_SageMaker
======================================================================
{
  "ResourceTypes": {
    "AWS::SageMaker::ModelPackage": {
      "Properties": {
        "LastModifiedBy": {

!!!       must have exactly one of 'Type', 'PrimitiveType', found: {} !!!

          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-modelpackage.html#cfn-sagemaker-modelpackage-lastmodifiedby",
          "UpdateType": "Mutable",
          "Required": false
        }
      }
    }
  }
}
{
  "ResourceTypes": {
    "AWS::SageMaker::ModelPackage": {
      "Properties": {
        "CreatedBy": {

!!!       must have exactly one of 'Type', 'PrimitiveType', found: {} !!!

          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-modelpackage.html#cfn-sagemaker-modelpackage-createdby",
          "UpdateType": "Mutable",
          "Required": false
        }
      }
    }
  }
}
======================================================================
                           AWS_Rekognition
======================================================================
{
  "ResourceTypes": {
    "AWS::Rekognition::StreamProcessor": {
      "Properties": {
        "PolygonRegionsOfInterest": {
          "ItemType": "List"

!!!         unknown property type name 'List' (missing definition for 'AWS::Rekognition::StreamProcessor.List') !!!

        }
      }
    }
  }
}
======================================================================
                          AWS_RolesAnywhere
======================================================================
{
  "PropertyTypes": {
    "AWS::RolesAnywhere::TrustAnchor.Source": {
      "Properties": {
        "SourceData": {

!!!       must have exactly one of 'Type', 'PrimitiveType', found: {} !!!

          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rolesanywhere-trustanchor-source.html#cfn-rolesanywhere-trustanchor-source-sourcedata",
          "UpdateType": "Mutable",
          "Required": false
        }
      }
    }
  }
}
======================================================================
                         AWS_ConnectCampaigns
======================================================================
{
  "ResourceTypes": {
    "AWS::ConnectCampaigns::Campaign": {
      "Properties": {
        "DialerConfig": {

!!!       must have exactly one of 'Type', 'PrimitiveType', found: {} !!!

          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connectcampaigns-campaign.html#cfn-connectcampaigns-campaign-dialerconfig",
          "UpdateType": "Mutable",
          "Required": true
        }
      }
    }
  }
}
Updating CHANGELOG.md...
Error: Unexpected update to AWS::DynamoDB::Table: AllowCreationPolicy
    at classifyResourceTypeUpdate (/home/kyle/Documents/aws-cdk/packages/@aws-cdk/cfnspec/build-tools/spec-diff.js:97:27)
    at main (/home/kyle/Documents/aws-cdk/packages/@aws-cdk/cfnspec/build-tools/spec-diff.js:35:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Reproduction Steps

  1. yarn install
  2. ./scripts/bump-cfnspec.sh
  3. Error occurs during execution of that script

Possible Solution

The update causing the complaint in AWS::DynamoDB::Table is not covered by the switch statement at

switch (key) {
case 'Properties':
for (const prop of Object.keys(update.Properties)) {
describeChanges(resourceType, prop, update.Properties[prop]).forEach(change => {
propertyChanges.push(change);
});
}
break;
case 'Attributes':
for (const attr of Object.keys(update.Attributes)) {
describeChanges(resourceType, attr, update.Attributes[attr]).forEach(change => {
attributeChanges.push(change);
});
}
break;
case 'Documentation':
describeChanges(resourceType, key, update.Documentation).forEach(change => {
attributeChanges.push(change);
});
break;
default:
throw new Error(`Unexpected update to ${resourceType}: ${key}`);
}

Either additional cases may need to be added, something to prevent entering the switch, or Error to not be thrown.

Additional Information/Context

This looks like the same sort of thing that resulted in #12920.

Full diff of DynamoDB service resources
diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json
index 78a75f0520..593914b9c3 100644
--- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json
+++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json
@@ -1,5 +1,5 @@
 {
-  "$version": "85.0.0",
+  "$version": "87.0.0",
   "PropertyTypes": {
     "AWS::DynamoDB::GlobalTable.AttributeDefinition": {
       "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-attributedefinition.html",
@@ -355,16 +355,16 @@
       }
     },
     "AWS::DynamoDB::Table.AttributeDefinition": {
-      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-attributedef.html",
+      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-attributedefinition.html",
       "Properties": {
         "AttributeName": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-attributedef.html#cfn-dynamodb-attributedef-attributename",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-attributedefinition.html#cfn-dynamodb-table-attributedefinition-attributename",
           "PrimitiveType": "String",
           "Required": true,
           "UpdateType": "Mutable"
         },
         "AttributeType": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-attributedef.html#cfn-dynamodb-attributedef-attributename-attributetype",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-attributedefinition.html#cfn-dynamodb-table-attributedefinition-attributetype",
           "PrimitiveType": "String",
           "Required": true,
           "UpdateType": "Mutable"
@@ -372,33 +372,52 @@
       }
     },
     "AWS::DynamoDB::Table.ContributorInsightsSpecification": {
-      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-contributorinsightsspecification.html",
+      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-contributorinsightsspecification.html",
       "Properties": {
         "Enabled": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-contributorinsightsspecification.html#cfn-dynamodb-contributorinsightsspecification-enabled",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-contributorinsightsspecification.html#cfn-dynamodb-table-contributorinsightsspecification-enabled",
           "PrimitiveType": "Boolean",
           "Required": true,
           "UpdateType": "Mutable"
         }
       }
     },
+    "AWS::DynamoDB::Table.Csv": {
+      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-csv.html",
+      "Properties": {
+        "Delimiter": {
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-csv.html#cfn-dynamodb-table-csv-delimiter",
+          "PrimitiveType": "String",
+          "Required": false,
+          "UpdateType": "Immutable"
+        },
+        "HeaderList": {
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-csv.html#cfn-dynamodb-table-csv-headerlist",
+          "DuplicatesAllowed": false,
+          "PrimitiveItemType": "String",
+          "Required": false,
+          "Type": "List",
+          "UpdateType": "Immutable"
+        }
+      }
+    },
     "AWS::DynamoDB::Table.GlobalSecondaryIndex": {
-      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-gsi.html",
+      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-globalsecondaryindex.html",
       "Properties": {
         "ContributorInsightsSpecification": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-gsi.html#cfn-dynamodb-contributorinsightsspecification-enabled",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-globalsecondaryindex.html#cfn-dynamodb-table-globalsecondaryindex-contributorinsightsspecification",
           "Required": false,
           "Type": "ContributorInsightsSpecification",
           "UpdateType": "Mutable"
         },
         "IndexName": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-gsi.html#cfn-dynamodb-gsi-indexname",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-globalsecondaryindex.html#cfn-dynamodb-table-globalsecondaryindex-indexname",
           "PrimitiveType": "String",
           "Required": true,
           "UpdateType": "Mutable"
         },
         "KeySchema": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-gsi.html#cfn-dynamodb-gsi-keyschema",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-globalsecondaryindex.html#cfn-dynamodb-table-globalsecondaryindex-keyschema",
           "DuplicatesAllowed": false,
           "ItemType": "KeySchema",
           "Required": true,
@@ -406,19 +425,59 @@
           "UpdateType": "Mutable"
         },
         "Projection": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-gsi.html#cfn-dynamodb-gsi-projection",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-globalsecondaryindex.html#cfn-dynamodb-table-globalsecondaryindex-projection",
           "Required": true,
           "Type": "Projection",
           "UpdateType": "Mutable"
         },
         "ProvisionedThroughput": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-gsi.html#cfn-dynamodb-gsi-provisionedthroughput",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-globalsecondaryindex.html#cfn-dynamodb-table-globalsecondaryindex-provisionedthroughput",
           "Required": false,
           "Type": "ProvisionedThroughput",
           "UpdateType": "Mutable"
         }
       }
     },
+    "AWS::DynamoDB::Table.ImportSourceSpecification": {
+      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-importsourcespecification.html",
+      "Properties": {
+        "InputCompressionType": {
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-importsourcespecification.html#cfn-dynamodb-table-importsourcespecification-inputcompressiontype",
+          "PrimitiveType": "String",
+          "Required": false,
+          "UpdateType": "Immutable"
+        },
+        "InputFormat": {
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-importsourcespecification.html#cfn-dynamodb-table-importsourcespecification-inputformat",
+          "PrimitiveType": "String",
+          "Required": true,
+          "UpdateType": "Immutable"
+        },
+        "InputFormatOptions": {
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-importsourcespecification.html#cfn-dynamodb-table-importsourcespecification-inputformatoptions",
+          "Required": false,
+          "Type": "InputFormatOptions",
+          "UpdateType": "Immutable"
+        },
+        "S3BucketSource": {
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-importsourcespecification.html#cfn-dynamodb-table-importsourcespecification-s3bucketsource",
+          "Required": true,
+          "Type": "S3BucketSource",
+          "UpdateType": "Immutable"
+        }
+      }
+    },
+    "AWS::DynamoDB::Table.InputFormatOptions": {
+      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-inputformatoptions.html",
+      "Properties": {
+        "Csv": {
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-inputformatoptions.html#cfn-dynamodb-table-inputformatoptions-csv",
+          "Required": false,
+          "Type": "Csv",
+          "UpdateType": "Immutable"
+        }
+      }
+    },
     "AWS::DynamoDB::Table.KeySchema": {
       "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-keyschema.html",
       "Properties": {
@@ -437,10 +496,10 @@
       }
     },
     "AWS::DynamoDB::Table.KinesisStreamSpecification": {
-      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-kinesisstreamspecification.html",
+      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-kinesisstreamspecification.html",
       "Properties": {
         "StreamArn": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-kinesisstreamspecification.html#cfn-dynamodb-kinesisstreamspecification-streamarn",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-kinesisstreamspecification.html#cfn-dynamodb-table-kinesisstreamspecification-streamarn",
           "PrimitiveType": "String",
           "Required": true,
           "UpdateType": "Mutable"
@@ -448,16 +507,16 @@
       }
     },
     "AWS::DynamoDB::Table.LocalSecondaryIndex": {
-      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-lsi.html",
+      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-localsecondaryindex.html",
       "Properties": {
         "IndexName": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-lsi.html#cfn-dynamodb-lsi-indexname",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-localsecondaryindex.html#cfn-dynamodb-table-localsecondaryindex-indexname",
           "PrimitiveType": "String",
           "Required": true,
           "UpdateType": "Mutable"
         },
         "KeySchema": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-lsi.html#cfn-dynamodb-lsi-keyschema",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-localsecondaryindex.html#cfn-dynamodb-table-localsecondaryindex-keyschema",
           "DuplicatesAllowed": false,
           "ItemType": "KeySchema",
           "Required": true,
@@ -465,7 +524,7 @@
           "UpdateType": "Mutable"
         },
         "Projection": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-lsi.html#cfn-dynamodb-lsi-projection",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-localsecondaryindex.html#cfn-dynamodb-table-localsecondaryindex-projection",
           "Required": true,
           "Type": "Projection",
           "UpdateType": "Mutable"
@@ -484,10 +543,10 @@
       }
     },
     "AWS::DynamoDB::Table.Projection": {
-      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-projectionobject.html",
+      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-projection.html",
       "Properties": {
         "NonKeyAttributes": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-projectionobject.html#cfn-dynamodb-projectionobj-nonkeyatt",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-projection.html#cfn-dynamodb-table-projection-nonkeyattributes",
           "DuplicatesAllowed": true,
           "PrimitiveItemType": "String",
           "Required": false,
@@ -495,7 +554,7 @@
           "UpdateType": "Mutable"
         },
         "ProjectionType": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-projectionobject.html#cfn-dynamodb-projectionobj-projtype",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-projection.html#cfn-dynamodb-table-projection-projectiontype",
           "PrimitiveType": "String",
           "Required": false,
           "UpdateType": "Mutable"
@@ -503,22 +562,45 @@
       }
     },
     "AWS::DynamoDB::Table.ProvisionedThroughput": {
-      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-provisionedthroughput.html",
+      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-provisionedthroughput.html",
       "Properties": {
         "ReadCapacityUnits": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-provisionedthroughput.html#cfn-dynamodb-provisionedthroughput-readcapacityunits",
-          "PrimitiveType": "Long",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-provisionedthroughput.html#cfn-dynamodb-table-provisionedthroughput-readcapacityunits",
+          "PrimitiveType": "Integer",
           "Required": true,
           "UpdateType": "Mutable"
         },
         "WriteCapacityUnits": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-provisionedthroughput.html#cfn-dynamodb-provisionedthroughput-writecapacityunits",
-          "PrimitiveType": "Long",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-provisionedthroughput.html#cfn-dynamodb-table-provisionedthroughput-writecapacityunits",
+          "PrimitiveType": "Integer",
           "Required": true,
           "UpdateType": "Mutable"
         }
       }
     },
+    "AWS::DynamoDB::Table.S3BucketSource": {
+      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-s3bucketsource.html",
+      "Properties": {
+        "S3Bucket": {
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-s3bucketsource.html#cfn-dynamodb-table-s3bucketsource-s3bucket",
+          "PrimitiveType": "String",
+          "Required": true,
+          "UpdateType": "Immutable"
+        },
+        "S3BucketOwner": {
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-s3bucketsource.html#cfn-dynamodb-table-s3bucketsource-s3bucketowner",
+          "PrimitiveType": "String",
+          "Required": false,
+          "UpdateType": "Immutable"
+        },
+        "S3KeyPrefix": {
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-s3bucketsource.html#cfn-dynamodb-table-s3bucketsource-s3keyprefix",
+          "PrimitiveType": "String",
+          "Required": false,
+          "UpdateType": "Immutable"
+        }
+      }
+    },
     "AWS::DynamoDB::Table.SSESpecification": {
       "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-ssespecification.html",
       "Properties": {
@@ -543,10 +625,10 @@
       }
     },
     "AWS::DynamoDB::Table.StreamSpecification": {
-      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-streamspecification.html",
+      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-streamspecification.html",
       "Properties": {
         "StreamViewType": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-streamspecification.html#cfn-dynamodb-streamspecification-streamviewtype",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-streamspecification.html#cfn-dynamodb-table-streamspecification-streamviewtype",
           "PrimitiveType": "String",
           "Required": true,
           "UpdateType": "Mutable"
@@ -554,16 +636,16 @@
       }
     },
     "AWS::DynamoDB::Table.TimeToLiveSpecification": {
-      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-timetolivespecification.html",
+      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-timetolivespecification.html",
       "Properties": {
         "AttributeName": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-timetolivespecification.html#cfn-dynamodb-timetolivespecification-attributename",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-timetolivespecification.html#cfn-dynamodb-table-timetolivespecification-attributename",
           "PrimitiveType": "String",
           "Required": true,
           "UpdateType": "Mutable"
         },
         "Enabled": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-timetolivespecification.html#cfn-dynamodb-timetolivespecification-enabled",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-timetolivespecification.html#cfn-dynamodb-table-timetolivespecification-enabled",
           "PrimitiveType": "Boolean",
           "Required": true,
           "UpdateType": "Mutable"
@@ -665,6 +747,8 @@
       }
     },
     "AWS::DynamoDB::Table": {
+      "AllowCreationPolicy": "false",
+      "AllowUpdatePolicy": "false",
       "Attributes": {
         "Arn": {
           "PrimitiveType": "String"
@@ -673,15 +757,22 @@
           "PrimitiveType": "String"
         }
       },
+      "DeletionPolicy": {
+        "AllowedValues": [
+          "Delete",
+          "Retain"
+        ],
+        "Default": "Delete"
+      },
       "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html",
       "Properties": {
         "AttributeDefinitions": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-attributedef",
-          "DuplicatesAllowed": true,
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-attributedefinitions",
+          "DuplicatesAllowed": false,
           "ItemType": "AttributeDefinition",
           "Required": false,
           "Type": "List",
-          "UpdateType": "Conditional"
+          "UpdateType": "Mutable"
         },
         "BillingMode": {
           "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-billingmode",
@@ -690,19 +781,25 @@
           "UpdateType": "Mutable"
         },
         "ContributorInsightsSpecification": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-contributorinsightsspecification-enabled",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-contributorinsightsspecification",
           "Required": false,
           "Type": "ContributorInsightsSpecification",
           "UpdateType": "Mutable"
         },
         "GlobalSecondaryIndexes": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-gsi",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-globalsecondaryindexes",
           "DuplicatesAllowed": true,
           "ItemType": "GlobalSecondaryIndex",
           "Required": false,
           "Type": "List",
           "UpdateType": "Mutable"
         },
+        "ImportSourceSpecification": {
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-importsourcespecification",
+          "Required": false,
+          "Type": "ImportSourceSpecification",
+          "UpdateType": "Immutable"
+        },
         "KeySchema": {
           "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-keyschema",
           "DuplicatesAllowed": false,
@@ -718,12 +815,12 @@
           "UpdateType": "Mutable"
         },
         "LocalSecondaryIndexes": {
-          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-lsi",
+          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-localsecondaryindexes",
           "DuplicatesAllowed": true,
           "ItemType": "LocalSecondaryIndex",
           "Required": false,
           "Type": "List",
-          "UpdateType": "Immutable"
+          "UpdateType": "Mutable"
         },
         "PointInTimeRecoverySpecification": {
           "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-pointintimerecoveryspecification",

CDK CLI Version

main branch

Framework Version

No response

Node.js Version

v16.15.0

OS

Linux

Language

Typescript

Language Version

No response

Other information

No response

@laurelmay laurelmay added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 7, 2022
@peterwoodworth peterwoodworth removed the needs-triage This issue or PR still needs to be triaged. label Sep 8, 2022
@peterwoodworth
Copy link
Contributor

Thanks for letting us know about this, we're aware of it and have been working with CloudFormation to have a spec release which doesn't break the build 🙂

I'm going to close this because we're tracking it internally and I don't want this to stick around in our backlog, but thanks a ton for looking out for this @kylelaker it's much appreciated

@github-actions
Copy link

github-actions bot commented Sep 8, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/cfnspec bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants