AWSTemplateFormatVersion: "2010-09-09"
Transform: "AWS::Serverless-2016-10-31"
Parameters:
  FTAPPKEY:
    Type: String
    Description: An APP Token from FireTails platform. It will start with FTA-01-
    AllowedPattern: "FTA-01-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
    NoEcho: true
  FTAPI:
    Type: String
    Default: "https://api.logging.eu-west-1.prod.firetail.app/logs/llm/bedrock"
  BedrockLoggingCloudWatchLogGroup:
    Description: Name of the Cloudwatch Log Group used for ALB Access Logging
    Type: String
    MaxLength: 63
  ApplicationId:
    Type: String
    Default: "arn:aws:serverlessrepo:eu-west-1:247286868737:applications/firetail-bedrock-logger-from-cloudwatch"
  SemanticVersion:
    Type: String
    Default: 0.1.5
Resources:
  FiretailApp:
    Type: AWS::Serverless::Application
    Properties:
      Location:
        ApplicationId: !Ref ApplicationId
        SemanticVersion: !Ref SemanticVersion
      Parameters:
        BedrockLoggingCloudWatchLogGroup: !Ref BedrockLoggingCloudWatchLogGroup
        FTAPPKEY: !Ref FTAPPKEY
        FTAPI: !Ref FTAPI
