account.hcl 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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. ]
  38. splunk_legacy_cidr = [ # Allow splunk ports to/from here, too
  39. "10.80.0.0/16",
  40. ]
  41. splunk_asg_sizes = [ 1, 1, 1 ] # How many?
  42. splunk_volume_sizes = {
  43. "cluster_master" = {
  44. "swap": 8, # minimum: 8
  45. "/": 20, # minimum: 20
  46. "/home": 4, # minimum: 4
  47. "/var": 15, # minimum: 15
  48. "/var/tmp": 4, # minimum: 4
  49. "/var/log": 8, # minimum: 8
  50. "/var/log/audit": 8, # minimum: 8
  51. "/tmp": 4, # minimum: 4
  52. "/opt/splunk": 30, # No minimum; not in base image
  53. },
  54. "indexer" = {
  55. "swap": 8, # minimum: 8
  56. "/": 20, # minimum: 20
  57. "/home": 4, # minimum: 4
  58. "/var": 15, # minimum: 15
  59. "/var/tmp": 4, # minimum: 4
  60. "/var/log": 8, # minimum: 8
  61. "/var/log/audit": 8, # minimum: 8
  62. "/tmp": 4, # minimum: 4
  63. "/opt/splunk": 60, # No minimum; not in base image
  64. },
  65. "searchhead" = {
  66. "swap": 8, # minimum: 8
  67. "/": 20, # minimum: 20
  68. "/home": 4, # minimum: 4
  69. "/var": 15, # minimum: 15
  70. "/var/tmp": 4, # minimum: 4
  71. "/var/log": 8, # minimum: 8
  72. "/var/log/audit": 8, # minimum: 8
  73. "/tmp": 4, # minimum: 4
  74. "/opt/splunk": 60, # No minimum; not in base image
  75. },
  76. # qcompliance, fm-shared-search, and the monitoring console are all searchheads
  77. # "qcompliance" = {
  78. # "swap": 8, # minimum: 8
  79. # "/": 20, # minimum: 20
  80. # "/home": 4, # minimum: 4
  81. # "/var": 15, # minimum: 15
  82. # "/var/tmp": 4, # minimum: 4
  83. # "/var/log": 8, # minimum: 8
  84. # "/var/log/audit": 8, # minimum: 8
  85. # "/tmp": 4, # minimum: 4
  86. # "/opt/splunk": 30, # No minimum; not in base image
  87. # },
  88. "heavy_forwarder" = {
  89. "swap": 8, # minimum: 8
  90. "/": 20, # minimum: 10
  91. "/home": 4, # minimum: 4
  92. "/var": 15, # minimum: 15
  93. "/var/tmp": 4, # minimum: 4
  94. "/var/log": 8, # minimum: 8
  95. "/var/log/audit": 8, # minimum: 8
  96. "/tmp": 4, # minimum: 4
  97. "/opt/splunk": 30, # No minimum; not in base image
  98. },
  99. }
  100. account_tags = {
  101. "Client": local.splunk_prefix
  102. }
  103. c2_account_standards_path = "../../mdr-prod-c2/005-account-standards-c2"
  104. vpc_info = {
  105. "vpc-splunk" = {
  106. "name" = "vpc-splunk"
  107. "purpose" = "Splunk Systems (MOOSE)"
  108. "cidr" = "10.40.16.0/22",
  109. "tgw_attached" = true,
  110. },
  111. "vpc-system-services" = {
  112. "name" = "vpc-system-services",
  113. "purpose" = "Internal Services for Systems",
  114. "cidr" = "10.40.0.0/22",
  115. "tgw_attached" = false, # Attached via tgw creation
  116. },
  117. "vpc-scanners" = {
  118. "name" = "vpc-scanners",
  119. "purpose" = "Security Scanning",
  120. "cidr" = "10.40.12.0/22",
  121. "tgw_attached" = true,
  122. },
  123. "vpc-interconnects" = {
  124. "name" = "vpc-interconnects",
  125. "purpose" = "Interconnections between AWS partitions",
  126. "cidr" = "10.179.0.0/22",
  127. "tgw_attached" = true,
  128. },
  129. "vpc-access" = {
  130. "name" = "vpc-access"
  131. "purpose" = "Systems providing restricted access, such as bastions and vpn concentrators"
  132. "cidr" = "10.40.20.0/22",
  133. "tgw_attached" = true,
  134. },
  135. "vpc-portal" = {
  136. "name" = "vpc-portal"
  137. "purpose" = "The Customer Portal"
  138. "cidr" = "10.40.32.0/24",
  139. "tgw_attached" = true,
  140. },
  141. "vpc-public" = {
  142. "name" = "vpc-public"
  143. "purpose" = "Publicly Accessible Infrastructure Services, such as GHE and Jira"
  144. "cidr" = "10.40.24.0/22",
  145. "tgw_attached" = true,
  146. },
  147. "vpc-private-services" = {
  148. "name" = "vpc-private-services"
  149. "purpose" = "Private XDR Services for XDR users"
  150. "cidr" = "10.40.28.0/22",
  151. "tgw_attached" = true,
  152. },
  153. }
  154. instance_types = {
  155. #"alsi-master" = "t3a.small",
  156. #"alsi-worker" = "t3a.small",
  157. "bastion" = "t3a.medium",
  158. "fm-shared-search" = "m5a.large", # Legacy: t2.small, prod m4.large
  159. "github" = "c5.4xlarge", # legacy: c4.4xlarge in prod, c5.2xlarge in test
  160. "github-backup" = "t3a.medium", # legacy: t2.medium
  161. "jira-rds" = "db.t3.medium",
  162. "jira-server" = "m5a.xlarge", # legacy test: t2.small, legacy prod: t2.medium
  163. "nessus_security_center" = "m5a.xlarge",
  164. "nessus_scanners" = "m5a.large",
  165. "nessus_managers" = "m5a.large",
  166. "phantom" = "m5a.4xlarge", # legacy test: t2.medium, legacy prod: m4.4xlarge
  167. "qcompliance" = "c5a.8xlarge", # legacy: c4.8xlarge
  168. "rhsso" = "m5a.large",
  169. "rhsso-db" = "db.t3.micro"
  170. "splunk-cm" = "m5a.xlarge",
  171. "splunk-hf" = "m5a.4xlarge",
  172. "splunk-indexer" = "i3en.3xlarge",
  173. "splunk-mc" = "m5a.large", # Legacy: t2.small, prod m4.large
  174. "splunk-sh" = "m5a.4xlarge",
  175. "portal" = "t3a.medium", # legacy: t2.medium
  176. }
  177. # GitHub
  178. github_instance_count = 1
  179. github_data_volume_size = 500
  180. # Salt Master
  181. salt_master_instance_type = "t3a.xlarge"
  182. # mailrelay
  183. mailrelay_instance_type = "t3a.xlarge"
  184. # Nessus Scanner Variables
  185. nessus_scanner_count = 2
  186. nessus_manager_count = 1 # Can't see us needing more than one?
  187. # OpenVPN Server
  188. openvpn_instance_type = "t3a.medium"
  189. # Phantom Server
  190. phantom_instance_count = 1
  191. # Proxy
  192. proxy_server_instance_type = "t3a.medium"
  193. # Repo Server
  194. repo_server_instance_type = "t3a.xlarge"
  195. # rhsso
  196. rhsso_instance_count = 1 # > 1 is untested, likely requires additional work
  197. # DNS Resolver
  198. resolver_instance_type = "t3a.xlarge"
  199. # Vault Server
  200. vault_server_instance_type = "t3a.medium"
  201. # Sensu Server
  202. sensu_server_instance_type = "m5a.xlarge"
  203. # AS Number used for various resources, but not every account needs one.
  204. asn = 64810
  205. security_vpc_cidr = "10.179.0.0/22"
  206. # Interconnects
  207. interconnect_asn = 64888
  208. #interconnects_instance_type = "t3a.micro"
  209. interconnects_instance_type = "m5.xlarge"
  210. interconnects_key_name = "fdamstra" # DO NOT CHANGE
  211. interconnects_count = 2
  212. interconnect_instances_path = "../018-interconnect-instances"
  213. # Qualys Scanners
  214. qualys_personalization_codes = {
  215. standard = "21007869625439" # XDR_Prod_Govcloud_Standard
  216. preauthorized = "21028116523735" # XDR_Prod_Govcloud_Preauthorized
  217. }
  218. # Qualys Connector, defined in AssetView in Qualys Console
  219. qualys_connector_externalid = "1621818655116" # mdr-prod-c2-gov
  220. moose_cloudwatch_log_groups = {
  221. "/aws/lambda/portal_customer_sync" = {
  222. hec_token = "eb79bb2d-b27d-455d-bc5c-e8cf3165b294"
  223. firehose_name = "portal_customer_sync_firehose"
  224. lambda_function_name = "portal_customer_sync_kinesis_firehose_transform"
  225. s3_bucket_name = "${local.account_name}-kinesis-flowlogs-portal-customer-sync-s3"
  226. log_stream_name = "SplunkDelivery_portal_customer_sync"
  227. kinesis_firehose_lambda_role_name = "KinesisFirehoseToLambaRole-portal_customer_sync"
  228. kinesis_firehose_role_name = "kinesis-firehose-role-name-portal-customer-sync"
  229. lambda_iam_policy_name = "Kinesis-Firehose-to-Splunk-Policy-portal_customer_sync"
  230. kinesis_firehose_iam_policy_name = "KinesisFirehose-Policy-portal_customer_sync"
  231. cloudwatch_to_firehose_trust_iam_role_name = "CloudWatchToSplunkFirehoseTrust-portal_customer_sync"
  232. cloudwatch_to_fh_access_policy_name = "KinesisCloudWatchToFirehosePolicy-portal_customer_sync"
  233. }
  234. "/aws/lambda/portal_scheduler" = {
  235. hec_token = "bce12568-f390-4b17-8dfe-ea26b856820b"
  236. firehose_name = "portal_scheduler_firehose"
  237. lambda_function_name = "portal_scheduler_kinesis_firehose_transform"
  238. s3_bucket_name = "${local.account_name}-kinesis-flowlogs-portal-scheduler-s3"
  239. log_stream_name = "SplunkDelivery_portal_scheduler"
  240. kinesis_firehose_lambda_role_name = "KinesisFirehoseToLambaRole-portal_scheduler"
  241. kinesis_firehose_role_name = "kinesis-firehose-role-name-portal-scheduler"
  242. lambda_iam_policy_name = "Kinesis-Firehose-to-Splunk-Policy-portal_scheduler"
  243. kinesis_firehose_iam_policy_name = "KinesisFirehose-Policy-portal_scheduler"
  244. cloudwatch_to_firehose_trust_iam_role_name = "CloudWatchToSplunkFirehoseTrust-portal_scheduler"
  245. cloudwatch_to_fh_access_policy_name = "KinesisCloudWatchToFirehosePolicy-portal_scheduler"
  246. }
  247. "/aws/vpn" = {
  248. hec_token = "1E187167-1ED0-4AD1-A8C2-8AEB297C4E81"
  249. firehose_name = "aws_vpn_firehose"
  250. lambda_function_name = "aws_vpn_kinesis_firehose_transform"
  251. s3_bucket_name = "${local.account_name}-kinesis-aws-vpn-s3"
  252. log_stream_name = "ClientVPN"
  253. kinesis_firehose_lambda_role_name = "KinesisFirehoseToLambaRole-aws_vpn"
  254. kinesis_firehose_role_name = "kinesis-firehose-role-name-aws-vpn"
  255. lambda_iam_policy_name = "Kinesis-Firehose-to-Splunk-Policy-aws_vpn"
  256. kinesis_firehose_iam_policy_name = "KinesisFirehose-Policy-aws_vpn"
  257. cloudwatch_to_firehose_trust_iam_role_name = "CloudWatchToSplunkFirehoseTrust-aws_vpn"
  258. cloudwatch_to_fh_access_policy_name = "KinesisCloudWatchToFirehosePolicy-aws_vpn"
  259. }
  260. }
  261. }