vars.tf 4.9 KB

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