Skip to content

[BUG]: cannot define multiple instance of the provider #3093

@fdebuire

Description

@fdebuire

Expected Behavior

Be able to define multiple instance of the Github provider using alias

provider "github" {
  owner = "my_org"
  app_auth {}
}

provider "github" {
  owner = "my_org"
  alias = "app"
}

Actual Behavior

❯ terraform plan
╷
│ Error: Conflicting configuration arguments
│
│   with provider["registry.terraform.io/integrations/github"],
│   on terraform.tf line 44, in provider "github":
│   44: provider "github" {
│
│ "app_auth": conflicts with token
╵
╷
│ Error: Conflicting configuration arguments
│
│   with provider["registry.terraform.io/integrations/github"],
│   on terraform.tf line 44, in provider "github":
│   44: provider "github" {
│
│ "token": conflicts with app_auth
╵

Terraform Version

Terraform v1.9.3
on darwin_arm64

  • provider registry.terraform.io/integrations/github v6.10.1

Affected Resource(s)

provider

Terraform Configuration Files

Steps to Reproduce

We were able to use multiple instances of the provider before upgrading to the version 6.10.1 of the provider.

The change has been introduced with those 2 commits:
1268edb

b48779a

It breaks the feature initially introduced here #1538.

How to reproduce:

  • Either set two providers, one using a token and the other one using a github app.
  • Or have the GITHUB_TOKEN env var defined + define the provider to use the github app (which before would by default use the defined provider and the github app, ignoring the env var).

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