Hi guys. I created a dynamic resource that attempt...
# general
w
Hi guys. I created a dynamic resource that attempts to ssh into an ec2 instance. I depend on
Instance.publicIp
but I am getting a connection refused trying to ssh in. If I add a short delay I can connect just fine. My guess is that depending on
publicIp
is not enough. What should I be depending on to make sure that port 22 is open and sshd is listening?
g
I think you'll need to build retries into your dynamic resource. The provider (AWS or whomever) will assign the publicIp before the instance has actually completed startup, so just because the IP address is known, doesn't mean the instance is ready.
w
Is there an output variable I can wait on that will only become available once the instance is fully ready?
g
No, I don't think so.
w
Okay thanks