From 9c696ce1f8fa41267df081b1c339548f6bc627cd Mon Sep 17 00:00:00 2001 From: Marco Sinhoreli Date: Thu, 11 Jun 2026 11:53:59 +0200 Subject: [PATCH] Fix OpenTofu acceptance jobs: use the installed tofu binary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The OpenTofu matrix jobs install tofu but the test framework (terraform-plugin-testing / hc-install) doesn't know about it, so it tries to download Terraform CLI — which currently fails with "openpgp: key expired" (stale HashiCorp release-signing key bundled in hc-install v0.6.3), breaking every PR. Point TF_ACC_TERRAFORM_PATH at the installed tofu binary (with the OpenTofu registry host) so the jobs actually exercise OpenTofu and never hit the broken download path. Also disable the tofu wrapper, which would otherwise shadow the real binary path. Co-Authored-By: Claude Opus 4.8 Signed-off-by: Marco Sinhoreli --- .github/workflows/acceptance.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml index 626fb5b8..ef5d2a94 100644 --- a/.github/workflows/acceptance.yml +++ b/.github/workflows/acceptance.yml @@ -101,11 +101,22 @@ jobs: - uses: opentofu/setup-opentofu@9d84900f3238fab8cd84ce47d658d25dd008be2f # v1.0.8 with: tofu_version: ${{ matrix.opentofu-version }} + tofu_wrapper: false + # Point the test framework at the tofu binary. Without this it tries to + # DOWNLOAD Terraform CLI, which currently fails in hc-install v0.6.3 + # ("openpgp: key expired" — stale HashiCorp release-signing key), and the + # job would not actually be testing OpenTofu anyway. + - name: Resolve OpenTofu binary path + id: tofu-path + run: echo "path=$(which tofu)" >> "$GITHUB_OUTPUT" - name: Run acceptance test env: CLOUDSTACK_USER_ID: ${{ steps.setup-cloudstack.outputs.CLOUDSTACK_USER_ID }} CLOUDSTACK_API_KEY: ${{ steps.setup-cloudstack.outputs.CLOUDSTACK_API_KEY }} CLOUDSTACK_SECRET_KEY: ${{ steps.setup-cloudstack.outputs.CLOUDSTACK_SECRET_KEY }} + TF_ACC_TERRAFORM_PATH: ${{ steps.tofu-path.outputs.path }} + TF_ACC_PROVIDER_NAMESPACE: hashicorp + TF_ACC_PROVIDER_HOST: registry.opentofu.org run: | make testacc services: