https://pulumi.com logo
#general
Title
# general
w

wide-holiday-59376

08/30/2019, 3:00 AM
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

gentle-diamond-70147

08/30/2019, 3:25 PM
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

wide-holiday-59376

08/30/2019, 5:20 PM
Is there an output variable I can wait on that will only become available once the instance is fully ready?
g

gentle-diamond-70147

08/30/2019, 5:24 PM
No, I don't think so.
w

wide-holiday-59376

08/30/2019, 5:40 PM
Okay thanks