variable "aws_region" {
  default     = "us-west-2"
  description = "Which AWS region to spin up the environment in"
}

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

variable "service_name" {
  default = "orcd-cdn-us-west01"
}

variable "application_family" {
  description = "Application family to which this service belongs."
  default     = "cdn"
}

variable "domain_name" {
  description = "Name of domain"
  default     = "theorchard.io"
}

# Cloudfront settings
variable "allowed_methods" {
  description = "Allowed HTTP methods for Cloudfront"
  default     = ["HEAD", "GET", "OPTIONS"]
}

variable "cached_methods" {
  description = "Cached HTTP methods for Cloudfront"
  default     = ["HEAD", "GET"]
}

variable "default_ttl" {
  description = "Default TTL for objects in absence of cache headers"
  default     = "86400"
}

variable "cloudfront_minimum_protocol_version" {
  description = "Minimum SSL protocol"
  default     = "TLSv1.2_2021"
}

variable "cloudfront_logging_bucket" {
  description = "Bucket to use for cloudfront logging"
  default     = "prod-orcd-cloudfront-logs.s3.amazonaws.com"
}

variable "frontend_content_origin_access_identity_arns" {
  type        = list(string)
  description = "Origin access identity ARNs that can access frontend-content"
  default = [
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1TVDY012MIMRX", # content.theorchard.com failover
  ]
}

variable "frontend_publishing_origin_access_identity_arns" {
  type        = list(string)
  description = "Origin access identity ARNs that can access frontend-publishing"
  default = [
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1ETEMOTQ4TJ49", # publishing.theorchard.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2RCYXVU32WGC5", # publishing.awal.com
  ]
}

variable "frontend_documents_origin_access_identity_arns" {
  type        = list(string)
  description = "Origin access identity ARNs that can access frontend-documents"
  default = [
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E3P0ID7I2SDR53", # documents.theorchard.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E9NPN0NYHTOYL", # documents.prodawal.com
  ]
}

variable "frontend_settings_origin_access_identity_arns" {
  type        = list(string)
  description = "Origin access identity ARNs that can access frontend-settings"
  default = [
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity EBB9KZNBEUEYZ", # settings.theorchard.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1QUYZ2PFMH5E7", # settings.prodawal.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2WVQY73H70RQ9", # settings.kollectivenr.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity EW9B181TXN38J", # settings.sonymusic.com
  ]
}

variable "frontend_collaborator-suite_origin_access_identity_arns" {
  type        = list(string)
  description = "Origin access identity ARNs that can access frontend-collaborator-suite"
  default = [
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1YBSPHMBRT94N", # collaborators.theorchard.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2M2FFUSA5WHXG", # collaborators.prodawal.com
  ]
}

variable "frontend_insights_origin_access_identity_arns" {
  type        = list(string)
  description = "Origin access identity ARNs that can access frontend-insights"
  default = [
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E107N9CECN1TZC", # insights.theorchard.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E151WUYXIPPWTW", # insights.prodawal.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1YWCJF5E5SWE6", # insights.sonymusic.com
  ]
}

variable "frontend_royalties_origin_access_identity_arns" {
  type        = list(string)
  description = "Origin access identity ARNs that can access frontend-royalties (abacus)"
  default = [
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1DFXUSSMHEL12", # abacus.theorchard.com
  ]
}

variable "frontend_moneyhub_origin_access_identity_arns" {
  type        = list(string)
  description = "Origin access identity ARNs that can access frontend-moneyhub"
  default = [
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1BKJGF4BU3BP0", # accounting.theorchard.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2WLIPCTINBXHY", # accounting.awal.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E14KQWPRP02YUG", # accounting.kollectivenr.com
  ]
}

variable "frontend_solfege_origin_access_identity_arns" {
  type        = list(string)
  description = "Origin access identity ARNs that can access frontend-solfege"
  default = [
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2RPFKA5CNWWBF", # solfege.theorchard.com
  ]
}

variable "frontend_workstation_origin_access_identity_arns" {
  type        = list(string)
  description = "Origin access identity ARNs that can access frontend-workstation"
  default = [
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2P53BS0YBN6MA", # workstation.theorchard.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2I5MF3TNEEYFT", # workstation.prodawal.com
  ]
}

variable "frontend_audience_development_origin_access_identity_arns" {
  type        = list(string)
  description = "Origin access identity ARNs that can access frontend-audience-development"
  default = [
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2A1S89Y5YVG6Y", # fansifter.theorchard.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1RZ8MNT5WRONU", # fansifter.awal.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1I6IJEJMAO5U",  # fansifter.sonymusic.com
  ]
}

variable "frontend_distribution_suite_origin_access_identity_arns" {
  type        = list(string)
  description = "Origin access identity ARNs that can access frontend-distribution-suite"
  default = [
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E35ZUW1LVLUFTW", # distribution.theorchard.com
  ]
}

variable "frontend_account360_origin_access_identity_arns" {
  type        = list(string)
  description = "Origin access identity ARNs that can access frontend-account360"
  default = [
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity ECQ759T0J1TWD", # account360.theorchard.com
    "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2R43U4D619SFW", # account360.sonymusic.com
  ]
}

variable "frontend_songwhip_origin_access_identity_id" {
  type        = string
  description = "ID of origin access identity that can access frontend-songwhip"
  default     = "EDZM2WHRZM8SR" # songwhip.theorchard.com
}
