generated from status-im/infra-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
workspaces.tf
51 lines (43 loc) · 1.34 KB
/
workspaces.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
/**
* This is a hacky way of binding specific variable
* values to different Terraform workspaces.
*
* Details:
* https://github.com/hashicorp/terraform/issues/15966
*/
locals {
env = {
defaults = {
/* Default settings for all fleets/workspaces. */
boot_hosts_count = 1
store_hosts_count = 2
store_db_hosts_count = 1
store_db_data_vol_size = 100
node_do_type = "s-1vcpu-2gb" /* DigitalOcean */
node_ac_type = "ecs.t5-lc1m2.small" /* Alibaba Cloud */
node_gc_type = "g1-small" /* Google Cloud */
db_do_type = "s-1vcpu-2gb" /* DigitalOcean */
db_ac_type = "ecs.t5-lc1m2.small" /* Alibaba Cloud */
db_gc_type = "g1-small" /* Google Cloud */
}
/* Settings specific to the test fleet/workspace. */
prod = {
node_do_type = "s-2vcpu-4gb"
node_ac_type = "ecs.t5-lc1m2.large"
node_gc_type = "c2d-highcpu-2"
db_do_type = "c2-16vcpu-32gb-intel"
db_ac_type = "ecs.c6.4xlarge"
db_gc_type = "c2d-highcpu-16"
store_db_data_vol_size = 320
}
staging = {
db_do_type = "s-2vcpu-4gb"
db_ac_type = "ecs.t5-lc1m2.large"
db_gc_type = "c2d-highcpu-2"
}
}
}
/* Makes fleet settings available under local.ws. */
locals {
ws = merge(local.env["defaults"], local.env[terraform.workspace])
}