AWSTemplateFormatVersion: '2010-09-09' Description: Defend Togeher ECS Task Parameters: LogGroupName: Type: String Description: The AWS CloudWatch log group to output logs to. Default: "/ecs/dt" environment: Type: String Description: Name of the environment to use in naming. Default: production DockerTag: Description: Tag in DockerHub to deploy Type: String Default: "latest" RedisHostname: Description: Redis host to connect to Type: String Resources: LogGroup: Type: AWS::Logs::LogGroup Properties: RetentionInDays: 7 LogGroupName: !Sub "${LogGroupName}-auth/${environment}" TaskDefinition: Type: AWS::ECS::TaskDefinition Properties: ContainerDefinitions: - Name: defend-together-authorizer Essential: 'true' Image: !Sub "josephbmanley/defend-together-authorizer:${DockerTag}" MemoryReservation: 250 PortMappings: - HostPort: 7778 ContainerPort: 7778 Protocol: tcp Environment: - Name: REDIS_HOSTNAME Value: !Ref RedisHostname LogConfiguration: LogDriver: awslogs Options: awslogs-region: Ref: AWS::Region awslogs-group: Ref: LogGroup Outputs: TaskArn: Description: ARN of the TaskDefinition Value: !Ref TaskDefinition