File tree Expand file tree Collapse file tree 2 files changed +8
-24
lines changed
terraform/oss-redisearch-m5-spot-instances Expand file tree Collapse file tree 2 files changed +8
-24
lines changed Original file line number Diff line number Diff line change @@ -22,18 +22,10 @@ resource "aws_spot_instance_request" "client" {
2222 # ###############################################################################
2323 # This will ensure we wait here until the instance is ready to receive the ssh connection
2424 # ###############################################################################
25- provisioner "remote-exec" {
26- script = " ./../scripts/wait_for_instance.sh"
27- connection {
28- host = self. public_ip # The `self` variable is like `this` in many programming languages
29- type = " ssh" # in this case, `self` is the resource (the server).
30- user = var. ssh_user
31- private_key = file (var. private_key )
32- # need to increase timeout to larger then 5m for metal instances
33- timeout = " 15m"
34- agent = " false"
35- }
36- }
25+ user_data = <<- EOF
26+ #!/bin/bash
27+ echo "Instance is ready" > /var/log/instance_ready.log
28+ EOF
3729
3830 # ###############################################################################
3931 # Deployment related
Original file line number Diff line number Diff line change @@ -36,18 +36,10 @@ resource "aws_spot_instance_request" "server" {
3636 # ###############################################################################
3737 # This will ensure we wait here until the instance is ready to receive the ssh connection
3838 # ###############################################################################
39- provisioner "remote-exec" {
40- script = " ./../scripts/wait_for_instance.sh"
41- connection {
42- host = self. public_ip # The `self` variable is like `this` in many programming languages
43- type = " ssh" # in this case, `self` is the resource (the server).
44- user = var. ssh_user
45- private_key = file (var. private_key )
46- # need to increase timeout to larger then 5m for metal instances
47- timeout = " 15m"
48- agent = " false"
49- }
50- }
39+ user_data = <<- EOF
40+ #!/bin/bash
41+ echo "Instance is ready" > /var/log/instance_ready.log
42+ EOF
5143
5244 # ###############################################################################
5345 # Deployment related
You can’t perform that action at this time.
0 commit comments