infra-waku/workspaces.tf

38 lines
836 B
Terraform
Raw Normal View History

2023-10-05 12:08:18 +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-10-05 16:14:47 +00:00
hosts_count = 1 /* number of hosts in each DC */
do_type = "s-1vcpu-2gb" /* DigitalOcean */
ac_type = "ecs.t5-lc1m2.small" /* Alibaba Cloud */
gc_type = "g1-small" /* Google Cloud */
2023-10-10 11:14:21 +00:00
node_data_vol_size = 40
node_db_data_vol_size = 70
2023-10-05 12:08:18 +00:00
}
2023-10-05 16:14:47 +00:00
# Inherits defaults.
2023-10-05 12:08:18 +00:00
test = {
/* Settings specific to the test fleet/workspace. */
}
2024-02-23 11:12:18 +00:00
sandbox = {
/* Settings specific to the test fleet/workspace. */
}
2023-10-05 12:08:18 +00:00
}
}
locals {
ws = merge(local.env["defaults"], local.env[terraform.workspace])
}