vars.tf 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. # ----------------------------------
  10. # Below this line are variables inherited from higher levels, so they
  11. # do not need to be explicitly passed to this module.
  12. variable "standard_tags" { type = map }
  13. variable "account_list" { type = list }
  14. variable "aws_account_id" { type = string }
  15. variable "aws_partition" { type = string }
  16. variable "aws_region" { type = string }
  17. variable "environment" { type = string }
  18. variable "key_pairs" { type = map }
  19. variable "c2_accounts" { type = map }
  20. # Calculate some local variables
  21. locals {
  22. logging_environment = var.environment == "common" ? "prod" : var.environment # common logs to prod
  23. c2_account = var.c2_accounts[var.aws_partition]
  24. is_c2 = var.aws_account_id == local.c2_account ? true : false
  25. }
  26. # Carried over from TF11, may not be used or accurate:
  27. variable "alarm_namespace" {
  28. description = "The namespace in which all alarms are set up."
  29. default = "dps-alarm-benchmark"
  30. }
  31. variable "cloudtrail_log_group_name" {
  32. description = "The name of the CloudWatch Logs group to which CloudTrail events are delivered."
  33. default = "aws-cis-logs"
  34. }
  35. variable "sns_topic_name" {
  36. description = "The name of the SNS Topic which will be notified when any alarm is performed."
  37. default = "dps-alarm"
  38. }
  39. variable "sqs_queue_name" {
  40. description = "The name of the SQS queue to receive alerts from cloudwatch"
  41. default = "dps-alarm-sqs"
  42. }
  43. variable "resource_name_prefix" {
  44. description = "All the resources will be prefixed with this varible"
  45. default = "aws-cis"
  46. }
  47. variable "lambda_timeout" {
  48. description = "Default timeout of lambda fucntions"
  49. default = 180
  50. }
  51. variable "lambda_dry_run" {
  52. description = "Sets DRY_RUN environment variable for all lambda functions"
  53. default = false
  54. }
  55. variable "lambda_aggressive" {
  56. description = "Sets AGGRESSIVE mode as true for lambda fucntions"
  57. default = true
  58. }
  59. variable "lambda_mfa_checker_user_prefix" {
  60. description = "Comma separated list of prefixes that mfa checker lambda helper will ignore"
  61. default = ""
  62. }
  63. variable "lambda_mfa_checker_user_suffix" {
  64. description = "Comma separated list of suffixes that mfa checker lambda helper will ignore"
  65. default = ""
  66. }
  67. variable "lambda_user_inactivity_limit" {
  68. description = "Disable inactive users more than N days"
  69. default = 90
  70. }
  71. variable "lambda_access_key_age_max" {
  72. description = "Expire access keys after N days"
  73. default = 90
  74. }
  75. variable "lambda_access_key_age_notify" {
  76. description = "Start to send notifications for expiring keys N before"
  77. default = 7
  78. }
  79. variable "lambda_cron_schedule" {
  80. description = "Default Cron schedule for lambda helpers"
  81. default = "cron(0 6 * * ? *)"
  82. }
  83. variable "temp_artifacts_dir" {
  84. description = "The path for creating the zip file"
  85. default = "/tmp/terraform-aws-cis-fundatentals/artifacts"
  86. }
  87. variable "iam_require_uppercase_characters" {
  88. description = "Require at least one uppercase letter in passwords"
  89. default = true
  90. }
  91. variable "iam_require_lowercase_characters" {
  92. description = "Require at least one lowercase letter in passwords"
  93. default = true
  94. }
  95. variable "iam_require_symbols" {
  96. description = "Require at least one symbol in passwords"
  97. default = true
  98. }
  99. variable "iam_require_numbers" {
  100. description = "Require at least one number in passwords"
  101. default = true
  102. }
  103. variable "iam_minimum_password_length" {
  104. description = "Require minimum lenght of password"
  105. default = 14
  106. }
  107. variable "iam_password_reuse_prevention" {
  108. description = "Prevent password reuse N times"
  109. default = 24
  110. }
  111. variable "iam_max_password_age" {
  112. description = "Passwords expire in N days"
  113. default = 90
  114. }
  115. variable "iam_allow_users_to_change_password" {
  116. description = "Can users change their own password"
  117. default = true
  118. }
  119. variable "iam_hard_expiry" {
  120. description = "Everyone needs hard reset for expired passwords"
  121. default = true
  122. }
  123. variable "billing_s3_bucket_policy" {
  124. description = "Custom S3 bucket policy for billing logs. The default policy will be used if not defined"
  125. default = ""
  126. }
  127. # The default policy will be used if this left empty
  128. variable "cloudtrail_kms_policy" {
  129. description = "KMS policy for Cloudtrail logs."
  130. default = ""
  131. }
  132. # "ReadOnly", "WriteOnly", "All".
  133. variable "clodtrail_event_selector_type" {
  134. description = "Log type for event selectors"
  135. default = "All"
  136. }