# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 AWSTemplateFormatVersion: '2010-09-09' Description: DRS Plan Automation DynamoDB Tables Parameters: env: Type: String Resources: DRSPlanAutomationApplicationsTable: Type: AWS::DynamoDB::Table Properties: TableName: !Sub "drs-plan-automation-applications-${env}" BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: "AppId" AttributeType: "S" KeySchema: - AttributeName: "AppId" KeyType: "HASH" DRSPlanAutomationAccountsTable: Type: AWS::DynamoDB::Table Properties: TableName: !Sub "drs-plan-automation-accounts-${env}" BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: "AccountId" AttributeType: "S" KeySchema: - AttributeName: "AccountId" KeyType: "HASH" DRSPlanAutomationExecutionTable: Type: AWS::DynamoDB::Table Properties: TableName: !Sub "drs-plan-automation-executions-${env}" BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: "ExecutionId" AttributeType: "S" - AttributeName: "StartDate" AttributeType: "S" KeySchema: - AttributeName: "ExecutionId" KeyType: "HASH" - AttributeName: "StartDate" KeyType: "RANGE" DRSPlanAutomationPlanResultsTable: Type: AWS::DynamoDB::Table Properties: TableName: !Sub "drs-plan-automation-results-${env}" BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: "AppId_PlanId" AttributeType: "S" - AttributeName: "ExecutionId" AttributeType: "S" KeySchema: - AttributeName: "AppId_PlanId" KeyType: "HASH" - AttributeName: "ExecutionId" KeyType: "RANGE" Outputs: DRSPlanAutomationAccountsTableName: Value: !Ref DRSPlanAutomationAccountsTable Description: "DRS Accounts Table Name" Export: Name: !Sub "drs-plan-automation-accounts-table-name-${env}" DRSPlanAutomationAccountsTableArn: Value: !GetAtt DRSPlanAutomationAccountsTable.Arn Description: "DRS Accounts Table Arn" Export: Name: !Sub "drs-plan-automation-accounts-table-arn-${env}" DRSPlanAutomationApplicationsTableName: Value: !Ref DRSPlanAutomationApplicationsTable Description: "DRS Applications Table Name" Export: Name: !Sub "drs-plan-automation-applications-table-name-${env}" DRSPlanAutomationApplicationsTableArn: Value: !GetAtt DRSPlanAutomationApplicationsTable.Arn Description: "DRS Applications Table Arn" Export: Name: !Sub "drs-plan-automation-applications-table-arn-${env}" DRSPlanAutomationPlanResultsTableName: Value: !Ref DRSPlanAutomationPlanResultsTable Description: "DRS Plan Automation Results Table Name" Export: Name: !Sub "drs-plan-automation-plan-results-table-name-${env}" DRSPlanAutomationPlanResultsTableArn: Value: !GetAtt DRSPlanAutomationPlanResultsTable.Arn Description: "DRS Plan Automation Results Table Arn" Export: Name: !Sub "drs-plan-automation-plan-results-table-arn-${env}" DRSPlanAutomationPlanExecutionTableName: Value: !Ref DRSPlanAutomationExecutionTable Description: "DRS Plan Automation Execution Table Name" Export: Name: !Sub "drs-plan-automation-plan-execution-table-name-${env}" DRSPlanAutomationPlanExecutionTableArn: Value: !GetAtt DRSPlanAutomationExecutionTable.Arn Description: "DRS Plan Automation Execution Table Arn" Export: Name: !Sub "drs-plan-automation-plan-execution-table-arn-${env}"