account.hcl 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. # Set account-wide variables. These are automatically pulled in to configure the remote state bucket in the root
  2. # terragrunt.hcl configuration.
  3. locals {
  4. account_name = "afs-mdr-prod-c2-gov"
  5. account_alias = "afs-mdr-prod-c2-gov"
  6. aws_account_id = "721817724804"
  7. instance_termination_protection = true # set to true for production!
  8. splunk_prefix = "moose"
  9. splunk_private_hec = true # True if the customer needs a private HTTP Event Collector such as for ALSI
  10. # For CIDR assignment, see https://github.mdr.defpoint.com/mdr-engineering/msoc-infrastructure/wiki/IP-Address-Allocation
  11. standard_vpc_cidr = "10.40.0.0/22"
  12. splunk_data_sources = [
  13. "170.248.172.0/23", # legacy afs_whitelist
  14. "20.190.250.137/32", # legacy afs_azure_whitelist: EastUS2_External_Access
  15. "52.232.227.197/32", # legacy afs_azure_whitelist: Azure US-East Palo
  16. "52.185.64.173/32", # legacy afs_azure_whitelist: CentralUS_External_Access
  17. "52.242.225.98/32", # legacy afs_azure_whitelist: Azure US-Central Palo 20200721
  18. "52.177.84.83/32", # legacy afs_azure_whitelist: Lab_External_Access
  19. "199.16.64.3/32", # legacy nga_whitelist
  20. "54.205.60.17/32", #FRTIB ALIGHT
  21. "52.206.203.98/32", #FRTIB ALIGHT
  22. "34.233.188.131/32", #FRTIB ALIGHT
  23. "34.214.247.125/32", #FRTIB ALIGHT2
  24. "44.235.174.214/32", #FRTIB ALIGHT2
  25. "52.89.203.9/32", #FRTIB ALIGHT2
  26. "52.61.113.202/32", #FRTIB VDI
  27. "15.200.226.57/32", #FRTIB CMPS
  28. "52.61.137.158/32", #BAS-Commerce CMPS
  29. "34.223.59.103/32", # CA-C19
  30. "44.234.190.14/32", # CA-C19
  31. "44.228.141.151/32", # CA-C19
  32. "18.215.158.202/32", # CA-C19
  33. "54.234.108.195/32", # CA-C19
  34. "34.228.38.91/32", # CA-C19
  35. "3.32.175.159/32", # DGI
  36. "15.200.13.143/32", # DGI
  37. "3.221.245.113/32", # FRTIB Chaos us-east-1
  38. "34.237.100.242/32", # FRTIB Chaos us-east-1
  39. "35.172.75.107/32", # FRTIB Chaos us-east-1
  40. "54.164.205.89/32", # FRTIB Chaos us-east-1
  41. "54.209.105.32/32", # FRTIB Chaos us-east-1
  42. "54.224.69.136/32", # FRTIB Chaos us-east-1
  43. ]
  44. splunk_legacy_cidr = [ # Allow splunk ports to/from here, too
  45. "10.80.0.0/16",
  46. ]
  47. splunk_asg_sizes = [ 1, 1, 1 ] # How many?
  48. splunk_volume_sizes = {
  49. "cluster_master" = {
  50. "swap": 8, # minimum: 8
  51. "/": 20, # minimum: 20
  52. "/home": 4, # minimum: 4
  53. "/var": 15, # minimum: 15
  54. "/var/tmp": 4, # minimum: 4
  55. "/var/log": 8, # minimum: 8
  56. "/var/log/audit": 8, # minimum: 8
  57. "/tmp": 4, # minimum: 4
  58. "/opt/splunk": 30, # No minimum; not in base image
  59. },
  60. "indexer" = {
  61. "swap": 8, # minimum: 8
  62. "/": 20, # minimum: 20
  63. "/home": 4, # minimum: 4
  64. "/var": 15, # minimum: 15
  65. "/var/tmp": 4, # minimum: 4
  66. "/var/log": 8, # minimum: 8
  67. "/var/log/audit": 8, # minimum: 8
  68. "/tmp": 4, # minimum: 4
  69. "/opt/splunk": 60, # No minimum; not in base image
  70. },
  71. "searchhead" = {
  72. "swap": 8, # minimum: 8
  73. "/": 20, # minimum: 20
  74. "/home": 4, # minimum: 4
  75. "/var": 15, # minimum: 15
  76. "/var/tmp": 4, # minimum: 4
  77. "/var/log": 8, # minimum: 8
  78. "/var/log/audit": 8, # minimum: 8
  79. "/tmp": 4, # minimum: 4
  80. "/opt/splunk": 60, # No minimum; not in base image
  81. },
  82. # qcompliance, fm-shared-search, and the monitoring console are all searchheads
  83. # "qcompliance" = {
  84. # "swap": 8, # minimum: 8
  85. # "/": 20, # minimum: 20
  86. # "/home": 4, # minimum: 4
  87. # "/var": 15, # minimum: 15
  88. # "/var/tmp": 4, # minimum: 4
  89. # "/var/log": 8, # minimum: 8
  90. # "/var/log/audit": 8, # minimum: 8
  91. # "/tmp": 4, # minimum: 4
  92. # "/opt/splunk": 30, # No minimum; not in base image
  93. # },
  94. "heavy_forwarder" = {
  95. "swap": 8, # minimum: 8
  96. "/": 20, # minimum: 10
  97. "/home": 4, # minimum: 4
  98. "/var": 15, # minimum: 15
  99. "/var/tmp": 4, # minimum: 4
  100. "/var/log": 8, # minimum: 8
  101. "/var/log/audit": 8, # minimum: 8
  102. "/tmp": 4, # minimum: 4
  103. "/opt/splunk": 30, # No minimum; not in base image
  104. },
  105. }
  106. account_tags = {
  107. "Client": local.splunk_prefix
  108. }
  109. c2_account_standards_path = "../../mdr-prod-c2/005-account-standards-c2"
  110. vpc_info = {
  111. "vpc-splunk" = {
  112. "name" = "vpc-splunk"
  113. "purpose" = "Splunk Systems (MOOSE)"
  114. "cidr" = "10.40.16.0/22",
  115. "tgw_attached" = true,
  116. },
  117. "vpc-system-services" = {
  118. "name" = "vpc-system-services",
  119. "purpose" = "Internal Services for Systems",
  120. "cidr" = "10.40.0.0/22",
  121. "tgw_attached" = false, # Attached via tgw creation
  122. },
  123. "vpc-scanners" = {
  124. "name" = "vpc-scanners",
  125. "purpose" = "Security Scanning",
  126. "cidr" = "10.40.12.0/22",
  127. "tgw_attached" = true,
  128. },
  129. "vpc-interconnects" = {
  130. "name" = "vpc-interconnects",
  131. "purpose" = "Interconnections between AWS partitions",
  132. "cidr" = "10.179.0.0/22",
  133. "tgw_attached" = true,
  134. },
  135. "vpc-access" = {
  136. "name" = "vpc-access"
  137. "purpose" = "Systems providing restricted access, such as bastions and vpn concentrators"
  138. "cidr" = "10.40.20.0/22",
  139. "tgw_attached" = true,
  140. },
  141. "vpc-portal" = {
  142. "name" = "vpc-portal"
  143. "purpose" = "The Customer Portal"
  144. "cidr" = "10.40.32.0/24",
  145. "tgw_attached" = true,
  146. },
  147. "vpc-public" = {
  148. "name" = "vpc-public"
  149. "purpose" = "Publicly Accessible Infrastructure Services, such as GHE and Jira"
  150. "cidr" = "10.40.24.0/22",
  151. "tgw_attached" = true,
  152. },
  153. "vpc-private-services" = {
  154. "name" = "vpc-private-services"
  155. "purpose" = "Private XDR Services for XDR users"
  156. "cidr" = "10.40.28.0/22",
  157. "tgw_attached" = true,
  158. },
  159. }
  160. instance_types = {
  161. #"alsi-master" = "t3a.small",
  162. #"alsi-worker" = "t3a.small",
  163. "bastion" = "t3a.medium",
  164. "fm-shared-search" = "m5a.large", # Legacy: t2.small, prod m4.large
  165. "github" = "c5.4xlarge", # legacy: c4.4xlarge in prod, c5.2xlarge in test
  166. "github-backup" = "t3a.medium", # legacy: t2.medium
  167. "jira-rds" = "db.t3.medium",
  168. "jira-server" = "m5a.xlarge", # legacy test: t2.small, legacy prod: t2.medium
  169. "nessus_security_center" = "m5a.xlarge",
  170. "nessus_scanners" = "m5a.large",
  171. "nessus_managers" = "m5a.large",
  172. "phantom" = "m5a.4xlarge", # legacy test: t2.medium, legacy prod: m4.4xlarge
  173. "qcompliance" = "c5a.8xlarge", # legacy: c4.8xlarge
  174. "rhsso" = "m5a.large",
  175. "rhsso-db" = "db.t3.micro"
  176. "splunk-cm" = "m5a.xlarge",
  177. "splunk-hf" = "m5a.4xlarge",
  178. "splunk-indexer" = "i3en.3xlarge",
  179. "splunk-mc" = "m5a.large", # Legacy: t2.small, prod m4.large
  180. "splunk-sh" = "m5a.4xlarge",
  181. "portal" = "t3a.medium", # legacy: t2.medium
  182. }
  183. # GitHub
  184. github_instance_count = 1
  185. github_data_volume_size = 500
  186. # Salt Master
  187. salt_master_instance_type = "t3a.xlarge"
  188. # mailrelay
  189. mailrelay_instance_type = "t3a.xlarge"
  190. # Nessus Scanner Variables
  191. nessus_scanner_count = 2
  192. nessus_manager_count = 1 # Can't see us needing more than one?
  193. # OpenVPN Server
  194. openvpn_instance_type = "t3a.medium"
  195. # Phantom Server
  196. phantom_instance_count = 1
  197. # Proxy
  198. proxy_server_instance_type = "t3a.medium"
  199. # Repo Server
  200. repo_server_instance_type = "t3a.xlarge"
  201. # rhsso
  202. rhsso_instance_count = 1 # > 1 is untested, likely requires additional work
  203. # DNS Resolver
  204. resolver_instance_type = "t3a.xlarge"
  205. # Vault Server
  206. vault_server_instance_type = "t3a.medium"
  207. # Sensu Server
  208. sensu_server_instance_type = "m5a.xlarge"
  209. # AS Number used for various resources, but not every account needs one.
  210. asn = 64810
  211. security_vpc_cidr = "10.179.0.0/22"
  212. # Interconnects
  213. interconnect_asn = 64888
  214. #interconnects_instance_type = "t3a.micro"
  215. interconnects_instance_type = "m5.xlarge"
  216. interconnects_key_name = "fdamstra" # DO NOT CHANGE
  217. interconnects_count = 2
  218. interconnect_instances_path = "../018-interconnect-instances"
  219. # Qualys Scanners
  220. qualys_personalization_codes = {
  221. standard = "21007869625439" # XDR_Prod_Govcloud_Standard
  222. preauthorized = "21028116523735" # XDR_Prod_Govcloud_Preauthorized
  223. }
  224. # Qualys Connector, defined in AssetView in Qualys Console
  225. qualys_connector_externalid = "1621818655116" # mdr-prod-c2-gov
  226. moose_cloudwatch_log_groups = {
  227. "/aws/lambda/portal_customer_sync" = {
  228. hec_token = "eb79bb2d-b27d-455d-bc5c-e8cf3165b294"
  229. firehose_name = "portal_customer_sync_firehose"
  230. lambda_function_name = "portal_customer_sync_kinesis_firehose_transform"
  231. s3_bucket_name = "${local.account_name}-kinesis-flowlogs-portal-customer-sync-s3"
  232. log_stream_name = "SplunkDelivery_portal_customer_sync"
  233. kinesis_firehose_lambda_role_name = "KinesisFirehoseToLambaRole-portal_customer_sync"
  234. kinesis_firehose_role_name = "kinesis-firehose-role-name-portal-customer-sync"
  235. lambda_iam_policy_name = "Kinesis-Firehose-to-Splunk-Policy-portal_customer_sync"
  236. kinesis_firehose_iam_policy_name = "KinesisFirehose-Policy-portal_customer_sync"
  237. cloudwatch_to_firehose_trust_iam_role_name = "CloudWatchToSplunkFirehoseTrust-portal_customer_sync"
  238. cloudwatch_to_fh_access_policy_name = "KinesisCloudWatchToFirehosePolicy-portal_customer_sync"
  239. }
  240. "/aws/lambda/portal_scheduler" = {
  241. hec_token = "bce12568-f390-4b17-8dfe-ea26b856820b"
  242. firehose_name = "portal_scheduler_firehose"
  243. lambda_function_name = "portal_scheduler_kinesis_firehose_transform"
  244. s3_bucket_name = "${local.account_name}-kinesis-flowlogs-portal-scheduler-s3"
  245. log_stream_name = "SplunkDelivery_portal_scheduler"
  246. kinesis_firehose_lambda_role_name = "KinesisFirehoseToLambaRole-portal_scheduler"
  247. kinesis_firehose_role_name = "kinesis-firehose-role-name-portal-scheduler"
  248. lambda_iam_policy_name = "Kinesis-Firehose-to-Splunk-Policy-portal_scheduler"
  249. kinesis_firehose_iam_policy_name = "KinesisFirehose-Policy-portal_scheduler"
  250. cloudwatch_to_firehose_trust_iam_role_name = "CloudWatchToSplunkFirehoseTrust-portal_scheduler"
  251. cloudwatch_to_fh_access_policy_name = "KinesisCloudWatchToFirehosePolicy-portal_scheduler"
  252. }
  253. "/aws/vpn" = {
  254. hec_token = "1E187167-1ED0-4AD1-A8C2-8AEB297C4E81"
  255. firehose_name = "aws_vpn_firehose"
  256. lambda_function_name = "aws_vpn_kinesis_firehose_transform"
  257. s3_bucket_name = "${local.account_name}-kinesis-aws-vpn-s3"
  258. log_stream_name = "ClientVPN"
  259. kinesis_firehose_lambda_role_name = "KinesisFirehoseToLambaRole-aws_vpn"
  260. kinesis_firehose_role_name = "kinesis-firehose-role-name-aws-vpn"
  261. lambda_iam_policy_name = "Kinesis-Firehose-to-Splunk-Policy-aws_vpn"
  262. kinesis_firehose_iam_policy_name = "KinesisFirehose-Policy-aws_vpn"
  263. cloudwatch_to_firehose_trust_iam_role_name = "CloudWatchToSplunkFirehoseTrust-aws_vpn"
  264. cloudwatch_to_fh_access_policy_name = "KinesisCloudWatchToFirehosePolicy-aws_vpn"
  265. },
  266. "/aws/lambda/AWSClientVPN-ConnectionHandler" = {
  267. hec_token = "BEB99C82-7608-454A-B0B1-CB1564A147A4"
  268. firehose_name = "aws_vpn_connectionhandler_firehose"
  269. lambda_function_name = "aws_vpn_connectionhandler_kinesis_firehose_transform"
  270. s3_bucket_name = "${local.account_name}-kinesis-aws-vpn-connectionhandler-s3"
  271. log_stream_name = "ClientVPNConnectionHandler"
  272. kinesis_firehose_lambda_role_name = "KinesisFirehoseToLambaRole-aws_vpn_connectionhandler"
  273. kinesis_firehose_role_name = "kinesis-firehose-role-name-aws-vpn-connectionhandler"
  274. lambda_iam_policy_name = "Kinesis-Firehose-to-Splunk-Policy-aws_vpn_connectionhandler"
  275. kinesis_firehose_iam_policy_name = "KinesisFirehose-Policy-aws_vpn_connectionhandler"
  276. cloudwatch_to_firehose_trust_iam_role_name = "CloudWatchToSplunkFirehoseTrust-aws_vpn_connectionhandler"
  277. cloudwatch_to_fh_access_policy_name = "KinesisCloudWatchToFirehosePolicy-aws_vpn_connectionhandler"
  278. }
  279. }
  280. }