-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvariables.tf
217 lines (205 loc) · 5.93 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
// Base Azure configuration for the provider and common resources, can be generated via project-setup.sh
variable "subscription_id" {
type = string
description = "The Azure Subscription ID which should be used."
}
variable "tenant_id" {
type = string
description = "The Azure Tenant ID which should be used."
}
variable "client_id" {
type = string
description = "The Azure Service Principal Client ID which should be used."
}
variable "client_secret" {
type = string
description = "The Azure Service Principal Client Secret which should be used."
}
variable "resource_group_name" {
type = string
description = "The Azure Resource Group name in which the objects will be created."
}
variable "storage_account_name" {
type = string
description = "The Azure Storage Account which is used for Terraform state storage."
}
variable "prefix" {
type = string
description = "A string prefix prepended to resource names."
}
variable "location" {
type = string
description = "The Azure location where to create resources."
}
// DNS
variable "external_domain" {
type = string
description = "The external domain to use for registering DNS names."
}
variable "parent_resource_group_name" {
type = string
description = "The Azure Resource Group name where a dns zone exists for external_domain."
}
variable "use_le_staging" {
type = bool
description = "Whether to use Let's Encrypt staging endpoint."
}
// Networking
variable "vnet_cidrs" {
type = list(string)
default = ["10.0.0.0/16"]
description = "The CIDR of the created Virtual Network."
}
variable "subnet_cidr" {
type = string
default = "10.0.1.0/24"
description = "The CIDR of the subnet created for Compute instances."
}
variable "app_gateway_subnet_cidr" {
type = string
default = "10.0.2.0/24"
description = "The CIDR of the subnet created for the Application Gateway instance."
}
variable "allowed_ssh_cidrs" {
type = list(string)
default = ["0.0.0.0/0"]
description = "The list of CIDRs from which ssh is allowed."
}
// Control Plane
variable "control_plane_instance_count" {
type = number
default = 3
description = "The number of control plane instances."
}
variable "control_plane_size" {
type = string
default = "Standard_B2s"
description = "The size of control plane instances."
}
variable "control_plane_disk_root_size" {
type = number
default = 30
description = "The size of control plane instances root disk."
}
variable "control_plane_disk_root_type" {
type = string
default = "Standard_LRS"
description = "The type of control plane instances root disk."
}
variable "control_plane_disk_data_size" {
type = number
default = 20
description = "The size of control plane instances data disk."
}
variable "control_plane_disk_data_type" {
type = string
default = "Standard_LRS"
description = "The type of control plane instances data disk."
}
// Worker plane
variable "worker_plane_instance_count" {
type = number
default = 3
description = "The number of worker plane instances."
}
variable "worker_plane_size" {
type = string
default = "Standard_B2s"
description = "The size of control plane instances."
}
variable "worker_plane_disk_size" {
type = string
default = "40"
description = "The size of worker plane instances disk."
}
// Monitoring
variable "enable_monitoring" {
type = bool
default = true
description = "Whether to create an additional instance for monitoring purposes."
}
variable "monitoring_disk_size" {
type = string
default = "40"
description = "The size of monitoring instance disk."
}
variable "monitoring_size" {
type = string
default = "Standard_B2s"
description = "The size of monitoring instance."
}
variable "dc_name" {
type = string
default = "azure-dc"
validation {
condition = can(regex("^([a-z0-9]+(-[a-z0-9]+)*)+$", var.dc_name))
error_message = "Invalid dc_name. Must contain letters, numbers and hyphen."
}
description = "The Consul DC name."
}
variable "ca_certs" {
type = map(object({
filename = string
pemurl = string
}))
default = {
fakeleintermediatex1 = {
filename = "letsencrypt-stg-root-x1.pem"
pemurl = "https://letsencrypt.org/certs/staging/letsencrypt-stg-root-x1.pem"
},
fakelerootx1 = {
filename = "letsencrypt-stg-int-r3.pem"
pemurl = "https://letsencrypt.org/certs/staging/letsencrypt-stg-int-r3.pem"
}
}
description = "A group of certificate objects to download locally. This helps when using Let's Encrypt staging environment."
}
variable "image_resource_group_name" {
type = string
description = "The Azure Resource Group name where Caravan images are available."
}
variable "image_name_regex" {
type = string
default = "caravan-centos-image-*"
description = "The Azure Compute image name regex"
}
variable "vault_auth_resource" {
type = string
default = "https://management.azure.com/"
description = "The Azure AD application to use for generating access tokens."
}
variable "csi_volumes" {
type = map(map(string))
default = {}
description = <<EOF
Example:
{
"jenkins" : {
"storage_account_type" : "Standard_LRS"
"disk_size_gb" : "30"
}
}
EOF
}
variable "tags" {
type = map(string)
default = {
project = "caravan"
}
description = "A set of key-value tags applied to all resources created by Terraform."
}
variable "vault_license_file" {
type = string
default = null
description = "Path to Vault Enterprise license"
}
variable "consul_license_file" {
type = string
default = null
description = "Path to Consul Enterprise license"
}
variable "nomad_license_file" {
type = string
default = null
description = "Path to Nomad Enterprise license"
}