Fix GHES v3 encrypted plan file upload path#519
Merged
rdhar merged 2 commits intoOP5dev:mainfrom Nov 22, 2025
Merged
Conversation
rdhar
approved these changes
Nov 22, 2025
Member
|
What a blatant oversight, thanks so much for spotting and fixing up GHE uploads for all users! |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a critical bug where encrypted Terraform plan files were not being properly uploaded in GitHub Enterprise Server (GHES) environments, causing plan file downloads to fail during the apply phase.
Problem
The GHES v3 upload step was missing the .encrypted suffix in the file path, creating a mismatch between what gets uploaded and what the download logic expects:
GitHub.com/GHE.com (v5): ✅ Correctly uploads tfplan.encrypted
GHES (v3): Only uploads tfplan (missing .encrypted suffix)
Download logic: Expects tfplan.encrypted when encryption is enabled
This caused the artifact lookup to fail with "Unable to locate plan file" errors in GHES environments when plan encryption was enabled.
✅ Solution
Updated the GHES v3 upload step to include the encrypted suffix using the same format string pattern as the v5 upload:
Before (GHES v3)
path: ${{ format('{0}{1}tfplan', ...) }}
After (GHES v3) - now matches v5 behavior
path: ${{ format('{0}{1}tfplan{2}', ..., inputs.plan-encrypt != '' && '.encrypted' || '') }}