vars.tf 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. variable "name" {
  2. description = "The shortname for DNS and resources."
  3. type = string
  4. }
  5. variable "subject_alternative_names" {
  6. description = "List of alternative names for the certificate."
  7. type = list(string)
  8. default = []
  9. }
  10. variable "redirect_80" {
  11. description = "True sets up a redirect from 80 to listener port"
  12. type = bool
  13. default = false
  14. }
  15. variable "target_ids" {
  16. description = "List of targets to assign to the ALB"
  17. type = set(string)
  18. }
  19. variable "allow_from_any" {
  20. description = "Open the ALB to 0.0.0.0/0? If not, you must create your own rules."
  21. type = bool
  22. default = true
  23. }
  24. variable "listener_port" {
  25. description = "Public Facing Port"
  26. type = number
  27. }
  28. variable "target_port" {
  29. description = "Port on Instance"
  30. type = number
  31. }
  32. variable "target_protocol" {
  33. description = "Protocol on Instance"
  34. type = string
  35. }
  36. variable "target_security_group" {
  37. description = "A target security group to allow egress from the ALB"
  38. type = string
  39. }
  40. # Health Check Variables have sane defaults
  41. variable "healthcheck_port" {
  42. description = "Health Check Port on Instance"
  43. type = number
  44. default = null
  45. }
  46. variable "healthcheck_protocol" {
  47. description = "Health Check Protocol on Instance"
  48. type = string
  49. default = null
  50. }
  51. variable "healthcheck_path" {
  52. description = "Health Check Path on Instance"
  53. type = string
  54. default = "/"
  55. }
  56. variable "healthcheck_matcher" {
  57. description = "Health Check Match Conditions"
  58. type = string
  59. default = "200,302"
  60. }
  61. variable "stickiness" {
  62. description = "Session Stickiness enabled?"
  63. type = bool
  64. default = false
  65. }
  66. locals {
  67. healthcheck_port = var.healthcheck_port == null ? var.target_port : var.healthcheck_port
  68. healthcheck_protocol = var.healthcheck_protocol == null ? var.target_protocol : var.healthcheck_protocol
  69. }
  70. # WAF passthrough variables
  71. variable "waf_enabled" {
  72. type = bool
  73. description = "Enable the standard WAF?"
  74. }
  75. variable "excluded_rules_AWSManagedRulesCommonRuleSet" {
  76. type = list(string)
  77. default = [
  78. "SizeRestrictions_BODY" # Breaks too many things
  79. ]
  80. }
  81. variable "excluded_rules_AWSManagedRulesAmazonIpReputationList" {
  82. type = list(string)
  83. default = []
  84. }
  85. variable "excluded_rules_AWSManagedRulesKnownBadInputsRuleSet" {
  86. type = list(string)
  87. default = []
  88. }
  89. variable "excluded_rules_AWSManagedRulesSQLiRuleSet" {
  90. type = list(string)
  91. default = []
  92. }
  93. variable "excluded_rules_AWSManagedRulesLinuxRuleSet" {
  94. type = list(string)
  95. default = []
  96. }
  97. variable "excluded_rules_AWSManagedRulesUnixRuleSet" {
  98. type = list(string)
  99. default = []
  100. }
  101. variable "additional_blocked_ips" {
  102. description = "IP addresses that are blocked, in addition to the defaults."
  103. type = list(string)
  104. default = []
  105. }
  106. variable "allowed_ips" {
  107. description = "IP Addresses that are always allowed"
  108. type = list(string)
  109. default = []
  110. }
  111. variable "admin_ips" {
  112. description = "IP Addressed that are allowed to the admin interface"
  113. type = list(string)
  114. default = []
  115. }
  116. # Inherited variables
  117. variable "dns_info" { type = map(any) }
  118. variable "tags" { type = map(any) }
  119. variable "public_subnets" { type = list(any) }
  120. variable "environment" { type = string }
  121. variable "vpc_id" { type = string }
  122. variable "aws_partition" { type = string }
  123. variable "aws_region" { type = string }
  124. variable "aws_account_id" { type = string }