variable aws_region {
  description = "All elements of the state machine execution flow have to be placed in the same region."
  default     = "us-east-1"
}

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

variable service_name {
  default = "ows-podcast"
}

variable "application_family" {
  default = "podcast"
}

variable "output_assets_bucket_cors" {
  type        = list
  description = "List of CORS rules for output assets bucket"
  default     =  [
    {
      allowed_headers = ["*"]
      allowed_methods = ["GET"]
      allowed_origins = ["http://localhost:*"]
      expose_headers  = ["ETag"]
      max_age_seconds = 3000
    },
    {
      allowed_headers = ["*"]
      allowed_methods = ["GET"]
      allowed_origins = ["http://podcast.dev.theorchard.io", "https://podcast.dev.theorchard.io"]
      expose_headers  = ["ETag"]
      max_age_seconds = 3000
    },
    {
      allowed_headers = ["*"]
      allowed_methods = ["PUT", "POST"]
      allowed_origins = ["http://localhost:*"]
      expose_headers  = ["ETag"]
      max_age_seconds = 3000
    },
    {
      allowed_headers = ["*"]
      allowed_methods = ["PUT", "POST"]
      allowed_origins = ["http://podcast.dev.theorchard.io", "https://podcast.dev.theorchard.io"]
      expose_headers  = ["ETag"]
      max_age_seconds = 3000
    },
  ]
}

variable output_assets_cdn_certificate_arn {
  description = "Certificate ARN for output assets cloudfront configuration"
  default = "arn:aws:acm:us-east-1:103233932089:certificate/a1a3c6c2-523f-4f79-ba24-ce69f21ac066"
}

variable "output_assets_domain" {
  description = "Domain name for output bucket assets"
  default = "podcast-output-assets.dev.theorchard.io"
}

variable vpc_security_group_ids {
  type        = list
  description = "Security group IDs for the VPC where the lambdas will execute"
  default = ["sg-351b5751"]
}

variable vpc_subnet_ids {
  type        = list
  description = "VPC subnet IDs where the lambdas will execute"
  default = ["subnet-b649dfef", "subnet-44c19a21"]
}

variable additional_browser_assume_role_arns {
  type        = list
  description = "User ARNs who are allowed to execute assumeRole required by upload-token"
  default     = []
}

variable "image_encoding_lambda_memory_size" {
  description = "Memory size for the image encoding lambda function"
  default     = 3008
}

variable "route53_zone_id" {
  description = "AWS Route 53 zone id"
  default     = "Z21XEY26C989RH"
}

variable "secrets_manager_secret_names" {
  description = "List of secrets manager secrets to create"
  type        = list(string)
  default = [
  ]
}
