resource "aws_rds_cluster" "switchboard-db-prod" {
  #checkov:skip=CKV_AWS_326: Ensure that RDS Aurora Clusters have backtracking enabled
  allocated_storage                   = 1
  availability_zones                  = ["us-east-1a", "us-east-1b", "us-east-1c"]
  backtrack_window                    = 0
  backup_retention_period             = 10
  cluster_identifier                  = "switchboard-db-prod"
  cluster_members                     = ["switchboard-db-prod"]
  copy_tags_to_snapshot               = true
  db_cluster_parameter_group_name     = "default.aurora-mysql8.0"
  db_subnet_group_name                = "sme_switchboard_prod_rds"
  deletion_protection                 = true
  enable_http_endpoint                = false
  enabled_cloudwatch_logs_exports     = ["audit", "error", "general", "slowquery"]
  engine                              = "aurora-mysql"
  engine_mode                         = "provisioned"
  engine_version                      = "8.0.mysql_aurora.3.08.2"
  iam_database_authentication_enabled = false
  iam_roles                           = []
  iops                                = 0
  kms_key_id                          = "arn:aws:kms:us-east-1:019963779799:key/d9d0cc05-ec2f-44a7-908a-0235b02be6aa"
  master_username                     = "Admin"
  network_type                        = "IPV4"
  port                                = 3306
  preferred_backup_window             = "09:09-09:39"
  preferred_maintenance_window        = "thu:07:22-thu:07:52"
  skip_final_snapshot                 = true
  storage_encrypted                   = true
  tags = {
    "Business-unit " = "Switchboard"
    Environment      = "Prod"
    Project-code     = "SME-200-0306A"
  }
  tags_all = {
    "Business-unit " = "Switchboard"
    Environment      = "Prod"
    Project-code     = "SME-200-0306A"
  }
  vpc_security_group_ids = ["sg-0d6fdb8d831ef4c04"]
  serverlessv2_scaling_configuration {
    max_capacity = 16
    min_capacity = 2
  }
  allow_major_version_upgrade = true
  apply_immediately = true
}