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
The wait loop script passed into the local-exec provider uses some non-POSIX methods. The provider is ignoring the #!/bin/bash line in the command and is just falling back to the default shell in the environment, which for Debian/Ubuntu is dash, which doesn't support ((count++)) or [[.
This causes the loop to never timeout and finish if the curl command never succeeds.
You can do this using: count=$((count+1)) in line 181
and using a single bracket for the if statement: if [ $count -eq 60 ]; then in line 182
I'm working on a PR to fix this.
PS. I also wonder if you're aware that (at least in my testing) each attempt at the curl command takes 2 minutes before it times out. As such, each loop takes a total of 130 seconds to complete (120sec curl timeout + 10 second sleep). So that check for 60 loops means it won't timeout for over 2 hours. Is that intentional? You can reduce that by setting a shorter timeout for the curl command, or reducing the number of loops you wait before giving up.
The text was updated successfully, but these errors were encountered:
The wait loop script passed into the
local-exec
provider uses some non-POSIX methods. The provider is ignoring the#!/bin/bash
line in the command and is just falling back to the default shell in the environment, which for Debian/Ubuntu isdash
, which doesn't support((count++))
or[[
.This causes the loop to never timeout and finish if the curl command never succeeds.
See:
terraform-modules-copilot/copilot_build_aws/main.tf
Lines 175 to 187 in 223127e
The script should be POSIX compliant.
You can do this using:
count=$((count+1))
in line 181and using a single bracket for the if statement:
if [ $count -eq 60 ]; then
in line 182I'm working on a PR to fix this.
PS. I also wonder if you're aware that (at least in my testing) each attempt at the
curl
command takes 2 minutes before it times out. As such, each loop takes a total of 130 seconds to complete (120sec curl timeout + 10 second sleep). So that check for 60 loops means it won't timeout for over 2 hours. Is that intentional? You can reduce that by setting a shorter timeout for the curl command, or reducing the number of loops you wait before giving up.The text was updated successfully, but these errors were encountered: