@@ -15,13 +15,13 @@ provider "tailscale" {
1515module "postgres_monitor" {
1616 source = " ../../modules/ec2"
1717
18- ec2_instance_name = var. monitor_instance_name
19- ec2_hostname = var. monitor_hostname
20- ec2_instance_type = var. monitor_instance_type
21- ec2_ssh_key_name = var. monitor_ssh_key_name
18+ ec2_instance_name = var. postgres_monitor_instance_name
19+ ec2_hostname = var. postgres_monitor_hostname
20+ ec2_instance_type = var. postgres_monitor_instance_type
21+ ec2_ssh_key_name = var. postgres_monitor_ssh_key_name
2222 ec2_ssh_public_key_path = var. ssh_public_key_path_aws
23- ec2_cloud_init_template_path = var. monitor_cloud_init_template_path
24- ec2_root_volume_size = var. monitor_root_volume_size
23+ ec2_cloud_init_template_path = var. postgres_monitor_cloud_init_template_path
24+ ec2_root_volume_size = var. postgres_monitor_root_volume_size
2525 ec2_tailscale_key_expiry = var. tailscale_key_expiry
2626 ec2_tailscale_tags = var. tailscale_tags
2727
@@ -32,36 +32,74 @@ module "postgres_monitor" {
3232module "postgres_primary" {
3333 source = " ../../modules/elastic_metal"
3434
35- elastic_metal_zone = var. primary_zone
36- elastic_metal_offer_name = var. primary_offer_name
35+ elastic_metal_zone = var. postgres_primary_zone
36+ elastic_metal_offer_name = var. postgres_primary_offer_name
3737 elastic_metal_subscription_period = var. subscription_period
38- elastic_metal_server_name = var. primary_server_name
39- elastic_metal_hostname = var. primary_hostname
40- elastic_metal_description = var. primary_description
41- elastic_metal_ssh_key_name = var. primary_ssh_key_name
38+ elastic_metal_server_name = var. postgres_primary_server_name
39+ elastic_metal_hostname = var. postgres_primary_hostname
40+ elastic_metal_description = var. postgres_primary_description
41+ elastic_metal_ssh_key_name = var. postgres_primary_ssh_key_name
4242 elastic_metal_ssh_public_key_path = var. ssh_public_key_path_scaleway
43- elastic_metal_cloud_init_template_path = var. primary_cloud_init_template_path
43+ elastic_metal_cloud_init_template_path = var. postgres_primary_cloud_init_template_path
4444 elastic_metal_os_id = var. os_id
4545 elastic_metal_tailscale_key_expiry = var. tailscale_key_expiry
4646 elastic_metal_tailscale_tags = var. tailscale_tags
47- elastic_metal_tags = var. primary_tags
47+ elastic_metal_tags = var. postgres_primary_tags
4848}
4949
5050# Postgres Secondary (Elastic Metal / Scaleway Bare Metal)
5151module "postgres_secondary" {
5252 source = " ../../modules/elastic_metal"
5353
54- elastic_metal_zone = var. secondary_zone
55- elastic_metal_offer_name = var. secondary_offer_name
54+ elastic_metal_zone = var. postgres_secondary_zone
55+ elastic_metal_offer_name = var. postgres_secondary_offer_name
5656 elastic_metal_subscription_period = var. subscription_period
57- elastic_metal_server_name = var. secondary_server_name
58- elastic_metal_hostname = var. secondary_hostname
59- elastic_metal_description = var. secondary_description
60- elastic_metal_ssh_key_name = var. secondary_ssh_key_name
57+ elastic_metal_server_name = var. postgres_secondary_server_name
58+ elastic_metal_hostname = var. postgres_secondary_hostname
59+ elastic_metal_description = var. postgres_secondary_description
60+ elastic_metal_ssh_key_name = var. postgres_secondary_ssh_key_name
6161 elastic_metal_ssh_public_key_path = var. ssh_public_key_path_scaleway
62- elastic_metal_cloud_init_template_path = var. secondary_cloud_init_template_path
62+ elastic_metal_cloud_init_template_path = var. postgres_secondary_cloud_init_template_path
6363 elastic_metal_os_id = var. os_id
6464 elastic_metal_tailscale_key_expiry = var. tailscale_key_expiry
6565 elastic_metal_tailscale_tags = var. tailscale_tags
66- elastic_metal_tags = var. secondary_tags
66+ elastic_metal_tags = var. postgres_secondary_tags
67+ }
68+
69+ # Gateway Primary (Elastic Metal / Scaleway Bare Metal)
70+ module "gateway_primary" {
71+ source = " ../../modules/elastic_metal"
72+
73+ elastic_metal_zone = var. gateway_primary_zone
74+ elastic_metal_offer_name = var. gateway_primary_offer_name
75+ elastic_metal_subscription_period = var. subscription_period
76+ elastic_metal_server_name = var. gateway_primary_server_name
77+ elastic_metal_hostname = var. gateway_primary_hostname
78+ elastic_metal_description = var. gateway_primary_description
79+ elastic_metal_ssh_key_name = var. gateway_primary_ssh_key_name
80+ elastic_metal_ssh_public_key_path = var. ssh_public_key_path_scaleway
81+ elastic_metal_cloud_init_template_path = var. gateway_primary_cloud_init_template_path
82+ elastic_metal_os_id = var. os_id
83+ elastic_metal_tailscale_key_expiry = var. tailscale_key_expiry
84+ elastic_metal_tailscale_tags = var. tailscale_tags
85+ elastic_metal_tags = var. gateway_primary_tags
86+ }
87+
88+ # Gateway Secondary (Elastic Metal / Scaleway Bare Metal)
89+ module "gateway_secondary" {
90+ source = " ../../modules/elastic_metal"
91+
92+ elastic_metal_zone = var. gateway_secondary_zone
93+ elastic_metal_offer_name = var. gateway_secondary_offer_name
94+ elastic_metal_subscription_period = var. subscription_period
95+ elastic_metal_server_name = var. gateway_secondary_server_name
96+ elastic_metal_hostname = var. gateway_secondary_hostname
97+ elastic_metal_description = var. gateway_secondary_description
98+ elastic_metal_ssh_key_name = var. gateway_secondary_ssh_key_name
99+ elastic_metal_ssh_public_key_path = var. ssh_public_key_path_scaleway
100+ elastic_metal_cloud_init_template_path = var. gateway_secondary_cloud_init_template_path
101+ elastic_metal_os_id = var. os_id
102+ elastic_metal_tailscale_key_expiry = var. tailscale_key_expiry
103+ elastic_metal_tailscale_tags = var. tailscale_tags
104+ elastic_metal_tags = var. gateway_secondary_tags
67105}
0 commit comments