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

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

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

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

variable "a_records" {
  type = map(object({
    records = list(string)
  }))
  default = {
    "kube.theorchard.io" = {
      records = ["52.73.133.33"]
    }
    "playlister.theorchard.io" = {
      records = ["10.100.2.32"]
    }
    "redash.theorchard.io" = {
      records = ["10.100.1.238"]
    }
    "tinder.theorchard.io" = {
      records = ["192.168.31.87"]
    }
  }
}

variable "cname_records" {
  type = map(object({
    records = list(string)
  }))
  default = {
    "0swccq1p8mwj6ygt78wrz8srzr6hjpwz.theorchard.io" = {
      records = ["dcv.digicert.com"]
    }
    "_iugqp4trlovmey7jhomic9borqp6k9z.theorchard.io" = {
      records = ["dcv.digicert.com"]
    }
  }
}

variable "acm_dns_validation_records" {
  description = "DNS records used for ACM validation of *.theorchard.io certificates in additional AWS accounts"
  type = map(object({
    records = list(string)
  }))
  default = {
    "_c1bacd8d8cb39a3a3303b317d21f4a57.theorchard.io" = {
      records = ["_6e7c6ab57d60108af69bce9aa446d562.btsqtkxpyp.acm-validations.aws."] # QA Permissions Platform
    },
    "_560287256360028880a9820b6a53cdaf.theorchard.io." = {
      records = ["_36796fa7083688c6039cda1b0bbe9609.btsqtkxpyp.acm-validations.aws."] # Prod Permissions Platform
    },
    "_c651209d247b7f4dd5881322e62d6214.theorchard.io." = {
      records = ["_8bcc2917ba75919bd6a3f7de5e2c7c1f.zqmpdywczv.acm-validations.aws."] # QA Fansifter
    },
    "_cf53b92ec3f626d41c9a58917cdfbbb2.theorchard.io." = {
      records = ["_d229f40bd4b9f4cc9f0edfeed0886fb1.sdgjtdhdhz.acm-validations.aws."] # PROD Fansifter
    },
    "_f607dbb3c6fc96a69bd7c9c8742a9b8f.theorchard.io." = {
      records = ["_d495a0fd11e81fa567f3832eb8b34302.mhbtsbpdnt.acm-validations.aws."] # Shared
    },
    "_fcf0c183e9c8a1d218229e7046adfe52.theorchard.io." = {
      records = ["_83bafef0208c50fea41891b9e3c0b006.mhbtsbpdnt.acm-validations.aws."] # Accounting QA
    }
    "_5bab7748116dd76ce7e8b644bd9a652a.theorchard.io." = {
      records = ["_22068325a53849bd0774685a92bccb0a.mhbtsbpdnt.acm-validations.aws."] # Accounting PROD
    }
    "_904caf000741b8fa09ee35ccc4c8fbe1.theorchard.io." = {
      records = ["_6163c1f8b2fca445481476097c18e09b.djqtsrsxkq.acm-validations.aws."] # PROD Disaster Recovery
    }
    "_5099cec0b1faeb99886496b97bb51fc4.theorchard.io." = {
      records = ["_2629adebbc4c46446b8698b764f98c25.zfyfvmchrl.acm-validations.aws."] # QA Supply Chain
    }
    "_c15a1f7f3fe6c146c888bbba8314c463.theorchard.io." = {
      records = ["_21fcbee77ff10cc603cbf91100208074.jkddzztszm.acm-validations.aws."] # QA Songwhip
    }
  }
}

variable "txt_records" {
  type = map(object({
    records = list(string)
  }))
  default = {
    "theorchard.io" = {
      records = ["1688462ea6fd4e1fa0a34b1169fafd42"]
    },
    "_amazonses.theorchard.io." = {
      records = ["GjRnfPgiaZL8mftLuK8DMO0Ni2afj8hRKc1OuUBxJ8w="]
    },
    "_dnsauth.theorchard.io." = {
      records = ["_ybtxyzuow80a90oyc81ai3keiuw2uua.dcv.digicert.com"]
    }
  }
}

variable "mx_records" {
  type = map(object({
    records = list(string)
  }))
  default = {
    "test.theorchard.io" = {
      records = ["10 inbound-smtp.us-east-1.amazonaws.com"]
    }
  }
}
