-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocals.tf
36 lines (31 loc) · 1.11 KB
/
locals.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
locals {
account_id = var.account_ids[terraform.workspace]
vpc_id = var.vpc_ids[terraform.workspace]
ecs_cluster_name = "${var.application_name}-cluster"
is_prod = terraform.workspace == "prod"
ecr_repository = "${var.account_ids["prod"]}.dkr.ecr.${data.aws_region.current.name}.amazonaws.com"
ecr_image_tag = local.is_prod ? "stable" : "latest"
opensearch = {
domain_name = "${var.application_name}-search"
volume_size = local.is_prod ? 100 : 10
instance_type = local.is_prod ? "m7g.medium.search" : "t3.small.search"
volume_type = local.is_prod ? "gp3" : "gp2"
throughput = local.is_prod ? 125 : null
}
domain_name = local.is_prod ? "monitoring.pillarbox.ch" : "dev.monitoring.pillarbox.ch"
transfer_task = {
cpu = 512
memory = 1024
}
dispatch_task = {
cpu = 256
memory = 512
}
default_tags = {
"srg-managed-by" = "terraform"
"srg-application" = var.application_name
"srg-owner" = "[email protected]"
"srg-businessowner" = "pillarbox"
"srg-environment" = terraform.workspace
}
}