ip_ranges.tf 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. locals {
  2. # Supernet(s) for the environment, see IP Address Allocation in wiki
  3. supernets = {
  4. prod = [
  5. "10.1.0.0/16", # Common Services (gov and commercial) supernet
  6. "10.32.0.0/12", # Prod (gov and commercial) supernet
  7. ],
  8. test = [
  9. "10.1.0.0/16", # Common Services (gov and commercial) supernet
  10. "10.16.0.0/12", # Test (gov and commercial) supernet
  11. ],
  12. common = []
  13. }[var.environment]
  14. # When there are multiples, put govcloud first, then commercial, and alternate if there are more than 2.
  15. # Put any standalone IPs at the end.
  16. #
  17. # See infrastructure_notes/Architecture_Notes.md and https://github.mdr.defpoint.com/mdr-engineering/msoc-infrastructure/wiki/IP-Address-Allocation for more information
  18. cidr_map = {
  19. prod = {
  20. "vpc-splunk" = ["10.40.16.0/22"], # Splunk -- **MOOSE**
  21. "vpc-access" = ["10.40.20.0/22"], # VPN, bastions (if any), etc.
  22. "vpc-public" = ["10.40.24.0/22"], # Public sites (github, ghe-backup, jira, ...)
  23. "vpc-scanners" = ["10.40.12.0/22"], # Qualys, etc.
  24. "vpc-system-services" = ["10.32.0.0/22", "10.40.0.0/22"], # Internal services such as dns, mailrelay, etc.
  25. "vpc-private-services" = ["10.40.28.0/22"], # Private Services - fm-shared-search, qcompliance, phantom, etc.
  26. # "old" mappings before architecture planning... we should eliminate these.
  27. "bastions" = ["10.40.20.0/22"], # vpc-access in mdr-prod-c2-gov
  28. "vpns" = ["10.40.20.0/22"], # vpc-access in mdr-prod-c2-gov
  29. "scanners" = ["10.40.12.0/22"], # vpc-qualys
  30. "dns" = ["10.40.0.0/22", "10.32.0.0/22"], # vpc-system-services in commercial nad gov
  31. "monitoring" = ["10.40.0.0/22"], # legacy sensu, and vpc-system-services in gov
  32. "salt" = ["10.40.0.0/22"], # legacy salt-master, and vpc-system-services in gov
  33. "web" = ["10.40.0.0/22"], # legacy proxy/repo, and vpc-system-services in gov
  34. "moose" = ["10.40.16.0/22"], # legacy vpc, and vpc-system-services in gov
  35. },
  36. test = {
  37. "vpc-splunk" = ["10.20.16.0/22"], # Splunk -- **MOOSE**
  38. "vpc-access" = ["10.20.20.0/22"], # VPN, bastions (if any), etc.
  39. "vpc-public" = ["10.20.24.0/22"], # Public sites (github, ghe-backup, jira, ...)
  40. "vpc-scanners" = ["10.20.12.0/22"], # Qualys, etc.
  41. "vpc-system-services" = ["10.16.0.0/22", "10.20.0.0/22"], # Internal services such as dns, mailrelay, etc.
  42. "vpc-private-services" = ["10.20.28.0/22"], # Private Services - fm-shared-search, qcompliance, phantom, etc.
  43. # "old" mappings before architecture planning... we should eliminate these.
  44. "bastions" = ["10.20.20.0/22"], # vpc-access in mdr-test-c2-gov
  45. "vpns" = ["10.20.20.0/22"], # vpc-access in mdr-test-c2-gov
  46. "scanners" = ["10.20.12.0/22"], # vpc-qualys
  47. "dns" = ["10.20.0.0/22", "10.16.0.0/22"], # vpc-system-services in commercial nad gov
  48. "monitoring" = ["10.20.0.0/22"], # legacy sensu, and vpc-system-services in gov
  49. "salt" = ["10.20.0.0/22"], # legacy salt-master, and vpc-system-services in gov
  50. "web" = ["10.20.0.0/22"], # legacy proxy/repo, and vpc-system-services in gov
  51. "moose" = ["10.20.16.0/22"], # legacy vpc and vpc-splunk in gov
  52. },
  53. common = {
  54. "bastions" = ["10.40.20.0/22"], # vpc-access in mdr-prod-c2-gov
  55. "vpns" = ["10.40.20.0/22"], # vpc-access in mdr-prod-c2-gov
  56. "scanners" = ["10.40.12.0/22"], # vpc-qualys
  57. "dns" = ["10.40.0.0/22", "10.32.0.0/22"], # vpc-system-services in commercial nad gov
  58. "monitoring" = ["10.40.0.0/22"], # legacy sensu, and vpc-system-services in gov
  59. "salt" = ["10.40.0.0/22"], # legacy salt-master, and vpc-system-services in gov
  60. "web" = ["10.40.0.0/22"], # legacy proxy/repo, and vpc-system-services in gov
  61. "smtp" = ["10.20.0.0/22"], # legacy relay, and vpc-system-services in gov
  62. "moose" = ["10.40.16.0/22"], # legacy vpc, and vpc-system-services in gov
  63. }
  64. }[var.environment]
  65. }