globals.tf 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # This file contains mutable variables that are likely to be needed in every module.
  2. #
  3. # ADD TO THIS SPARINGLY! CHANGES TO THIS FILE RESULT IN A LOT OF WORK!
  4. locals {
  5. #### C&C Servers
  6. proxy = {
  7. prod = "proxy.pvt.xdr.accenturefederalcyber.com",
  8. test = "proxy.pvt.xdrtest.accenturefederalcyber.com",
  9. common = ""
  10. }[var.environment]
  11. proxy_ip = {
  12. prod = "10.80.101.166",
  13. test = "10.20.2.22",
  14. common = "10.40.2.107"
  15. }[var.environment]
  16. salt_master = {
  17. prod = "salt-master.pvt.xdr.accenturefederalcyber.com",
  18. test = "salt-master.pvt.xdrtest.accenturefederalcyber.com",
  19. common = "salt-master.pvt.xdr.accenturefederalcyber.com"
  20. }[var.environment]
  21. #### Tags:
  22. global_tags = {
  23. "Snapshot" = "Daily", # This will put it on some things where it doesn't belong, but seems useful overall
  24. #"Last_Updated" = timestamp() # while this is cool, its usefulness does not warrant the constant updates.
  25. }
  26. environment_tags = {
  27. prod = {
  28. Schedule = "none",
  29. Environment = var.environment
  30. },
  31. test = {
  32. Schedule = "MSOC",
  33. Environment = var.environment
  34. },
  35. common = {
  36. "Schedule" = "none",
  37. Environment = var.environment
  38. }
  39. }[var.environment]
  40. partition_tags = {
  41. aws = {
  42. aws_partition = var.aws_partition
  43. },
  44. aws-us-gov = {
  45. aws_partition = var.aws_partition
  46. }
  47. }[var.aws_partition]
  48. region_tags = {
  49. us-gov-east-1 = {},
  50. us-gov-west-1 = {},
  51. us-east-1 = {},
  52. us-east-2 = {},
  53. us-west-1 = {},
  54. us-west-2 = {},
  55. }[var.aws_region]
  56. account_tags_default = { "Client" : var.splunk_prefix }
  57. account_tags_exceptions = {
  58. mdr-prod-root-ca = {
  59. "WARNING" : "ALL ACCESS IS LOGGED. DO NOT USE WITHOUT JUSTIFICATION."
  60. "Client" : var.splunk_prefix,
  61. },
  62. afs-mdr-prod-malware-gov = {},
  63. afs-mdr-prod-cyber-range = {},
  64. afs-mdr-dev-ai = {},
  65. }
  66. account_tags = lookup(local.account_tags_exceptions, var.account_name, local.account_tags_default)
  67. standard_tags = merge(local.global_tags, local.environment_tags, local.partition_tags, local.region_tags, local.account_tags)
  68. }