vars.tf 3.2 KB

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