Skip to content

Commit 78ad3dc

Browse files
authored
adding region (rancher#262)
1 parent 26cbfb1 commit 78ad3dc

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

modules/k3s/master/instances_server.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ resource "aws_instance" "master" {
9191
]
9292
}
9393
provisioner "local-exec" {
94-
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" && sleep 90 || exit 0"
94+
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" --region \"${var.region}\" && sleep 90 || exit 0"
9595
}
9696
provisioner "file" {
9797
source = "../install/node_role.sh"
@@ -134,7 +134,7 @@ resource "aws_instance" "master" {
134134
]
135135
}
136136
provisioner "local-exec" {
137-
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" && sleep 90 || exit 0"
137+
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" --region \"${var.region}\" && sleep 90 || exit 0"
138138
}
139139
provisioner "remote-exec" {
140140
inline = [
@@ -256,7 +256,7 @@ resource "aws_instance" "master2-ha" {
256256
]
257257
}
258258
provisioner "local-exec" {
259-
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" && sleep 90 || exit 0"
259+
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" --region \"${var.region}\" && sleep 90 || exit 0"
260260
}
261261
provisioner "file" {
262262
source = "../install/node_role.sh"
@@ -300,7 +300,7 @@ resource "aws_instance" "master2-ha" {
300300
]
301301
}
302302
provisioner "local-exec" {
303-
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" && sleep 90 || exit 0"
303+
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" --region \"${var.region}\" && sleep 90 || exit 0"
304304
}
305305
provisioner "remote-exec" {
306306
inline = [ <<-EOT

modules/k3s/worker/instances_worker.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ resource "aws_instance" "worker" {
3232
}
3333

3434
provisioner "local-exec" {
35-
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" && sleep 90 || exit 0"
35+
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" --region \"${var.region}\" && sleep 90 || exit 0"
3636
}
3737
provisioner "file" {
3838
source = "../install/join_k3s_agent.sh"
@@ -50,7 +50,7 @@ resource "aws_instance" "worker" {
5050
}
5151

5252
provisioner "local-exec" {
53-
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" && sleep 90 || exit 0"
53+
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" --region \"${var.region}\" && sleep 90 || exit 0"
5454
}
5555
provisioner "remote-exec" {
5656
inline = [

modules/rke2/master/instances_server.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ resource "aws_instance" "master" {
102102
]
103103
}
104104
provisioner "local-exec" {
105-
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" && sleep 90 || exit 0"
105+
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" --region \"${var.region}\" && sleep 90 || exit 0"
106106
}
107107
provisioner "file" {
108108
source = "../install/optional_write_files.sh"
@@ -136,7 +136,7 @@ resource "aws_instance" "master" {
136136
]
137137
}
138138
provisioner "local-exec" {
139-
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" && sleep 90 || exit 0"
139+
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" --region \"${var.region}\" && sleep 90 || exit 0"
140140
}
141141
provisioner "remote-exec" {
142142
inline = [<<-EOT
@@ -245,7 +245,7 @@ resource "aws_instance" "master2-ha" {
245245
]
246246
}
247247
provisioner "local-exec" {
248-
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" && sleep 90 || exit 0"
248+
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" --region \"${var.region}\" && sleep 90 || exit 0"
249249
}
250250
provisioner "file" {
251251
source = "../install/optional_write_files.sh"
@@ -279,7 +279,7 @@ resource "aws_instance" "master2-ha" {
279279
]
280280
}
281281
provisioner "local-exec" {
282-
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" && sleep 90 || exit 0"
282+
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" --region \"${var.region}\" && sleep 90 || exit 0"
283283
}
284284
provisioner "remote-exec" {
285285
inline = [<<-EOT

modules/rke2/worker/instances_worker.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ resource "aws_instance" "worker" {
4848
]
4949
}
5050
provisioner "local-exec" {
51-
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" && sleep 90 || exit 0"
51+
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" --region \"${var.region}\" && sleep 90 || exit 0"
5252
}
5353
provisioner "file" {
5454
source = "../install/join_rke2_agent.sh"
@@ -62,7 +62,7 @@ resource "aws_instance" "worker" {
6262
]
6363
}
6464
provisioner "local-exec" {
65-
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" && sleep 90 || exit 0"
65+
command = "echo \"${var.node_os}\" | grep -q \"slemicro\" && aws ec2 reboot-instances --instance-ids \"${self.id}\" --region \"${var.region}\" && sleep 90 || exit 0"
6666
}
6767
provisioner "remote-exec" {
6868
inline = [<<-EOT

0 commit comments

Comments
 (0)