-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvariables.tf
200 lines (171 loc) · 5.11 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
variable "name" {
description = "Name for a single VM. Use 'names' for multiple VMs. "
type = string
default = ""
}
variable "instances" {
description = "Number of VMs in the scale set."
type = number
default = 2
}
variable "proximity_placement_group_id" {
description = "Resource ID for proximity placement group if ensuring low latency."
type = string
default = null
}
variable "source_image_id" {
description = "Custom virtual image ID. Use either this or specify the source image_reference for platform images."
type = string
}
variable "source_image_reference" {
// Not currently used - custom images only
description = "Standard image reference block for platform images. Do not use if specifying a custom source_image_id."
type = object({
publisher = string
offer = string
sku = string
version = string
})
default = null
}
variable "autoscale" {
// Possible host metric values: https://docs.microsoft.com/azure/azure-monitor/platform/metrics-supported#microsoftcomputevirtualmachinescalesets
// e.g. "Percentage CPU"
// Look to add guest metrics?: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-mvss-guest-based-autoscale-linux
// Users could always create their own autoscaling rules to variantsnot covered by this module
type = object({
capacity = object({
default = number
minimum = number
maximum = number
})
rule = object({
metric = string
upper = number
lower = number
})
})
default = null
}
// ==============================================================================
variable "defaults" {
description = "Collection of user configurable default values."
type = object({
resource_group_name = string
location = string
tags = map(string)
vm_size = string
storage_account_type = string
admin_username = string
admin_ssh_public_key = string
additional_ssh_keys = list(object({
username = string
public_key = string
}))
subnet_id = string
identity_id = string
boot_diagnostics_uri = string
})
default = {
resource_group_name = null
location = null
tags = {}
vm_size = null
storage_account_type = null
admin_username = null
admin_ssh_public_key = null
additional_ssh_keys = null
subnet_id = null
identity_id = null
boot_diagnostics_uri = null
}
}
variable "resource_group_name" {
description = "Name of the resource group."
type = string
default = ""
}
variable "location" {
description = "Azure region."
type = string
default = ""
}
variable "tags" {
description = "Azure tags object."
type = map
default = {}
}
variable "subnet_id" {
description = "Resource ID for the subnet to attach the NIC to."
type = string
default = ""
}
variable "vm_size" {
description = "Virtual machine SKU name."
type = string
default = ""
}
variable "storage_account_type" {
description = "Either Standard_LRS (default), StandardSSD_LRS or Premium_LRS."
type = string
default = ""
}
variable "key_vault_id" {
description = "Resource ID for key_vault_id containing public SSH keys."
type = string
default = ""
}
variable "admin_username" {
description = "Admin username. Requires matching secret in keyvault with the public key."
type = string
default = ""
}
variable "admin_ssh_public_key" {
description = "SSH public key string for admin_username. E.g. file(~/.ssh/id_rsa.pub)."
type = string
default = ""
}
variable "additional_ssh_keys" {
description = "List of additional admin users and their SSH public keys"
type = list(object({
username = string
public_key = string
}))
default = []
}
variable "identity_id" {
description = "Resource ID for a user assigned managed identity."
type = string
default = null
}
variable "boot_diagnostics_uri" {
description = "Blob URI for the boot diagnostics storage account."
type = string
default = ""
}
// ==============================================================================
variable "application_security_group_ids" {
description = "List of application security group resource IDs."
type = list(string)
default = null
}
variable "availability_set_ids" {
description = "List of availability set resource IDs."
type = list(string)
default = null
}
variable "load_balancer_backend_address_pool_ids" {
description = "List of load balancer's backend pool resource IDs."
type = list(string)
default = null
}
variable "application_gateway_backend_address_pool_ids" {
description = "List of application gateway's backend pool resource IDs."
type = list(string)
default = null
}
// ==============================================================================
variable "module_depends_on" {
type = list(any)
default = []
}