terraform plan should work in a GitHub Actions workflow with authentication based on GitHub App (using PEM file as the private key).
Actual Behavior
When I try to run terraform plan -out=plan in a GitHub Action, and I set the envs to provide the GitHub App configuration (all three envs set correctly: GITHUB_APP_ID, GITHUB_APP_INSTALLATION_ID, GITHUB_APP_PEM_FILE), the GitHub Actions job freezes/hangs after doing few Refreshing state... operations.
When executed from a local machine, outside the GitHub Actions context, with the same terraform file, with the same envs, and the same terraform version, the terraform plan operation works as expected. It seems to me that the problem only exists when the terraform command is executed on the GitHub Actions runner. Tested on two runners: ubuntu-latest and arc-runner-set (k8s).
When using PAT generated from the GitHub App, the behavior is correct - the terraform plan command works as expected both locally and on the GitHub Actions runner.
Terraform Version
Terraform v1.7.1
GitHub Provider v6.2.1 (tested also with v6.0.1, same behavior)
Affected Resource(s)
Affects basic terraform plan command (at least) when executed in a GitHub Actions job context AND the auth is based on GitHub App.
Expected Behavior
terraform plan
should work in a GitHub Actions workflow with authentication based on GitHub App (using PEM file as the private key).Actual Behavior
When I try to run
terraform plan -out=plan
in a GitHub Action, and I set the envs to provide the GitHub App configuration (all three envs set correctly:GITHUB_APP_ID
,GITHUB_APP_INSTALLATION_ID
,GITHUB_APP_PEM_FILE
), the GitHub Actions job freezes/hangs after doing fewRefreshing state...
operations.When executed from a local machine, outside the GitHub Actions context, with the same terraform file, with the same envs, and the same terraform version, the
terraform plan
operation works as expected. It seems to me that the problem only exists when the terraform command is executed on the GitHub Actions runner. Tested on two runners:ubuntu-latest
andarc-runner-set
(k8s).When using PAT generated from the GitHub App, the behavior is correct - the
terraform plan
command works as expected both locally and on the GitHub Actions runner.Terraform Version
Terraform v1.7.1
GitHub Provider v6.2.1 (tested also with v6.0.1, same behavior)
Affected Resource(s)
Affects basic terraform
plan
command (at least) when executed in a GitHub Actions job context AND the auth is based on GitHub App.Terraform Configuration Files
No response
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Code of Conduct