partition.hcl 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Set common variables for the environment. This is automatically pulled in in the root terragrunt.hcl configuration to
  2. # feed forward to the child modules.
  3. #
  4. # NOTE: There is only one copy of this, in the `common/` tree, and the others are symbolic links.
  5. locals {
  6. aws_partition = "aws"
  7. aws_partition_alias = "commercial"
  8. common_services_account = "471284459109"
  9. common_profile = "${local.aws_partition == "aws-us-gov" ? "govcloud" : "commercial"}"
  10. tfstate_region = "us-east-1"
  11. # Statically setting the 'last known good' ami gives us some added flexibility
  12. # in building amis more regularly.
  13. #
  14. # Don't forget `lifecycle { ignore_changes = ["ami"] }` in yoru ec2
  15. # builds!
  16. amis = {
  17. "rhel7-base" = "ami-0de46d7d1a164b307"
  18. "rhel7-master" = "ami-0114330666839f2b9"
  19. "rhel7-minion" = "ami-0425efbff72b3c702"
  20. "ubuntu1804-base" = "TBD"
  21. "ubuntu1804-minion" = "TBD"
  22. }
  23. default_ami = local.amis["rhel7-minion"] # Allows us to easily change to a new base standard
  24. # If you need the raw list of all accounts, see `account_list` below
  25. account_map = {
  26. "prod" = [
  27. "477548533976", # Legacy MDR Prod
  28. "045312110490", # mdr-prod-c2
  29. "425831147305", # mdr-prod-modelclient
  30. "369723129071", # mdr-prod-malware
  31. ],
  32. "test" = [
  33. "527700175026", # Legacy MDR Test
  34. "816914342178", # mdr-test-c2
  35. "449047653882", # mdr-test-modelclient
  36. "404265901253", # mdr-test-malware
  37. ],
  38. "common" = [
  39. "471284459109", # mdr-common-services
  40. "350838957895", # MDR Service Root
  41. "035764279020", # MDR Playground / "Duane Test"
  42. "228011623757", # mdr-dev-ai
  43. "952430311316", # mdr-cyber-range
  44. ],
  45. }
  46. # flatten the map into a single list
  47. account_list = flatten([
  48. for env, accounts in local.account_map: accounts
  49. ])
  50. # This is similar to the account_map, but used for "what accounts am I responsible for"?
  51. responsible_accounts = {
  52. "prod" = concat(local.account_map["prod"], local.account_map["common"]),
  53. "test" = local.account_map["test"],
  54. "common" = concat(local.account_map["prod"], local.account_map["common"], local.account_map["test"]),
  55. }
  56. aws_marketplace_ubuntu_owner_id = "679593333241"
  57. partition_tags = {
  58. aws_partition = local.aws_partition
  59. }
  60. }