Skip to content

[BUG]: Empty or no provider information leads to error #2008

@schlichtanders

Description

@schlichtanders

Expected Behavior

the github integration should work anonymously without providing any provider information

Actual Behavior

with no provider "github" {} I get the following error on the most recent version

│ Error: Invalid provider configuration
│ 
│ Provider "registry.terraform.io/integrations/github" requires explicit configuration. Add a provider block to the root module and configure the provider's required
│ arguments as described in the provider documentation.
│ 
╵
╷
│ Error: GET https://api.github.com/user: 401 Requires authentication []
│ 
│   with provider["registry.terraform.io/integrations/github"],
│   on <empty> line 0:
│   (source code not available)
│ 

with setting the empty provider "github" {}, I still get

╷
│ Error: GET https://api.github.com/user: 401 Requires authentication []
│ 
│   with provider["registry.terraform.io/integrations/github"],
│   on kube.tf line 754, in provider "github":
│  754: provider "github" {}
│ 

Terraform Version

Terraform v1.5.3
on linux_amd64

Your version of Terraform is out of date! The latest version
is 1.6.3. You can update by downloading from https://www.terraform.io/downloads.html

Affected Resource(s)

Terraform Configuration Files

No response

Steps to Reproduce

you could create a kubernetes cluster using https://github.com/kube-hetzner/terraform-hcloud-kube-hetzner and see that it fails, but I guess that is not yet minimal enough.

Debug Output

No response

Panic Output

No response

Code of Conduct

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Up for grabsIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documented

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions