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'