-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
35 lines (30 loc) · 982 Bytes
/
main.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
# Mappia Deployment
resource "helm_release" "mappia" {
name = var.name
version = var.chart_version
repository = "oci://mappia.azurecr.io/helm"
chart = "mappia"
wait = true
timeout = 600
cleanup_on_fail = true
atomic = true
render_subchart_notes = false
values = var.values
dynamic "set" {
for_each = merge(local.default_set_values, var.set_values)
content {
name = set.key
value = set.value
}
}
}
locals {
default_set_values = var.use_default_config ? {
"magento.baseUrl" = format("https://%s", var.host)
"magento.adminUrl" = format("https://%s", var.host)
"api.ingress.hosts[0].host" = var.host
"admin.ingress.hosts[0].host" = var.host
"admin.ingress.hosts[0].paths" = "{/admin,/index.php/admin}"
"frontend.ingress.hosts[0].host" = var.host
} : {}
}