account.hcl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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-test-c2-gov"
  5. account_alias = "afs-mdr-test-c2-gov"
  6. aws_account_id = "738800754746"
  7. instance_termination_protection = false # 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. # Additional sources that are allowed to send data, such as Customer LCPs, Azure, etc.
  11. splunk_data_sources = [
  12. "170.248.172.0/23", # ?
  13. "20.190.250.137/32", # ?
  14. "52.232.227.197/32", # ?
  15. "52.185.64.173/32", # ?
  16. "52.242.225.98/32", # ?
  17. "52.177.84.83/32", # ?
  18. "199.16.64.3/32", #?
  19. "99.56.213.129/32", # Fred Damstra's Home IP - For testing
  20. ]
  21. splunk_legacy_cidr = [ # Allow splunk ports to/from here, too
  22. "10.96.0.0/16",
  23. ]
  24. splunk_asg_sizes = [ 1, 1, 0 ] # How many?
  25. splunk_volume_sizes = {
  26. "cluster_master" = {
  27. "swap": 8, # minimum: 8
  28. "/": 20, # minimum: 20
  29. "/home": 4, # minimum: 4
  30. "/var": 15, # minimum: 15
  31. "/var/tmp": 4, # minimum: 4
  32. "/var/log": 8, # minimum: 8
  33. "/var/log/audit": 8, # minimum: 8
  34. "/tmp": 4, # minimum: 4
  35. "/opt/splunk": 30, # No minimum; not in base image
  36. },
  37. "indexer" = {
  38. "swap": 8, # minimum: 8
  39. "/": 20, # minimum: 20
  40. "/home": 4, # minimum: 4
  41. "/var": 15, # minimum: 15
  42. "/var/tmp": 4, # minimum: 4
  43. "/var/log": 8, # minimum: 8
  44. "/var/log/audit": 8, # minimum: 8
  45. "/tmp": 4, # minimum: 4
  46. "/opt/splunk": 30, # No minimum; not in base image
  47. },
  48. "searchhead" = {
  49. "swap": 8, # minimum: 8
  50. "/": 20, # minimum: 20
  51. "/home": 4, # minimum: 4
  52. "/var": 15, # minimum: 15
  53. "/var/tmp": 4, # minimum: 4
  54. "/var/log": 8, # minimum: 8
  55. "/var/log/audit": 8, # minimum: 8
  56. "/tmp": 4, # minimum: 4
  57. "/opt/splunk": 30, # No minimum; not in base image
  58. },
  59. # Qcompliance, fm-shared-search, and the mc are all searchheads
  60. # "qcompliance" = {
  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": 30, # No minimum; not in base image
  70. # },
  71. "heavy_forwarder" = {
  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. }
  83. account_tags = {
  84. "Client": local.splunk_prefix,
  85. }
  86. c2_account_standards_path = "../../mdr-test-c2/005-account-standards-c2"
  87. # For CIDR assignment, see https://github.mdr.defpoint.com/mdr-engineering/msoc-infrastructure/wiki/IP-Address-Allocation
  88. vpc_info = {
  89. "vpc-splunk" = {
  90. "name" = "vpc-splunk"
  91. "purpose" = "Splunk Systems (MOOSE)"
  92. "cidr" = "10.20.16.0/22",
  93. "tgw_attached" = true,
  94. },
  95. "vpc-system-services" = {
  96. "name" = "vpc-system-services",
  97. "purpose" = "Internal Services for Systems (not people)",
  98. "cidr" = "10.20.0.0/22",
  99. "tgw_attached" = false, # NOTE: This is attached via the transit gateway creation
  100. },
  101. "vpc-scanners" = {
  102. "name" = "vpc-scanners",
  103. "purpose" = "Security Scanning",
  104. "cidr" = "10.20.12.0/22",
  105. "tgw_attached" = true,
  106. },
  107. "vpc-interconnects" = {
  108. "name" = "vpc-interconnects",
  109. "purpose" = "Interconnections between AWS partitions",
  110. "cidr" = "10.179.128.0/22",
  111. "tgw_attached" = false,
  112. },
  113. "vpc-access" = {
  114. "name" = "vpc-access"
  115. "purpose" = "Systems providing restricted access, such as bastions and vpn concentrators"
  116. "cidr" = "10.20.20.0/22"
  117. "tgw_attached" = true,
  118. },
  119. "vpc-cisco" = {
  120. "name" = "vpc-cisco"
  121. "purpose" = "Cisco VPN Subnet"
  122. "cidr" = "10.20.36.0/22",
  123. "tgw_attached" = true,
  124. },
  125. "vpc-portal" = {
  126. "name" = "vpc-portal"
  127. "purpose" = "The Customer Portal"
  128. "cidr" = "10.20.32.0/24"
  129. "tgw_attached" = true,
  130. },
  131. "vpc-public" = {
  132. "name" = "vpc-public"
  133. "purpose" = "Publicly Accessible Infrastructure Services, such as GHE and Jira"
  134. "cidr" = "10.20.24.0/22"
  135. "tgw_attached" = true,
  136. },
  137. "vpc-private-services" = {
  138. "name" = "vpc-private-services"
  139. "purpose" = "Private XDR Services for XDR users"
  140. "cidr" = "10.20.28.0/22"
  141. "tgw_attached" = true,
  142. },
  143. }
  144. instance_types = {
  145. "alsi-master" = "t3a.small",
  146. "alsi-worker" = "t3a.small",
  147. "bastion" = "t3a.medium",
  148. "fm-shared-search" = "t3a.small", # Legacy: t2.small, prod m4.large
  149. "github" = "c5.2xlarge", # legacy: c4.4xlarge in prod, c5.2xlarge in test
  150. "github-backup" = "t3a.medium", # legacy: t2.micro
  151. "jira-rds" = "db.t3.medium",
  152. "jira-server" = "t3a.small", # legacy test: t2.small, legacy prod: t2.medium
  153. "keycloak" = "t3a.large",
  154. "keycloak-db" = "db.t3.micro"
  155. "nessus_security_center" = "m5a.xlarge",
  156. "nessus_scanners" = "m5a.large",
  157. "nessus_managers" = "m5a.large",
  158. "phantom" = "t3a.xlarge", # legacy test: t2.medium, legacy prod: m4.4xlarge
  159. "qcompliance" = "t3a.small", # legacy: ? not sure
  160. "rhsso" = "t3a.large",
  161. "rhsso-db" = "db.t3.micro"
  162. "splunk-cm" = "t3a.small", # legacy: t2.small
  163. "splunk-hf" = "t3a.small", # legacy: t2.medium
  164. #"splunk-indexer" = "t3a.small", # legacy: t2.small, but whats the point if we don't have instance storage.
  165. #"splunk-indexer" = "i3en.large", # legacy: t2.small, but whats the point if we don't have instance storage.
  166. #"splunk-indexer" = "m5d.large", # these are 1/2 the price of i3en.larges. 8GB RAM, 75GB storage
  167. "splunk-indexer" = "m5d.xlarge", # 16GB RAM, 150GB SSD
  168. "splunk-mc" = "t3a.small", # Legacy: t2.small, prod m4.large
  169. "splunk-sh" = "t3a.small", # legacy: ? not sure
  170. "threatq" = "t3a.2xlarge", # legacy: t2.medium
  171. "portal" = "t3a.medium", # legacy: t2.medium
  172. }
  173. # TODO: The instance types below should be moved to the instance_type map above
  174. # DNS Resolver
  175. resolver_instance_type = "t3a.xlarge"
  176. # Keycloak
  177. keycloak_instance_count = 1 # May or may not support > 1
  178. # Salt Master
  179. salt_master_instance_type = "t3a.large"
  180. # Mail Relay Server
  181. mailrelay_instance_type = "t3a.xlarge"
  182. # Nessus Scanner Variables
  183. nessus_scanner_count = 2
  184. nessus_manager_count = 1 # Can't see us needing more than one?
  185. # OpenVPN Server
  186. openvpn_instance_type = "t3a.medium"
  187. # Phantom Server
  188. phantom_instance_count = 1
  189. # Proxy Server
  190. proxy_server_instance_type = "t3a.xlarge"
  191. # Repo Server
  192. repo_server_instance_type = "t3a.xlarge"
  193. # rhsso
  194. rhsso_instance_count = 1 # > 1 is untested, likely requires additional work
  195. # Vault Server
  196. vault_server_instance_type = "t3a.small"
  197. # Sensu Server
  198. sensu_server_instance_type = "t3a.medium"
  199. # Github Servers
  200. github_instance_count = 1
  201. github_data_volume_size = 500
  202. # ALSI Servers
  203. alsi_workers = 2
  204. alsi_splunk_nlb = true # splunk://moose-alsi-splunk.xdr{,test}.accenturefederalcyber.com:9997 and 9998
  205. alsi_elastic_alb = true # https://moose-alsi-elastic.xdr{,test}.accenturefederalcyber.com -> 9200
  206. alsi_hec_alb = true # https://moose-alsi-hec.xdr{,test}.accenturefederalcyber.com -> 8080
  207. # AS Number used for various resources, but not every account needs one.
  208. asn = 64710 # changing this replaces the gateway
  209. # Interconnects
  210. interconnect_asn = 64777
  211. interconnects_instance_type = "t3a.xlarge"
  212. interconnects_key_name = "fdamstra" # DO NOT CHANGE
  213. interconnects_count = 2
  214. interconnect_instances_path = "../018-interconnect-instances"
  215. # Qualys Scanners
  216. qualys_personalization_codes = {
  217. standard = "21074115957347" # XDR_Test_Govcloud_Standard
  218. preauthorized = "21054299967066" # XDR_Test_Govcloud_Preauthorized
  219. }
  220. # Qualys Connector
  221. qualys_connector_externalid = "1601148045651" # Needs to come from the qualys console
  222. moose_cloudwatch_log_groups = {
  223. "/aws/lambda/portal_customer_sync" = {
  224. hec_token = "eb79bb2d-b27d-455d-bc5c-e8cf3165b294"
  225. firehose_name = "portal_customer_sync_firehose"
  226. lambda_function_name = "portal_customer_sync_kinesis_firehose_transform"
  227. s3_bucket_name = "${local.account_name}-kinesis-flowlogs-portal-customer-sync-s3"
  228. log_stream_name = "SplunkDelivery_portal_customer_sync"
  229. kinesis_firehose_lambda_role_name = "KinesisFirehoseToLambaRole-portal_customer_sync"
  230. kinesis_firehose_role_name = "kinesis-firehose-role-name-portal-customer-sync"
  231. lambda_iam_policy_name = "Kinesis-Firehose-to-Splunk-Policy-portal_customer_sync"
  232. kinesis_firehose_iam_policy_name = "KinesisFirehose-Policy-portal_customer_sync"
  233. cloudwatch_to_firehose_trust_iam_role_name = "CloudWatchToSplunkFirehoseTrust-portal_customer_sync"
  234. cloudwatch_to_fh_access_policy_name = "KinesisCloudWatchToFirehosePolicy-portal_customer_sync"
  235. }
  236. "/aws/lambda/portal_scheduler" = {
  237. hec_token = "bce12568-f390-4b17-8dfe-ea26b856820b"
  238. firehose_name = "portal_scheduler_firehose"
  239. lambda_function_name = "portal_scheduler_kinesis_firehose_transform"
  240. s3_bucket_name = "${local.account_name}-kinesis-flowlogs-portal-scheduler-s3"
  241. log_stream_name = "SplunkDelivery_portal_scheduler"
  242. kinesis_firehose_lambda_role_name = "KinesisFirehoseToLambaRole-portal_scheduler"
  243. kinesis_firehose_role_name = "kinesis-firehose-role-name-portal-scheduler"
  244. lambda_iam_policy_name = "Kinesis-Firehose-to-Splunk-Policy-portal_scheduler"
  245. kinesis_firehose_iam_policy_name = "KinesisFirehose-Policy-portal_scheduler"
  246. cloudwatch_to_firehose_trust_iam_role_name = "CloudWatchToSplunkFirehoseTrust-portal_scheduler"
  247. cloudwatch_to_fh_access_policy_name = "KinesisCloudWatchToFirehosePolicy-portal_scheduler"
  248. }
  249. "/aws/vpn" = {
  250. hec_token = "1E187167-1ED0-4AD1-A8C2-8AEB297C4E81"
  251. firehose_name = "aws_vpn_firehose"
  252. lambda_function_name = "aws_vpn_kinesis_firehose_transform"
  253. s3_bucket_name = "${local.account_name}-kinesis-aws-vpn-s3"
  254. log_stream_name = "ClientVPN"
  255. kinesis_firehose_lambda_role_name = "KinesisFirehoseToLambaRole-aws_vpn"
  256. kinesis_firehose_role_name = "kinesis-firehose-role-name-aws-vpn"
  257. lambda_iam_policy_name = "Kinesis-Firehose-to-Splunk-Policy-aws_vpn"
  258. kinesis_firehose_iam_policy_name = "KinesisFirehose-Policy-aws_vpn"
  259. cloudwatch_to_firehose_trust_iam_role_name = "CloudWatchToSplunkFirehoseTrust-aws_vpn"
  260. cloudwatch_to_fh_access_policy_name = "KinesisCloudWatchToFirehosePolicy-aws_vpn"
  261. }
  262. }
  263. }