diff --git a/Dockerfile b/Dockerfile index b5fc6c0..20d3286 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,14 +13,14 @@ RUN set -eux \ && if [ "${TF_VERSION}" = "latest" ]; then \ VERSION="$( curl -sS https://releases.hashicorp.com/terraform/ \ | tac | tac \ - | grep -Eo '/[.0-9]+/' \ + | grep -Eo '/terraform/[.0-9]+\"' \ | grep -Eo '[.0-9]+' \ | sort -V \ | tail -1 )"; \ else \ VERSION="$( curl -sS https://releases.hashicorp.com/terraform/ \ | tac | tac \ - | grep -Eo "/${TF_VERSION}\.[.0-9]+/" \ + | grep -Eo "/terraform/${TF_VERSION}\.[.0-9]+\"" \ | grep -Eo '[.0-9]+' \ | sort -V \ | tail -1 )"; \ diff --git a/Makefile b/Makefile index 2c320f5..30c1fa3 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ _test-tf-version: LATEST="$$( \ curl -L -sS https://releases.hashicorp.com/terraform/ \ | tac | tac \ - | grep -Eo '/[.0-9]+/' \ + | grep -Eo '/terraform/[.0-9]+\"' \ | grep -Eo '[.0-9]+' \ | sort -u \ | sort -V \