Skip to content

Need instructions for migrating from hashicorp/github to integrations/github #652

@docwhat

Description

@docwhat

Now that GitHub has taken over ownership of the github provider we need some instructions for upgrading.

I tried the obvious:

  1. update required_providers:
    1. change source attribute to integrations/github.
    2. change version to 4.2.0 (from 4.1.0 in my case)
  2. terraform state replace-provider registry.terraform.io/hashicorp/github registry.terraform.io/integrations/github
  3. terraform init
    • This shows it installing both hashicorp 4.1.0 and integrations 4.2.0
  4. terraform plan

Unfortunately, it then seems to hang forever.

TRACE shows that it is trying to access github.com (it should be using our enterprise server) without specifying the org using the hashicorp 4.1.0 provider:

[DEBUG] plugin.terraform-provider-github_v4.1.0_x4: GET /orgs//teams/sre-team HTTP/1.1
[DEBUG] plugin.terraform-provider-github_v4.1.0_x4: Host: api.github.com

There is exactly one GET using the 4.2 provider:

[DEBUG] plugin.terraform-provider-github_v4.2.0: GET /api/v3/orgs/the-org-on-our-ghe HTTP/1.1
[DEBUG] plugin.terraform-provider-github_v4.2.0: Host: github.example.com

No matter what I do, terraform insists on using the official hashicorp provider.

$ terraform -version
Terraform v0.14.4
+ provider registry.terraform.io/hashicorp/github v4.1.0
+ provider registry.terraform.io/integrations/github v4.2.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions