-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfront.tf
48 lines (40 loc) · 1.23 KB
/
front.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
module "front_app" {
source = "scalingo-community/app/scalingo"
version = "0.3.2"
stack = "scalingo-22"
name = var.nom_de_l_application
containers = {
web = {
size = terraform.workspace == "production" ? "XL" : "M"
amount = terraform.workspace == "production" ? 2 : 1
autoscaler = terraform.workspace == "production" ? {
min_containers = 2
max_containers = 10
metric = "cpu"
target = 0.8
} : null
}
}
github_integration = {
repo_url = "https://github.com/DNUM-SocialGouv/1j1s-front"
branch = var.branche_git
auto_deploy_enabled = (terraform.workspace == "default") ? true : false
}
environment = local.envs_du_fichier_env
addons = [
{
provider = "redis"
plan = terraform.workspace == "production" ? "redis-business-256" : "redis-starter-256"
database_features = ["redis-rdb"]
}
]
domain = var.nom_de_domaine
domain_aliases = terraform.workspace == "production" ? ["1jeune1solution.gouv.fr"] : null
router_logs = true
log_drains = (var.logstash_uri != null) ? [
{
type = "elk"
url = sensitive(var.logstash_uri)
}
] : null
}