2023-09-08 14:11:02 +02:00
|
|
|
/**
|
|
|
|
* 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. */
|
2023-09-18 12:13:52 +02:00
|
|
|
|
2023-09-27 16:40:13 +02:00
|
|
|
boot_hosts_count = 1
|
2023-09-08 15:48:13 +02:00
|
|
|
store_hosts_count = 2
|
2023-09-29 12:26:01 +02:00
|
|
|
store_db_hosts_count = 1
|
2024-02-01 12:23:00 +01:00
|
|
|
store_db_data_vol_size = 100
|
2023-09-18 12:13:52 +02:00
|
|
|
|
2024-06-12 16:45:48 +02:00
|
|
|
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 */
|
2023-09-08 14:11:02 +02:00
|
|
|
}
|
|
|
|
|
2024-06-12 16:45:48 +02:00
|
|
|
/* Settings specific to the test fleet/workspace. */
|
2023-09-08 14:11:02 +02:00
|
|
|
test = {
|
2024-06-12 16:45:48 +02:00
|
|
|
db_do_type = "s-2vcpu-4gb"
|
|
|
|
db_ac_type = "ecs.c6.large"
|
|
|
|
db_gc_type = "c2d-highcpu-2"
|
|
|
|
|
2024-07-09 11:15:15 +02:00
|
|
|
store_db_data_vol_size = 300
|
2023-09-08 14:11:02 +02:00
|
|
|
}
|
2024-03-18 20:48:58 +01:00
|
|
|
staging = {
|
|
|
|
/* Settings specific to the test fleet/workspace. */
|
|
|
|
}
|
2023-09-08 14:11:02 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Makes fleet settings available under local.ws. */
|
|
|
|
locals {
|
|
|
|
ws = merge(local.env["defaults"], local.env[terraform.workspace])
|
|
|
|
}
|