You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using this module with SSM gateway on a slow connection I had intermittent "Connection refused" errors, while sometimes it did work, when the speed of internet worsened it completely blocked my terraform applys.
While reading the inputs to the module, I saw tunnel_check_sleep, that could help in my situation, however when I set it to 5, then 10, then 30 seconds nothing changed in the terraform logs, no longer delay and I was getting same "Connection refused" errors.
The weird thing here was that it was still taking 3 seconds to "read" the data.external.ssh_tunnel resource.
After that, I tried setting parent_wait_sleep to a bigger value (10), and errors went away, and I also saw that now it took 10 seconds to retrieve data.external.ssh_tunnel.
When I went to the source code I saw the logic of parent/child tunnel initiation, and specifically that this is how actual tunnel is established:
which means that it's running in the background still, but also, terraform doesn't wait for childs to return control back to the other resources.
While writing this and looking at the code I just realized that the parent_wait_sleep should be > tunnel_check_sleep for the encoded logic to work.
From the documentation, however it reads that they're additive and not overlapping.
I'm not sure if this is something that you would consider as worth to fix, but I think it makes sense to document more the relation of these two variables.
The text was updated successfully, but these errors were encountered:
sashasimkin
changed the title
tunnel_check_sleep does nothingtunnel_check_sleep behavior is not straightforward
Sep 4, 2024
Hi!
While using this module with SSM gateway on a slow connection I had intermittent "Connection refused" errors, while sometimes it did work, when the speed of internet worsened it completely blocked my
terraform apply
s.While reading the inputs to the module, I saw
tunnel_check_sleep
, that could help in my situation, however when I set it to 5, then 10, then 30 seconds nothing changed in the terraform logs, no longer delay and I was getting same "Connection refused" errors.The weird thing here was that it was still taking 3 seconds to "read" the
data.external.ssh_tunnel
resource.After that, I tried setting
parent_wait_sleep
to a bigger value (10), and errors went away, and I also saw that now it took 10 seconds to retrievedata.external.ssh_tunnel
.When I went to the source code I saw the logic of parent/child tunnel initiation, and specifically that this is how actual tunnel is established:
which means that it's running in the background still, but also, terraform doesn't wait for childs to return control back to the other resources.
While writing this and looking at the code I just realized that the
parent_wait_sleep
should be >tunnel_check_sleep
for the encoded logic to work.From the documentation, however it reads that they're additive and not overlapping.
I'm not sure if this is something that you would consider as worth to fix, but I think it makes sense to document more the relation of these two variables.
The text was updated successfully, but these errors were encountered: