vars.tf 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. variable "key_pairs" {
  2. description = "Public SSH keys"
  3. type = map
  4. }
  5. variable "tags" {
  6. description = "Extra tags for the module."
  7. type = map
  8. default = { }
  9. }
  10. # ----------------------------------
  11. # Below this line are variables inherited from higher levels, so they
  12. # do not need to be explicitly passed to this module.
  13. variable "standard_tags" { type = map }
  14. variable "aws_account_id" { type = string }
  15. variable "aws_partition" { type = string }
  16. variable "environment" { type = string }
  17. # ----------------------------------
  18. # Below this line are variables from the CIS standards
  19. locals {
  20. workspace-cis-hardening-policy = {
  21. "default" = "cis_hardening_iam_role_policy.json.tpl"
  22. "prod" = "cis_hardening_iam_role_policy_prod.json.tpl"
  23. "common" = "cis_hardening_iam_role_policy_prod.json.tpl"
  24. "test" = "cis_hardening_iam_role_policy_test.json.tpl"
  25. }
  26. workspace-dps-s3-cloudtrail-bucket = {
  27. "default" = "dps-mdr-cloudtrail"
  28. "prod" = "dps-mdr-cloudtrail-prod"
  29. "common" = "dps-mdr-cloudtrail-prod"
  30. "test" = "dps-mdr-cloudtrail-test"
  31. "description" = "S3 bucket name for CloudTrail Logs"
  32. }
  33. workspace-dps-s3-cloudtrail-bucket-policy = {
  34. "default" = "cloudtrail_s3_policy.json.tpl"
  35. "prod" = "cloudtrail_s3_policy_prod.json.tpl"
  36. "common" = "cloudtrail_s3_policy_prod.json.tpl"
  37. "test" = "cloudtrail_s3_policy_test.json.tpl"
  38. "description" = "S3 IAM Policy for Cloudtrail Bucket"
  39. }
  40. workspace-dps-cloudtrail-cloudwatch-logs-role = {
  41. "default" = "cloudtrail_cloudwatch_logs_role_policy.json.tpl"
  42. "prod" = "cloudtrail_cloudwatch_logs_role_policy_prod.json.tpl"
  43. "common" = "cloudtrail_cloudwatch_logs_role_policy_prod.json.tpl"
  44. "test" = "cloudtrail_cloudwatch_logs_role_policy_test.json.tpl"
  45. "description" = "IAM Role for Cloudtrails Cloudwatch Logs"
  46. }
  47. workspace-dps-cloudtrail-cloudwatch-logs-policy = {
  48. "default" = "cloudtrail_cloudwatch_logs_inline_policy.json.tpl"
  49. "prod" = "cloudtrail_cloudwatch_logs_inline_policy_prod.json.tpl"
  50. "common" = "cloudtrail_cloudwatch_logs_inline_policy_prod.json.tpl"
  51. "test" = "cloudtrail_cloudwatch_logs_inline_policy_test.json.tpl"
  52. "description" = "IAM Role for Cloudtrails Cloudwatch Logs"
  53. }
  54. workspace-billing-s3-bucket-name = {
  55. "default" = "dps-mdr-billing"
  56. "prod" = "dps-mdr-billing-prod"
  57. "common" = "dps-mdr-billing-prod"
  58. "test" = "dps-mdr-billing-test"
  59. "description" = "S3 bucket name for Billing Logs"
  60. }
  61. workspace-ebs-kms-key-encryption-policy = {
  62. "prod" = "ebs_root_encrypt_decrypt_policy_prod.json.tpl"
  63. "common" = "ebs_root_encrypt_decrypt_policy_prod.json.tpl"
  64. "test" = "ebs_root_encrypt_decrypt_policy_test.json.tpl"
  65. }
  66. }
  67. variable "alarm_namespace" {
  68. description = "The namespace in which all alarms are set up."
  69. default = "dps-alarm-benchmark"
  70. }
  71. variable "cloudtrail_log_group_name" {
  72. description = "The name of the CloudWatch Logs group to which CloudTrail events are delivered."
  73. default = "aws-cis-logs"
  74. }
  75. variable "sns_topic_name" {
  76. description = "The name of the SNS Topic which will be notified when any alarm is performed."
  77. default = "dps-alarm"
  78. }
  79. variable "sqs_queue_name" {
  80. description = "The name of the SQS queue to receive alerts from cloudwatch"
  81. default = "dps-alarm-sqs"
  82. }
  83. variable "resource_name_prefix" {
  84. description = "All the resources will be prefixed with this varible"
  85. default = "aws-cis"
  86. }
  87. variable "lambda_timeout" {
  88. description = "Default timeout of lambda fucntions"
  89. default = 180
  90. }
  91. variable "lambda_dry_run" {
  92. description = "Sets DRY_RUN environment variable for all lambda functions"
  93. default = false
  94. }
  95. variable "lambda_aggressive" {
  96. description = "Sets AGGRESSIVE mode as true for lambda fucntions"
  97. default = true
  98. }
  99. variable "lambda_mfa_checker_user_prefix" {
  100. description = "Comma separated list of prefixes that mfa checker lambda helper will ignore"
  101. default = ""
  102. }
  103. variable "lambda_mfa_checker_user_suffix" {
  104. description = "Comma separated list of suffixes that mfa checker lambda helper will ignore"
  105. default = ""
  106. }
  107. variable "lambda_user_inactivity_limit" {
  108. description = "Disable inactive users more than N days"
  109. default = 90
  110. }
  111. variable "lambda_access_key_age_max" {
  112. description = "Expire access keys after N days"
  113. default = 90
  114. }
  115. variable "lambda_access_key_age_notify" {
  116. description = "Start to send notifications for expiring keys N before"
  117. default = 7
  118. }
  119. variable "lambda_cron_schedule" {
  120. description = "Default Cron schedule for lambda helpers"
  121. default = "cron(0 6 * * ? *)"
  122. }
  123. variable "temp_artifacts_dir" {
  124. description = "The path for creating the zip file"
  125. default = "/tmp/terraform-aws-cis-fundatentals/artifacts"
  126. }
  127. variable "iam_require_uppercase_characters" {
  128. description = "Require at least one uppercase letter in passwords"
  129. default = true
  130. }
  131. variable "iam_require_lowercase_characters" {
  132. description = "Require at least one lowercase letter in passwords"
  133. default = true
  134. }
  135. variable "iam_require_symbols" {
  136. description = "Require at least one symbol in passwords"
  137. default = true
  138. }
  139. variable "iam_require_numbers" {
  140. description = "Require at least one number in passwords"
  141. default = true
  142. }
  143. variable "iam_minimum_password_length" {
  144. description = "Require minimum lenght of password"
  145. default = 14
  146. }
  147. variable "iam_password_reuse_prevention" {
  148. description = "Prevent password reuse N times"
  149. default = 24
  150. }
  151. variable "iam_max_password_age" {
  152. description = "Passwords expire in N days"
  153. default = 90
  154. }
  155. variable "iam_allow_users_to_change_password" {
  156. description = "Can users change their own password"
  157. default = true
  158. }
  159. variable "iam_hard_expiry" {
  160. description = "Everyone needs hard reset for expired passwords"
  161. default = true
  162. }
  163. variable "billing_s3_bucket_policy" {
  164. description = "Custom S3 bucket policy for billing logs. The default policy will be used if not defined"
  165. default = ""
  166. }
  167. # The default policy will be used if this left empty
  168. variable "cloudtrail_kms_policy" {
  169. description = "KMS policy for Cloudtrail logs."
  170. default = ""
  171. }
  172. # "ReadOnly", "WriteOnly", "All".
  173. variable "clodtrail_event_selector_type" {
  174. description = "Log type for event selectors"
  175. default = "All"
  176. }