integrations / terraform-provider-github

Terraform GitHub provider
https://www.terraform.io/docs/providers/github/
MIT License
891 stars 736 forks source link

[BUG]: Github App env vars ignored #2223

Open fandujar opened 5 months ago

fandujar commented 5 months ago

Expected Behavior

I expected that github app env vars and app auth inside provider config would work the same.

Actual Behavior

I'm using Github provider 6.2.1 and every data resource(pointing to private resources) failed when I used Github App env vars below. It would only work after I set app_auth inside github provider terraform config.

GITHUB_APP_ID GITHUB_APP_INSTALLATION_ID GITHUB_APP_PEM_FILE

Terraform Version

Terraform v1.6.6 on darwin_amd64 and / or Terraform v1.6.3 on linux_amd64

Affected Resource(s)

Terraform Configuration Files

No response

Steps to Reproduce

  1. generate a code with data.github_repository for a private repository
  2. export Github env vars
  3. run terraform init and plan

data.github_repository will return 404

  1. use the same code
  2. config app_auth
  3. run terraform init and plan

data.github_repository will return the actual object

Debug Output

No response

Panic Output

No response

Code of Conduct