vars.tf 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. variable "tags" {
  2. type = map
  3. default = { }
  4. }
  5. variable "cloudtrail_key_arn" {
  6. # Unfortunately, if we use the alias, it modifies it every time, so we have to grab the actual arn
  7. type = string
  8. }
  9. variable extra_ebs_key_admins {
  10. description = "Extra EBS encryption key admins."
  11. type = list
  12. default = [ ]
  13. }
  14. variable extra_ebs_key_users {
  15. description = "Extra EBS encryption key users."
  16. type = list
  17. default = [ ]
  18. }
  19. variable extra_ebs_key_attachers {
  20. description = "Extra EBS encryption key attachers."
  21. type = list
  22. default = [ ]
  23. }
  24. variable "log_group_name" {
  25. description = "Cloudtrail Log Group Name to Use. Keep the default unless you have a good reason."
  26. type = string
  27. default = "cloudtrail-local-account"
  28. }
  29. # ----------------------------------
  30. # Below this line are variables inherited from higher levels, so they
  31. # do not need to be explicitly passed to this module.
  32. variable "is_legacy" { type = bool }
  33. variable "legacy_account" { type = string }
  34. variable "standard_tags" { type = map }
  35. variable "account_list" { type = list }
  36. variable "aws_account_id" { type = string }
  37. variable "aws_partition" { type = string }
  38. variable "aws_region" { type = string }
  39. variable "environment" { type = string }
  40. variable "key_pairs" { type = map }
  41. variable "c2_accounts" { type = map }
  42. variable "aws_flowlogs_hec_token" { type = string }
  43. variable "hec_pub_ack" { type = string }
  44. # Calculate some local variables
  45. locals {
  46. logging_environment = var.environment == "common" ? "prod" : var.environment # common logs to prod
  47. c2_account = var.c2_accounts[var.aws_partition]
  48. is_c2 = var.aws_account_id == local.c2_account ? true : false
  49. }