Skip to content

Commit

Permalink
Choose Terraform version based requirements of test, not of module (#132
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Nuru authored Jun 4, 2022
1 parent af2976a commit 2e7ecd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ jobs:
TF015=$(terraform-0.15 version --json | jq -r .terraform_version)
TF1=$(terraform-1 version --json | jq -r .terraform_version)
# vert exits non-zero if any of the versions are not acceptable, so `|| [[ -n "$VERSION" ]]` for a real error check
FULL_VERSION=$(vert -s "$(terraform-config-inspect --json . | jq -r '.required_core[]')" "$TF012" "$TF013" "$TF014" "$TF015" "$TF1" | head -1) || [[ -n "$VERSION" ]]
FULL_VERSION=$(vert -s "$(terraform-config-inspect --json examples/complete | jq -r '.required_core[]')" "$TF012" "$TF013" "$TF014" "$TF015" "$TF1" | head -1) || [[ -n "$VERSION" ]]
VERSION=${FULL_VERSION:0:4}
echo Full version to use is ${FULL_VERSION}, setting VERSION to ${VERSION}
fi
Expand Down Expand Up @@ -347,7 +347,7 @@ jobs:
TF015=$(terraform-0.15 version --json | jq -r .terraform_version)
TF1=$(terraform-1 version --json | jq -r .terraform_version)
# vert exits non-zero if any of the versions are not acceptable, so `|| [[ -n "$VERSION" ]]` for a real error check
FULL_VERSION=$(vert -s "$(terraform-config-inspect --json . | jq -r '.required_core[]')" "$TF012" "$TF013" "$TF014" "$TF015" "$TF1" | head -1) || [[ -n "$VERSION" ]]
FULL_VERSION=$(vert -s "$(terraform-config-inspect --json examples/complete | jq -r '.required_core[]')" "$TF012" "$TF013" "$TF014" "$TF015" "$TF1" | head -1) || [[ -n "$VERSION" ]]
VERSION=${FULL_VERSION:0:4}
echo Full version to use is ${FULL_VERSION}, setting VERSION to ${VERSION}
fi
Expand Down

0 comments on commit 2e7ecd2

Please sign in to comment.