File tree 3 files changed +15
-10
lines changed 3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ module "primarycluster" {
57
57
instance_type_worker = var. instance_type_worker
58
58
zone_id = var. zone_id
59
59
run_nomad_jobs = var. run_nomad_jobs
60
- host_access_ip = var . host_access_ip
60
+ host_access_ip = local . host_access_ip
61
61
primary_datacenter = var. primary_datacenter
62
62
63
63
# EMEA-SE-PLAYGROUND
@@ -70,7 +70,7 @@ module "primarycluster" {
70
70
nomad_gossip_key = data. terraform_remote_state . emea_se_playground_tls_root_certificate . outputs . nomad_gossip_key
71
71
}
72
72
73
- /*
73
+
74
74
module "secondarycluster" {
75
75
source = " ./modules"
76
76
owner = var. owner
@@ -99,7 +99,7 @@ module "secondarycluster" {
99
99
instance_type_worker = var. instance_type_worker
100
100
zone_id = var. zone_id
101
101
run_nomad_jobs = var. run_nomad_jobs
102
- host_access_ip = var .host_access_ip
102
+ host_access_ip = local . host_access_ip
103
103
primary_datacenter = var. primary_datacenter
104
104
# EMEA-SE-PLAYGROUND
105
105
ca_key_algorithm = data. terraform_remote_state . emea_se_playground_tls_root_certificate . outputs . ca_key_algorithm
@@ -110,7 +110,7 @@ module "secondarycluster" {
110
110
consul_master_token = data. terraform_remote_state . emea_se_playground_tls_root_certificate . outputs . consul_master_token
111
111
nomad_gossip_key = data. terraform_remote_state . emea_se_playground_tls_root_certificate . outputs . nomad_gossip_key
112
112
}
113
- */
113
+
114
114
115
115
/*
116
116
module "tertiarycluster" {
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ output "Primary_nomad_tag_servers"{
73
73
}
74
74
75
75
// Secondary
76
- /*
76
+
77
77
output "Secondary_Consul" {
78
78
value = module. secondarycluster . consul_ui
79
79
}
@@ -103,7 +103,7 @@ output "Secondary_nomad_tag_workers"{
103
103
output "Secondary_nomad_tag_servers" {
104
104
value = module. secondarycluster . nomad_tag_servers
105
105
}
106
- */
106
+
107
107
108
108
// Tertiary
109
109
/*
Original file line number Diff line number Diff line change
1
+ data "http" "myipaddr" {
2
+ url = " http://ipv4.icanhazip.com"
3
+ }
4
+
5
+ locals {
6
+ host_access_ip = [" ${ chomp (data. http . myipaddr . body )} /32" ]
7
+ }
8
+
9
+
1
10
variable "region" {
2
11
description = " The region to create resources."
3
12
default = " eu-west-2"
@@ -196,10 +205,6 @@ variable "run_nomad_jobs" {
196
205
default = " 0"
197
206
}
198
207
199
- variable "host_access_ip" {
200
- description = " CIDR blocks allowed to connect via SSH on port 22"
201
- default = []
202
- }
203
208
204
209
variable "primary_datacenter" {
205
210
description = " the primary datacenter for mesh gateways"
You can’t perform that action at this time.
0 commit comments