Repository navigation
Expand file tree
/
Copy pathvariables.tf
More file actions
249 lines (217 loc) · 6.62 KB
/
Copy pathvariables.tf
File metadata and controls
249 lines (217 loc) · 6.62 KB
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
variable "prefix" {
description = "(Optional) Specifies the prefix for the name of the Azure resources."
type = string
default = "funcmi"
validation {
condition = var.prefix == null || length(var.prefix) >= 2
error_message = "The prefix must be at least 2 characters long."
}
}
variable "suffix" {
description = "(Optional) Specifies the suffix for the name of the Azure resources."
type = string
default = "test"
validation {
condition = var.suffix == null || length(var.suffix) >= 2
error_message = "The suffix must be at least 2 characters long."
}
}
variable "location" {
description = "(Required) Specifies the location for all resources."
type = string
default = null
}
variable "account_replication_type" {
description = "(Optional) Specifies the replication type for the storage account."
type = string
default = "LRS"
validation {
condition = contains([
"LRS",
"GRS",
"RAGRS",
"ZRS",
"GZRS",
"RAGZRS"
], var.account_replication_type)
error_message = "The account_replication_type must be one of: LRS, GRS, RAGRS, ZRS, GZRS, RAGZRS."
}
}
variable "account_kind" {
description = "(Optional) Specifies the account kind of the storage account."
default = "StorageV2"
type = string
validation {
condition = contains(["Storage", "StorageV2"], var.account_kind)
error_message = "The account kind of the storage account is invalid."
}
}
variable "account_tier" {
description = "(Optional) Specifies the account tier of the storage account."
default = "Standard"
type = string
validation {
condition = contains(["Standard", "Premium"], var.account_tier)
error_message = "The account tier of the storage account is invalid."
}
}
variable "input_container_name" {
description = "(Optional) Specifies the name of the input container."
type = string
default = "input"
validation {
condition = can(regex("^[a-z0-9]([a-z0-9-]*[a-z0-9])?$", var.input_container_name))
error_message = "Container name must be lowercase alphanumeric characters or hyphens, between 3-63 characters."
}
}
variable "output_container_name" {
description = "(Optional) Specifies the name of the output container."
type = string
default = "output"
validation {
condition = can(regex("^[a-z0-9]([a-z0-9-]*[a-z0-9])?$", var.output_container_name))
error_message = "Container name must be lowercase alphanumeric characters or hyphens, between 3-63 characters."
}
}
variable "os_type" {
description = "(Required) Specifies the O/S type for the App Services to be hosted in this plan. Possible values include Windows, Linux, and WindowsContainer. Changing this forces a new resource to be created."
type = string
default = "Linux"
validation {
condition = contains([
"Windows",
"Linux",
"WindowsContainer"
], var.os_type)
error_message = "The os_type must be either 'Windows', 'Linux', or 'WindowsContainer'."
}
}
variable "zone_balancing_enabled" {
description = "(Optional) Should the Service Plan balance across Availability Zones in the region."
type = bool
default = false
}
variable "sku_tier" {
description = "(Optional) Specifies the tier name for the hosting plan."
type = string
default = "Standard"
validation {
condition = contains([
"Basic",
"Standard",
"ElasticPremium",
"Premium",
"PremiumV2",
"Premium0V3",
"PremiumV3",
"PremiumMV3",
"Isolated",
"IsolatedV2",
"WorkflowStandard",
"FlexConsumption"
], var.sku_tier)
error_message = "The sku_tier must be one of the allowed values."
}
}
variable "sku_name" {
description = "(Optional) Specifies the SKU name for the hosting plan."
type = string
default = "S1"
validation {
condition = contains([
"B1", "B2", "B3",
"S1", "S2", "S3",
"EP1", "EP2", "EP3",
"P1", "P2", "P3",
"P1V2", "P2V2", "P3V2",
"P0V3", "P1V3", "P2V3", "P3V3",
"P1MV3", "P2MV3", "P3MV3", "P4MV3", "P5MV3",
"I1", "I2", "I3",
"I1V2", "I2V2", "I3V2", "I4V2", "I5V2", "I6V2",
"WS1", "WS2", "WS3",
"FC1"
], var.sku_name)
error_message = "The sku_name must be one of the allowed values."
}
}
variable "runtime_name" {
description = "(Required) Specifies the language runtime used by the Azure Functions App."
type = string
default = "python"
validation {
condition = contains([
"dotnet",
"dotnet-isolated",
"python",
"java",
"node",
"powerShell",
"custom"
], var.runtime_name)
error_message = "The runtime_name must be one of the allowed values."
}
}
variable "python_version" {
description = "(Optional) Specifies the Python version for the Azure Functions App."
type = string
default = "3.12"
validation {
condition = contains([
"3.14",
"3.13",
"3.12",
"3.11",
"3.10",
"3.9",
"3.8",
"3.7"
], var.python_version)
error_message = "The python_version must be one of the supported versions"
}
}
variable "https_only" {
description = "(Optional) Specifies whether HTTPS is enforced for the Azure Functions App."
type = bool
default = false
}
variable "minimum_tls_version" {
description = "(Optional) Specifies the minimum TLS version for the Azure Functions App."
type = string
default = "1.2"
validation {
condition = contains([
"1.0",
"1.1",
"1.2",
"1.3"
], var.minimum_tls_version)
error_message = "The minimum_tls_version must be one of the allowed values."
}
}
variable "always_on" {
description = "(Optional) Specifies whether Always On is enabled for the Azure Functions App."
type = bool
default = true
}
variable "public_network_access_enabled" {
description = "(Optional) Specifies whether the public network access is enabled or disabled."
type = bool
default = true
}
variable "managed_identity_type" {
description = "Specifies the type of managed identity."
type = string
default = "SystemAssigned"
validation {
condition = contains(["SystemAssigned", "UserAssigned"], var.managed_identity_type)
error_message = "The managed_identity_type must be either 'SystemAssigned' or 'UserAssigned'."
}
}
variable "tags" {
description = "(Optional) Specifies the tags to be applied to the resources."
type = map(string)
default = {
environment = "test"
iac = "terraform"
}
}