Skip to content

[BUG]: Conflict between GITHUB_TOKEN and app_auth {} #3096

@thomvaill

Description

@thomvaill

Expected Behavior

When I have this config:

provider "github" {
  token = ""
  app_auth {}
}

... and these environment variables set: GITHUB_TOKEN, GITHUB_APP_*
The Github App auth should work.

We have this case because in our CI we need GITHUB_TOKEN to be set for another tool (in our case Terramate), but we want to use a Github App authentication for the Github provider.

Actual Behavior

  ╷
  │ Error: Conflicting configuration arguments
  │ 
  │   with provider["registry.opentofu.org/integrations/github"],
  │   on provider-github.tf line 2, in provider "github":
  │    2: provider "github" {
  │ 
  │ "app_auth": conflicts with token
  ╵
  ╷
  │ Error: Conflicting configuration arguments
  │ 
  │   with provider["registry.opentofu.org/integrations/github"],
  │   on provider-github.tf line 5, in provider "github":
  │    5:   token = ""
  │ 
  │ "token": conflicts with app_auth

It happens since v6.10.0, since #3071 was merged.

Terraform Version

OpenTofu v1.10.6

Affected Resource(s)

Authentication

Terraform Configuration Files

Steps to Reproduce

No response

Debug Output

Panic Output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as documented

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions