---
AWSTemplateFormatVersion: "2010-09-09"
Parameters:
  IncludeBaseUrl:
    Type: String
Resources:
  DDBTableTransformAttributeDefinitions:
    Type: AWS::DynamoDB::Table
    Properties:
      AttributeDefinitions:
        Fn::Transform:
          - Name: AWS::Include
            Parameters:
              Location: !Sub "${IncludeBaseUrl}/attribute-definitions.yaml"
      KeySchema:
        - AttributeName: "pk"
          KeyType: "HASH"
  DDBTableTransformKeySchema:
    Type: AWS::DynamoDB::Table
    Properties:
      AttributeDefinitions:
        - AttributeName: "pk"
          AttributeType: "S"
      KeySchema:
        Fn::Transform:
          - Name: AWS::Include
            Parameters:
              Location: !Sub "${IncludeBaseUrl}/key-schema.yaml"
  DDBTableTransformBoth:
    Type: AWS::DynamoDB::Table
    Properties:
      AttributeDefinitions:
        Fn::Transform:
          - Name: AWS::Include
            Parameters:
              Location: !Sub "${IncludeBaseUrl}/attribute-definitions.yaml"
      KeySchema:
        Fn::Transform:
          - Name: AWS::Include
            Parameters:
              Location: !Sub "${IncludeBaseUrl}/key-schema.yaml"
