From 2970a1e4dd7cf27ca0b88382888e8bb84a85f160 Mon Sep 17 00:00:00 2001 From: Slava Senchenko Date: Thu, 23 Feb 2023 17:56:49 -0800 Subject: [PATCH] fix appsync-ddb connector integ tests --- .../connector_appsync_to_table.json | 38 +++++++++++++++++++ .../connector_appsync_to_table.yaml | 13 ++----- 2 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 integration/resources/expected/combination/connector_appsync_to_table.json diff --git a/integration/resources/expected/combination/connector_appsync_to_table.json b/integration/resources/expected/combination/connector_appsync_to_table.json new file mode 100644 index 000000000..9e8dc2908 --- /dev/null +++ b/integration/resources/expected/combination/connector_appsync_to_table.json @@ -0,0 +1,38 @@ +[ + { + "LogicalResourceId": "NotesTable", + "ResourceType": "AWS::DynamoDB::Table" + }, + { + "LogicalResourceId": "DynamoDBRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "AppSyncApi", + "ResourceType": "AWS::AppSync::GraphQLApi" + }, + { + "LogicalResourceId": "ApiKey", + "ResourceType": "AWS::AppSync::ApiKey" + }, + { + "LogicalResourceId": "ApiSchema", + "ResourceType": "AWS::AppSync::GraphQLSchema" + }, + { + "LogicalResourceId": "NotesTableDataSource", + "ResourceType": "AWS::AppSync::DataSource" + }, + { + "LogicalResourceId": "TriggerFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "TriggerFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "DataSourceToTableConnectorPolicy", + "ResourceType": "AWS::IAM::ManagedPolicy" + } +] diff --git a/integration/resources/templates/combination/connector_appsync_to_table.yaml b/integration/resources/templates/combination/connector_appsync_to_table.yaml index 1afe50387..c9ebe6541 100644 --- a/integration/resources/templates/combination/connector_appsync_to_table.yaml +++ b/integration/resources/templates/combination/connector_appsync_to_table.yaml @@ -1,19 +1,14 @@ Resources: NotesTable: - Type: AWS::DynamoDB::Table + Type: AWS::Serverless::SimpleTable Properties: - TableName: notes-table - AttributeDefinitions: - - AttributeName: UserId - AttributeType: S - KeySchema: - - AttributeName: NoteId - KeyType: HASH + PrimaryKey: + Name: NoteId + Type: String DynamoDBRole: Type: AWS::IAM::Role Properties: - RoleName: appsync-dynamodb-role AssumeRolePolicyDocument: Version: '2012-10-17' Statement: