variables.tf 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. variable "profile" {
  2. description = "The AWS profile to use"
  3. }
  4. variable "region" {
  5. description = "The AWS region to run in"
  6. }
  7. variable "common-tags" {
  8. type = map(string)
  9. description = "Tags that go everywhere"
  10. }
  11. variable "open-nets" {
  12. type = list
  13. description = "CIDRs that will have access to everything"
  14. default = []
  15. }
  16. variable "vpc-cidr" {
  17. description = "The CIDR of the VPC"
  18. }
  19. variable "vpc-id" {
  20. description = "The ID of the VPC"
  21. }
  22. variable "vpc-name" {
  23. description = "The Name of the VPC"
  24. }
  25. variable "ssh-key" {
  26. description = "Set if the SSH key you wish to use does not match the VPC name"
  27. default = ""
  28. }
  29. variable "vpc-subnets" {
  30. type = list
  31. description = "The list of subnets available to the VPC"
  32. }
  33. variable "vpc-azs" {
  34. type = list
  35. description = "The ID of the VPC"
  36. }
  37. variable "data-node-count" {
  38. description = "The number of RE data nodes"
  39. default = 3
  40. }
  41. variable "re-instance-type" {
  42. description = "The size of instance to run"
  43. default = "t2.2xlarge"
  44. }
  45. variable "re-volume-size" {
  46. description = "The size of the two volumes to attach"
  47. default = "150"
  48. }
  49. variable "enable-flash" {
  50. description = "Enable Flash Devices"
  51. default = false
  52. }
  53. variable "flash-iops" {
  54. description = "Enable Flash IOPS"
  55. default = "100"
  56. }
  57. variable "internal-rules" {
  58. description = "Security rules to allow for connectivity within the VPC"
  59. type = list
  60. default = [
  61. {
  62. type = "ingress"
  63. from_port = "22"
  64. to_port = "22"
  65. protocol = "tcp"
  66. comment = "SSH from VPC"
  67. },
  68. {
  69. type = "ingress"
  70. from_port = "1968"
  71. to_port = "1968"
  72. protocol = "tcp"
  73. comment = "Proxy traffic (Internal use)"
  74. },
  75. {
  76. type = "ingress"
  77. from_port = "3333"
  78. to_port = "3339"
  79. protocol = "tcp"
  80. comment = "Cluster traffic (Internal use)"
  81. },
  82. {
  83. type = "ingress"
  84. from_port = "36379"
  85. to_port = "36380"
  86. protocol = "tcp"
  87. comment = "Cluster traffic (Internal use)"
  88. },
  89. {
  90. type = "ingress"
  91. from_port = "8001"
  92. to_port = "8001"
  93. protocol = "tcp"
  94. comment = "Traffic from application to RS Discovery Service"
  95. },
  96. {
  97. type = "ingress"
  98. from_port = "8443"
  99. to_port = "8443"
  100. protocol = "tcp"
  101. comment = "Secure (HTTPS) access to the management web UI"
  102. },
  103. {
  104. type = "ingress"
  105. from_port = "8444"
  106. to_port = "8444"
  107. protocol = "tcp"
  108. comment = "nginx <-> cnm_http/cm traffic (Internal use)"
  109. },
  110. {
  111. type = "ingress"
  112. from_port = "9080"
  113. to_port = "9080"
  114. protocol = "tcp"
  115. comment = "nginx <-> cnm_http/cm traffic (Internal use)"
  116. },
  117. {
  118. type = "ingress"
  119. from_port = "9081"
  120. to_port = "9081"
  121. protocol = "tcp"
  122. comment = "For CRDB management (Internal use)"
  123. },
  124. {
  125. type = "ingress"
  126. from_port = "8070"
  127. to_port = "8071"
  128. protocol = "tcp"
  129. comment = "Prometheus metrics exporter"
  130. },
  131. {
  132. type = "ingress"
  133. from_port = "9443"
  134. to_port = "9443"
  135. protocol = "tcp"
  136. comment = "REST API traffic, including cluster management and node bootstrap"
  137. },
  138. {
  139. type = "ingress"
  140. from_port = "10000"
  141. to_port = "19999"
  142. protocol = "tcp"
  143. comment = "Database traffic - if manually creating db ports pare down"
  144. },
  145. {
  146. type = "ingress"
  147. from_port = "20000"
  148. to_port = "29999"
  149. protocol = "tcp"
  150. comment = "Database shards traffic - if manually creating db ports pare down"
  151. },
  152. {
  153. type = "ingress"
  154. from_port = "53"
  155. to_port = "53"
  156. protocol = "udp"
  157. comment = "DNS Traffic"
  158. },
  159. {
  160. type = "ingress"
  161. from_port = "5353"
  162. to_port = "5353"
  163. protocol = "udp"
  164. comment = "DNS Traffic"
  165. },
  166. {
  167. type = "ingress"
  168. from_port = "-1"
  169. to_port = "-1"
  170. protocol = "icmp"
  171. comment = "Ping for connectivity checks between nodes"
  172. },
  173. {
  174. type = "egress"
  175. from_port = "-1"
  176. to_port = "-1"
  177. protocol = "icmp"
  178. comment = "Ping for connectivity checks between nodes"
  179. },
  180. {
  181. type = "egress"
  182. from_port = "0"
  183. to_port = "65535"
  184. protocol = "tcp"
  185. comment = "Let TCP out to the VPC"
  186. },
  187. {
  188. type = "egress"
  189. from_port = "0"
  190. to_port = "65535"
  191. protocol = "udp"
  192. comment = "Let UDP out to the VPC"
  193. },
  194. ]
  195. }
  196. variable "external-rules" {
  197. description = "Security rules to allow for connectivity external to the VPC"
  198. type = list
  199. default = [
  200. {
  201. type = "ingress"
  202. from_port = "53"
  203. to_port = "53"
  204. protocol = "udp"
  205. cidr = ["0.0.0.0/0"]
  206. },
  207. {
  208. type = "egress"
  209. from_port = "0"
  210. to_port = "65535"
  211. protocol = "tcp"
  212. cidr = ["0.0.0.0/0"]
  213. },
  214. {
  215. type = "egress"
  216. from_port = "0"
  217. to_port = "65535"
  218. protocol = "udp"
  219. cidr = ["0.0.0.0/0"]
  220. }
  221. ]
  222. }