diff --git a/modules/runners/templates/install-config-runner.sh b/modules/runners/templates/install-config-runner.sh index d6d715e325..4bc42d2d72 100644 --- a/modules/runners/templates/install-config-runner.sh +++ b/modules/runners/templates/install-config-runner.sh @@ -1,14 +1,16 @@ cd /home/$USER_NAME mkdir actions-runner && cd actions-runner -aws s3 cp ${s3_location_runner_distribution} actions-runner.tar.gz +REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region) + +aws s3 cp ${s3_location_runner_distribution} actions-runner.tar.gz --region $REGION tar xzf ./actions-runner.tar.gz rm -rf actions-runner.tar.gz ${arm_patch} INSTANCE_ID=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id) -REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region) + echo wait for configuration while [[ $(aws ssm get-parameters --names ${environment}-$INSTANCE_ID --with-decryption --region $REGION | jq -r ".Parameters | .[0] | .Value") == null ]]; do