vars.tf 4.9 KB

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