File tree Expand file tree Collapse file tree 2 files changed +24
-8
lines changed
terraform/oss-standalone-redisearch-m5-aarch64 Expand file tree Collapse file tree 2 files changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,18 @@ resource "aws_instance" "client" {
46
46
# ###############################################################################
47
47
# This will ensure we wait here until the instance is ready to receive the ssh connection
48
48
# ###############################################################################
49
- user_data = <<- EOF
50
- #!/bin/bash
51
- echo "Instance is ready" > /var/log/instance_ready.log
52
- EOF
49
+ provisioner "remote-exec" {
50
+ script = " ./../../scripts/wait_for_instance.sh"
51
+ connection {
52
+ host = self. public_ip # The `self` variable is like `this` in many programming languages
53
+ type = " ssh" # in this case, `self` is the resource (the server).
54
+ user = var. ssh_user
55
+ private_key = file (var. private_key )
56
+ # need to increase timeout to larger then 5m for metal instances
57
+ timeout = " 5m"
58
+ agent = " false"
59
+ }
60
+ }
53
61
54
62
# ###############################################################################
55
63
# Deployment related
Original file line number Diff line number Diff line change @@ -51,10 +51,18 @@ resource "aws_instance" "server" {
51
51
# ###############################################################################
52
52
# This will ensure we wait here until the instance is ready to receive the ssh connection
53
53
# ###############################################################################
54
- user_data = <<- EOF
55
- #!/bin/bash
56
- echo "Instance is ready" > /var/log/instance_ready.log
57
- EOF
54
+ provisioner "remote-exec" {
55
+ script = " ./../../scripts/wait_for_instance.sh"
56
+ connection {
57
+ host = self. public_ip # The `self` variable is like `this` in many programming languages
58
+ type = " ssh" # in this case, `self` is the resource (the server).
59
+ user = var. ssh_user
60
+ private_key = file (var. private_key )
61
+ # need to increase timeout to larger then 5m for metal instances
62
+ timeout = " 5m"
63
+ agent = " false"
64
+ }
65
+ }
58
66
59
67
# ###############################################################################
60
68
# Deployment related
You can’t perform that action at this time.
0 commit comments