vars.tf 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. variable "tags" {
  2. type = map(any)
  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(any)
  12. default = []
  13. }
  14. variable "extra_ebs_key_users" {
  15. description = "Extra EBS encryption key users."
  16. type = list(any)
  17. default = []
  18. }
  19. variable "extra_ebs_key_attachers" {
  20. description = "Extra EBS encryption key attachers."
  21. type = list(any)
  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. # Calculate some local variables
  35. locals {
  36. logging_environment = var.environment == "common" ? "prod" : var.environment # common logs to prod
  37. c2_account = var.c2_accounts[var.aws_partition]
  38. is_c2 = var.aws_account_id == local.c2_account ? true : false
  39. }