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" {
4646 # ###############################################################################
4747 # This will ensure we wait here until the instance is ready to receive the ssh connection
4848 # ###############################################################################
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+ }
5361
5462 # ###############################################################################
5563 # Deployment related
Original file line number Diff line number Diff line change @@ -51,10 +51,18 @@ resource "aws_instance" "server" {
5151 # ###############################################################################
5252 # This will ensure we wait here until the instance is ready to receive the ssh connection
5353 # ###############################################################################
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+ }
5866
5967 # ###############################################################################
6068 # Deployment related
You can’t perform that action at this time.
0 commit comments