variable "environment" {
  description = "Available values: dev, qa, prod."
  default     = "qa"
}

variable "region" {
  default     = "us-east-1"
  description = "aws resources region"
}

variable "service_name" {
  description = "Service name"
  default     = "lambda-asset-tools"
}

variable "bulk_asset_download_tool_name" {
  description = "lambda-asset-tools tool name"
  default     = "bulk-asset-download"
}

variable "datadog_enabled" {
  description = "Whether or not to attach datadog secretsmanager IAM policy"
  default     = true
}

variable "datadog_advanced_enabled" {
  description = "Enabled DataDog monitoring."
  default     = true
}

variable "lambda_default_timeout" {
  description = "Default value for timeout"
  default     = "900"
}

variable "lambda_concurrent_executions" {
  description = "Number of lambda concurrent executions"
  default     = 10
}

variable "application_family" {
  type        = string
  description = "Name of application family"
  default     = "assets"
}

variable "team_name" {
  type        = string
  description = "Name of team that owns the service"
  default     = "content-delivery-asset-management"
}

variable "lambda_memory_size" {
  description = "Memory size for the lambda function"
  default     = "128"
}

variable "lambda_get_asset_locations_name" {
  description = "get asset locations lambda name"
  default     = "get-asset-locations"
}

variable "lambda_generate_error_report_name" {
  description = "gererate error report lambda name"
  default     = "generate-error-report"
}

variable "notification_endpoints" {
  default = "@slack-content-delivery-and-asset-mgmt-qa-alerts"
}

variable "lambda_get_products_for_account_name" {
  description = "get-products-for-account lambda name"
  default     = "get-products-for-account"
}

variable "asset_copy_worker_name" {
  description = "asset-copy-worker fargate task name"
  default     = "asset-copy-worker"
}

variable "page_limit" {
  description = "number of products to query per request"
  default     = 10000
}

variable "get_asset_locations_reserved_concurrency_limit" {
  description = "concurrent executions limit for get-asset-locations lambda"
  default     = 75
}

variable "mezzanine_assets_buckets" {
  type = map(string)
  description = "Map of S3 buckets and paths within that bucket to which this group will receive read-only access"
  default = {
    "qa-orcd-video-assets": "*",
    "qa-orcd-mezzanine-assets": "*",
  }
}

variable "sns_notifications_slack_email_address" {
  description = "Slack endpoint for step function"
  default = "bulk-asset-download-a-aaaaqu4owro6bakt5djauva5gi@sonymusic.org.slack.com"
}

variable "user_access_prefixes" {
  description = "List of maps containing user names and prefixes they should have access to"
  type = list(object({
    username           = string
    create_aws_user    = optional(bool, false) # Whether to create an AWS IAM user for this access
    prefixes           = list(string)
    access_expiry_date = string # YYYY-MM-DD format (e.g. 2025-08-29)
  }))
  default = [
    {
      username = "listbucket-test",
      prefixes = [
        "test-export-123",
      ],
      create_aws_user    = true,
      access_expiry_date = "2025-10-21"
    },
  ]
}
