File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
locals {
2
2
setup_client = templatefile (" ${ path . module } /scripts/setup_client.tftpl.sh" , {
3
+ aws_region = var.aws_region
3
4
route_53_resolver_address = var.route_53_resolver_address
4
5
enable_docker_plugin = var.enable_docker_plugin
5
6
nomad_join_tag_key = " nomad_ec2_join"
@@ -11,4 +12,4 @@ locals {
11
12
nomad_acl_enable = var.nomad_acl_enable
12
13
})
13
14
})
14
- }
15
+ }
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ set_hostname() {
83
83
prepare_dns_config () {
84
84
cat << EOF >/etc/nomad.d/route53_resolv.conf
85
85
nameserver ${route_53_resolver_address}
86
- search ap-south-1 .compute.internal
86
+ search ${aws_region} .compute.internal
87
87
EOF
88
88
}
89
89
130
130
client {
131
131
enabled = true
132
132
server_join {
133
- retry_join = ["provider=aws region=ap-south-1 tag_key=${nomad_join_tag_key} tag_value=${nomad_join_tag_value} "]
133
+ retry_join = ["provider=aws region=${aws_region} tag_key=${nomad_join_tag_key} tag_value=${nomad_join_tag_value} "]
134
134
}
135
135
meta {
136
136
$( for tag in " $$ {AWS_TAGS[@]}" ; do
Original file line number Diff line number Diff line change @@ -6,6 +6,13 @@ variable "ami" {
6
6
nullable = false
7
7
}
8
8
9
+ variable "aws_region" {
10
+ description = " AWS region to deploy the cluster in"
11
+ type = string
12
+ default = " ap-south-1"
13
+ nullable = false
14
+ }
15
+
9
16
variable "client_name" {
10
17
description = " Name of the Auto Scaling Group (ASG) nodes deployed as Nomad clients"
11
18
type = string
You can’t perform that action at this time.
0 commit comments