variable "aws_region" {
  type        = string
  description = "The AWS region"
  default     = "us-east-1"
}

variable "route53_zone_name" {
  type        = string
  description = "The name of the Route 53 zone"
  default     = "qaorch.com"
}

variable "environment" {
  type        = string
  description = "The environment"
  default     = "qa"
}

variable "application_family" {
  type        = string
  description = "The application family"
  default     = "devops"
}

variable "service_name" {
  default = "qaorch.com"
}

variable "team_name" {
  type        = string
  description = "The team responsible for this configuration"
  default     = "devops"
}

variable "authorised_vpc_ids" {
  type        = set(string)
  description = "List of additional VPC IDs in other AWS accounts which are authorised to create associations with this zone"
  default = [
    "vpc-0b5758f69dd83c5cf" # Shared account us-east-1 VPC
  ]
}

variable "ram_share_ou_ids" {
  type    = set(string)
  default = [
    "ou-ax9e-vu43qt3i", # The Orchard OU
    "ou-ax9e-ouayejxi", # Data Strategy aka GDB OU
  ]
}

variable "a_records" {
  type = map(object({
    records = list(string)
    ttl     = optional(number, 300)
  }))
  default = {
    "qa2.db.qaorch.com" = {
      records = ["192.168.31.12"]
    },
  }
}

variable "cname_records" {
  type = map(object({
    records = list(string)
    ttl     = optional(number, 300)
  }))
  default = {
    "*.pullrequests.qaorch.com" = {
      records = ["qa-standalone-frontends.theorchard.io"]
      ttl     = 60
    },
    "abacus.qaorch.com" = {
      records = ["dd4hw9qxb29lx.cloudfront.net"]
    },
    "api.qaorch.com" = {
      records = ["qa-api-marketplace.theorchard.io"]
    },
    "audience.qaorch.com" = {
      records = ["d2tn85uec8rbpg.cloudfront.net"]
    },
    "chef04.qaorch.com" = {
      records = ["chef04.theorchard.local"]
    },
    "collaborators.qaorch.com" = {
      records = ["d27z9ciwi4k39r.cloudfront.net"]
    },
    "content.qaorch.com" = {
      records = ["d32ght6f119t1a.cloudfront.net"]
    },
    "distro-sandbox.qaorch.com" = {
      records = ["qa-frontend-gateway.theorchard.io"]
    },
    "documents.qaorch.com" = {
      records = ["d1fks6lhm8r63n.cloudfront.net"]
    },
    "images.qaorch.com" = {
      records = ["qa-ows-legacy-images.theorchard.io"]
    },
    "insights.qaorch.com" = {
      records = ["d36w4uvzh6xbji.cloudfront.net"]
    },
    "knowledgebase.qaorch.com" = {
      records = ["custom.intercom.help"]
    },
    "moneyhub.qaorch.com" = {
      records = ["dcgo1b81pwhc4.cloudfront.net"]
    },
    "nr.qaorch.com" = {
      records = ["d1qleqfpw335qb.cloudfront.net"]
    },
    "oa.qaorch.com" = {
      records = ["qa-oa.theorchard.io"]
    },
    "playground.qaorch.com" = {
      records = ["d2r09d21wip99g.cloudfront.net"]
    },
    "podcast.qaorch.com" = {
      records = ["ddu2o5vzwj0vz.cloudfront.net"]
    },
    "promo.qaorch.com" = {
      records = ["internal-qa-promo-theorchard-com-1412286172.us-east-1.elb.amazonaws.com"]
    },
    "prs.qaorch.com" = {
      records = ["qa-prs01.theorchard.local"]
    },
    "publishing.qaorch.com" = {
      records = ["deo0vjzq1e7uq.cloudfront.net"]
    },
    "pullrequests.qaorch.com" = {
      records = ["qa-standalone-frontends.theorchard.io"]
    },
    "qa.db.qaorch.com" = {
      records = ["qa-art-relations.cluster-cb22xqmk0y0q.us-east-1.rds.amazonaws.com"]
    },
    "qadb01.qaorch.com" = {
      records = ["qa-art-relations.cluster-cb22xqmk0y0q.us-east-1.rds.amazonaws.com"]
    },
    "qadddb.qaorch.com" = {
      records = ["qa-direct-delivery-cluster.cluster-cb22xqmk0y0q.us-east-1.rds.amazonaws.com"]
    }
    "settings.qaorch.com" = {
      records = ["dcgo1b81pwhc4.cloudfront.net"]
    },
    "solfege.qaorch.com" = {
      records = ["playground.qaorch.com"]
    },
    "sonymusic.qaorch.com" = {
      records = ["ddu2o5vzwj0vz.cloudfront.net"]
    },
    "uat-abacus.qaorch.com" = {
      records = ["dsmi0ty7zbi5i.cloudfront.net"]
    }
    "vector-redis01.qaorch.com" = {
      records = ["qa-vector-redis01.theorchard.local"]
    },
    "vectorapi.qaorch.com" = {
      records = ["internal-qa-vapi-250698189.us-east-1.elb.amazonaws.com"]
    },
    "video-thumbnails.qaorch.com" = {
      records = ["dybaneaep1uit.cloudfront.net"]
    },
    "webservice.qaorch.com" = {
      records = ["qa-webservice.theorchard.io"]
    },
    "webservices.qaorch.com" = {
      records = ["qa-ows-metadata.theorchard.io"]
    },
    "coda.qaorch.com" = {
      records = ["qa-ows-coda.theorchard.io"]
    },
    "workstation.qaorch.com" = {
      records = ["qa-workstation.theorchard.io"]
    }
  }
}
