diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index edaade8b..ff8b1602 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -2,6 +2,11 @@ name: Acceptance Testing description: "Acceptance Testing pipeline" inputs: + tf_debug: + description: "enable terraform debug logs" + default: 'false' + required: true + test_timeout_string: description: "string that determines the timeout (default: 45m)" default: '90m' @@ -198,6 +203,11 @@ runs: echo "::group::go test file" set -e set -o pipefail + + if [[ "${{ inputs.tf_debug }}" == "true" ]]; then + TF_LOG=INFO + export TF_LOG + fi echo "Running acceptance tests for the terraform provider" cd stackit || exit 1 @@ -247,6 +257,11 @@ runs: set -e set -o pipefail + if [[ "${{ inputs.tf_debug }}" == "true" ]]; then + TF_LOG=INFO + export TF_LOG + fi + echo "Running acceptance tests for the terraform provider" cd stackit || exit 1 TF_ACC=1 \ diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index 8356a14f..6cd91991 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -10,6 +10,11 @@ on: branches: - master workflow_dispatch: + inputs: + enable_debug: + description: "enable terraform debug logs" + default: 'false' + required: true jobs: acc_test: @@ -31,4 +36,5 @@ jobs: tf_acc_kek_key_ring_id: ${{ vars.TF_ACC_KEK_KEY_RING_ID }} tf_acc_kek_key_version: ${{ vars.TF_ACC_KEK_KEY_VERSION }} tf_acc_kek_service_account: ${{ vars.TF_ACC_KEK_SERVICE_ACCOUNT }} + tf_debug: ${{ inputs.enable_debug }} # service_account_json_file_path: "~/service_account.json"