2023-09-08 12:11:02 +00: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 10:13:52 +00:00
|
|
|
|
2023-09-27 14:40:13 +00:00
|
|
|
boot_hosts_count = 1
|
2023-09-08 13:48:13 +00:00
|
|
|
store_hosts_count = 2
|
2023-09-29 10:26:01 +00:00
|
|
|
store_db_hosts_count = 1
|
|
|
|
store_db_data_vol_size = 40
|
2023-09-18 10:13:52 +00:00
|
|
|
|
|
|
|
do_type = "s-1vcpu-2gb" /* DigitalOcean */
|
|
|
|
ac_type = "ecs.t5-lc1m2.small" /* Alibaba Cloud */
|
|
|
|
gc_type = "g1-small" /* Google Cloud */
|
2023-09-08 12:11:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
test = {
|
|
|
|
/* Settings specific to the test fleet/workspace. */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Makes fleet settings available under local.ws. */
|
|
|
|
locals {
|
|
|
|
ws = merge(local.env["defaults"], local.env[terraform.workspace])
|
|
|
|
}
|