diff --git a/.github/workflows/aws-template-terraform.yml b/.github/workflows/aws-template-terraform.yml index 8f8a2826..006463dd 100644 --- a/.github/workflows/aws-template-terraform.yml +++ b/.github/workflows/aws-template-terraform.yml @@ -71,7 +71,7 @@ jobs: with: sarif_file: tfsec.sarif working_directory: ${{ inputs.CONTEXT_FOLDER }} - tfsec_args: "--tfvars-file=${{ inputs.CONTEXT_FOLDER }}/${{ inputs.ENVIRONMENT_NAME }}.tfvars" + tfsec_args: "--tfvars-file=${{ inputs.CONTEXT_FOLDER }}/${{ inputs.CONFIG_FOLDER }}/${{ inputs.ENVIRONMENT_NAME }}.tfvars" - name: Upload SARIF file uses: github/codeql-action/upload-sarif@v3 with: diff --git a/.github/workflows/build-infra.yml b/.github/workflows/build-infra.yml index 01f208e6..5b16dff5 100644 --- a/.github/workflows/build-infra.yml +++ b/.github/workflows/build-infra.yml @@ -26,7 +26,7 @@ jobs: uses: ./.github/workflows/aws-template-terraform.yml with: CONTEXT_FOLDER: "./infrastructure/cloud/environments/initial" - CONFIG_FOLDER: ".." + CONFIG_FOLDER: "../${{ inputs.environment || 'dev' }}" CHANGE_FOLDER_NAME: environments/${{ inputs.environment || 'dev' }} ENVIRONMENT_NAME: ${{ inputs.environment || 'dev' }} APPLY_TF_CODE: false @@ -37,7 +37,7 @@ jobs: uses: ./.github/workflows/aws-template-terraform.yml with: CONTEXT_FOLDER: "./infrastructure/cloud/environments/${{ inputs.environment || 'dev' }}" - CONFIG_FOLDER: "." + CONFIG_FOLDER: "./${{ inputs.environment || 'dev' }}" CHANGE_FOLDER_NAME: environments/${{ inputs.environment || 'dev' }} ENVIRONMENT_NAME: ${{ inputs.environment || 'dev' }} APPLY_TF_CODE: false