-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathvariables.tf
170 lines (136 loc) · 3.54 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
### MANDATORY ###
variable "role_tag" {
description = "Role of the ec2 instance, defaults to <SERVICE>"
default = "SERVICE"
}
variable "environment_tag" {
description = "Role of the ec2 instance, defaults to <DEV>"
default = "DEV"
}
variable "costcenter_tag" {
description = "Role of the ec2 instance, defaults to <DEV>"
default = "DEV"
}
# group our resources
variable "stream_tag" {
default = "default"
}
variable "environment" {
default = "default"
}
variable "es_environment" {
default = "elasticsearch"
}
variable "es_cluster" {
description = "Name of the elasticsearch cluster, used in node discovery"
default = "elasticsearch"
}
###################################################################
# AWS configuration below
###################################################################
variable "key_name" {
description = "Name of the SSH keypair to use in AWS."
default = "elastic"
}
### MANDATORY ###
variable "iam_profile" {
description = "Elasticsearch IAM profile"
}
variable "aws_region" {
description = "AWS region to launch servers."
default = "ap-southeast-2"
}
variable "availability_zones" {
description = "AWS region to launch servers."
default = "ap-southeast-2a,ap-southeast-2b"
}
variable "security_group_name" {
description = "Name of security group to use in AWS."
default = "elasticsearch"
}
###################################################################
# Vpc configuration below
###################################################################
### MANDATORY ###
variable "vpc_id" {
description = "VPC id"
}
variable "internal_cidr_blocks"{
default = "0.0.0.0/0"
}
###################################################################
# Subnet configuration below
###################################################################
### MANDATORY ###
variable "subnets" {
description = "subnets to deploy into"
}
###################################################################
# Elasticsearch configuration below
###################################################################
### MANDATORY ###
# Amazon Linux elasticsearch ami built by packer
# See https://github.com/nadnerb/packer-elastic-search
variable "ami" {
}
variable "instance_type" {
description = "Elasticsearch instance type."
default = "t2.medium"
}
### MANDATORY ###
variable "es_environment" {
description = "Elastic environment tag for auto discovery"
}
# total number of nodes
variable "instances" {
description = "total instances"
default = "2"
}
#DEPRECATED
# number of nodes in zone a
variable "subnet_a_num_nodes" {
description = "Elastic nodes in a"
default = "1"
}
#DEPRECATED
# number of nodes in zone b
variable "subnet_b_num_nodes" {
description = "Elastic nodes in b"
default = "1"
}
# the ability to add additional existing security groups. In our case
# we have consul running as agents on the box
variable "additional_security_groups" {
default = ""
}
variable "volume_name" {
default = "/dev/sdh"
}
variable "volume_size" {
default = "10"
}
variable "volume_encryption" {
default = true
}
variable "elasticsearch_data" {
default = "/opt/elasticsearch/data"
}
# default elasticsearch heap size
variable "heap_size" {
default = "256m"
}
###################################################################
# Consul configuration below
###################################################################
### MANDATORY ###
variable "dns_server" {
}
variable "consul_dc" {
default = "dev"
}
variable "atlas" {
default = "example/atlas"
}
### MANDATORY ###
variable "encrypted_atlas_token" {
}