From 02d78a8bd0992e6c8410952553470f442ed5539d Mon Sep 17 00:00:00 2001 From: Martin Buchleitner Date: Wed, 14 Aug 2024 09:18:20 +0200 Subject: [PATCH] fix: hcp auth Signed-off-by: Martin Buchleitner --- .github/workflows/terratest.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/terratest.yml b/.github/workflows/terratest.yml index 90be329..bc27bea 100644 --- a/.github/workflows/terratest.yml +++ b/.github/workflows/terratest.yml @@ -14,6 +14,11 @@ on: required: false default: '30m' type: string + terraform_version: + description: 'Terraform version' + required: false + default: '1.9.0' + type: string secrets: TFE_TOKEN: description: 'Terraform Cloud API Token' @@ -34,6 +39,12 @@ jobs: with: path: ${{ inputs.sourceDir }} + - name: Setup HCP Terraform authentication + if: steps.detect.outputs.all_changed_files != '' || github.event_name == 'workflow_dispatch' + uses: hashicorp/setup-terraform@v3 + with: + terraform_version: ${{ inputs.terraform_version }} + cli_config_credentials_token: ${{ secrets.TFE_TOKEN }} - uses: actions/setup-go@v5 if: steps.detect.outputs.all_changed_files != '' || github.event_name == 'workflow_dispatch'