# Set common variables for the environment. This is automatically pulled in in the root terragrunt.hcl configuration to
# feed forward to the child modules.
locals {
  environment = "common"
  transit_gateway_account_name = "mdr-prod-c2" # Which account has the transit gateway

  environment_tags = {
    "Schedule" = "none",
    Environment = local.environment
  }

  proxy = "proxy.pvt.xdr.accenturefederalcyber.com"
  proxy_ip = "10.80.101.166"
  salt_master = "salt-master.pvt.xdr.accenturefederalcyber.com"
  salt_master_ip = "10.80.101.170"
  hec = "iratemoses.pvt.xdr.accenturefederalcyber.com"
  hec_pub = "moose-hec.mdr.defpoint.com"
  hec_pub_ack = "moose-hec-ack.mdr.defpoint.com"

  # When there are multiples, put govcloud first, then commercial, and alternate if there are more than 2.
  # Put any standalone IPs at the end.
  cidr_map = {
    "bastions" = [ "10.80.101.133/32", "10.40.20.0/22" ], # vpc-access in mdr-prod-c2-gov
    "vpns"     = [ "10.80.101.126/32", "10.40.20.0/22" ], # vpc-access in mdr-prod-c2-gov
    "scanners" = [ "10.40.12.0/22" ], # vpc-qualys
    "dns"      = [ "10.40.0.0/22", "10.32.0.0/22" ], # vpc-system-services in commercial nad gov
    "monitoring" = [ "10.80.101.230/32", "10.40.0.0/22" ], # legacy sensu, and vpc-system-services in gov
    "salt"     = [ "10.80.101.170/32", "10.40.0.0/22" ], # legacy salt-master, and vpc-system-services in gov
    "web"      = [ "10.80.101.166/32", "10.80.101.197/32", "10.40.0.0/22" ], # legacy proxy/repo, and vpc-system-services in gov
    "smtp"     = [ "10.80.1.107/32", "10.20.0.0/22" ], # legacy relay, and vpc-system-services in gov
    "moose"    = [ "10.80.0.0/16", "10.40.16.0/22" ], # legacy vpc, and vpc-system-services in gov
  }

  legacy_account = "477548533976"
  c2_accounts = {
    "aws-us-gov" = "721817724804" # mdr-prod-c2-gov
    "aws"        = "045312110490" # mdr-prod-c2
  }

  aws_flowlogs_hec_token = "4a2cacb2-fea1-4328-8f25-9bef26333e91"

  # Common services doesn't have DNS Servers
  #dns_servers = [
  #]
  # Note: 'private' and 'reverse' do not presently work in common services
  dns_info = {
    "private" = {
      zone = "pvt.xdr.accenturefederalcyber.com",
      zone_id = "Z08498911YSZW4A0XN4AG"
    },
    "public" = {
      zone = "xdr.accenturefederalcyber.com"
      zone_id = "Z0083657A94URZM2TM87"
    },
    "legacy_private" = {
      zone = "msoc.defpoint.local"
      zone_id = "Z2JVOIKXZP64QP"
    },
    "legacy_public" = {
      zone = "mdr.defpoint.com"
      zone_id = "Z2HYR9YEZ4KLDE"
    },
  }

  # legacy DNS
  dns_private = {
    "id" = "Z2JVOIKXZP64QP"
    "name" = "msoc.defpoint.local"
  }
  dns_private2 = {
    # There are many of these... future task to figure it out
    "id" = "Z2RGT77XQU1QBX"
    "name" = "mdr.defpoint.com"
  }
  dns_public = {
    "id" = "Z2HYR9YEZ4KLDE"
    "name" = "mdr.defpoint.com"
  }

}
