forked from Azure/terraform-azure-container-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
285 lines (255 loc) · 9.52 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
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
variable "container_app_environment_name" {
type = string
description = "(Required) The name of the container apps managed environment. Changing this forces a new resource to be created."
nullable = false
}
variable "container_apps" {
type = map(object({
name = string
tags = optional(map(string))
revision_mode = string
template = object({
containers = set(object({
name = string
image = string
args = optional(list(string))
command = optional(list(string))
cpu = string
memory = string
env = optional(set(object({
name = string
secret_name = optional(string)
value = optional(string)
})))
liveness_probe = optional(object({
failure_count_threshold = optional(number)
header = optional(object({
name = string
value = string
}))
host = optional(string)
initial_delay = optional(number, 1)
interval_seconds = optional(number, 10)
path = optional(string)
port = number
timeout = optional(number, 1)
transport = string
}))
readiness_probe = optional(object({
failure_count_threshold = optional(number)
header = optional(object({
name = string
value = string
}))
host = optional(string)
interval_seconds = optional(number, 10)
path = optional(string)
port = number
success_count_threshold = optional(number, 3)
timeout = optional(number)
transport = string
}))
startup_probe = optional(object({
failure_count_threshold = optional(number)
header = optional(object({
name = string
value = string
}))
host = optional(string)
interval_seconds = optional(number, 10)
path = optional(string)
port = number
timeout = optional(number)
transport = string
}))
volume_mounts = optional(object({
name = string
path = string
}))
}))
max_replicas = optional(number)
min_replicas = optional(number)
revision_suffix = optional(string)
volume = optional(set(object({
name = string
storage_name = optional(string)
storage_type = optional(string)
})))
})
ingress = optional(object({
allow_insecure_connections = optional(bool, false)
external_enabled = optional(bool, false)
target_port = number
transport = optional(string)
traffic_weight = object({
label = optional(string)
latest_revision = optional(string)
revision_suffix = optional(string)
percentage = number
})
}))
identity = optional(object({
type = string
identity_ids = optional(list(string))
}))
dapr = optional(object({
app_id = string
app_port = number
app_protocol = optional(string)
}))
registry = optional(list(object({
server = string
username = optional(string)
password_secret_name = optional(string)
identity = optional(string)
})))
}))
description = "The container apps to deploy."
nullable = false
validation {
condition = length(var.container_apps) >= 1
error_message = "At least one container should be provided."
}
}
variable "location" {
type = string
description = "(Required) The location this container app is deployed in. This should be the same as the environment in which it is deployed."
nullable = false
}
variable "log_analytics_workspace_name" {
type = string
description = "(Required) Specifies the name of the Log Analytics Workspace. Changing this forces a new resource to be created."
nullable = false
}
variable "resource_group_name" {
type = string
description = "(Required) The name of the resource group in which the resources will be created."
nullable = false
}
variable "container_app_environment_infrastructure_subnet_id" {
type = string
default = null
description = "(Optional) The existing subnet to use for the container apps control plane. Changing this forces a new resource to be created."
}
variable "container_app_environment_internal_load_balancer_enabled" {
type = bool
default = false
description = "(Optional) Should the Container Environment operate in Internal Load Balancing Mode? Defaults to `false`. Changing this forces a new resource to be created."
}
variable "container_app_environment_tags" {
type = map(string)
default = {}
description = "A map of the tags to use on the resources that are deployed with this module."
}
variable "container_app_secrets" {
type = map(list(object({
name = string
value = string
})))
default = {}
description = "(Optional) The secrets of the container apps. The key of the map should be aligned with the corresponding container app."
nullable = false
sensitive = true
}
variable "dapr_component" {
type = map(object({
name = string
component_type = string
version = string
ignore_errors = optional(bool, false)
init_timeout = optional(string, "5s")
scopes = optional(list(string))
metadata = optional(set(object({
name = string
secret_name = optional(string)
value = string
})))
}))
default = {}
description = "(Optional) The Dapr component to deploy."
nullable = false
}
variable "dapr_component_secrets" {
type = map(list(object({
name = string
value = string
})))
default = {}
description = "(Optional) The secrets of the Dapr components. The key of the map should be aligned with the corresponding Dapr component."
nullable = false
sensitive = true
}
variable "env_storage" {
type = map(object({
name = string
account_name = string
share_name = string
access_mode = string
}))
default = {}
description = "(Optional) Manages a Container App Environment Storage, writing files to this file share to make data accessible by other systems."
nullable = false
}
variable "environment_storage_access_key" {
type = map(string)
default = null
description = "(Optional) The Storage Account Access Key. The key of the map should be aligned with the corresponding environment storage."
sensitive = true
}
variable "log_analytics_workspace" {
type = object({
id = string
})
default = null
description = "(Optional) A Log Analytics Workspace already exists."
}
variable "log_analytics_workspace_allow_resource_only_permissions" {
type = bool
default = true
description = "(Optional) Specifies if the log Analytics Workspace allow users accessing to data associated with resources they have permission to view, without permission to workspace. Defaults to `true`."
}
variable "log_analytics_workspace_cmk_for_query_forced" {
type = bool
default = false
description = "(Optional) Is Customer Managed Storage mandatory for query management? Defaults to `false`."
}
variable "log_analytics_workspace_daily_quota_gb" {
type = number
default = -1
description = "(Optional) The workspace daily quota for ingestion in GB. Defaults to `-1` which means unlimited."
}
variable "log_analytics_workspace_internet_ingestion_enabled" {
type = bool
default = true
description = "(Optional) Should the Log Analytics Workspace support ingestion over the Public Internet? Defaults to `true`."
}
variable "log_analytics_workspace_internet_query_enabled" {
type = bool
default = true
description = "(Optional) Should the Log Analytics Workspace support query over the Public Internet? Defaults to `true`."
}
variable "log_analytics_workspace_local_authentication_disabled" {
type = bool
default = false
description = "(Optional) Specifies if the log analytics workspace should enforce authentication using Azure Active Directory. Defaults to `false`."
}
variable "log_analytics_workspace_reservation_capacity_in_gb_per_day" {
type = number
default = null
description = "(Optional) The capacity reservation level in GB for this workspace. Must be in increments of 100 between 100 and 5000. `reservation_capacity_in_gb_per_day` can only be used when the `sku` is set to `CapacityReservation`."
}
variable "log_analytics_workspace_retention_in_days" {
type = number
default = null
description = "(Optional) The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730."
}
variable "log_analytics_workspace_sku" {
type = string
default = "PerGB2018"
description = "(Optional) Specifies the SKU of the Log Analytics Workspace. Possible values are `Free`, `PerNode`, `Premium`, `Standard`, `Standalone`, `Unlimited`, `CapacityReservation`, and `PerGB2018`(new SKU as of `2018-04-03`). Defaults to `PerGB2018`. "
}
variable "log_analytics_workspace_tags" {
type = map(string)
default = null
description = "(Optional) A mapping of tags to assign to the resource."
}