Skip to content

[BUG]: ghe url not validated the right way #2733

@php-denken

Description

@php-denken

Expected Behavior

We had our provider configured like
provider "github" { base_url = "https://customer.ghe.com/api/v3" owner = var.github_org token = var.github_token }

This base url worked with 6.5.0 but on 6.6.0 a validation was brought in that we should remove the /api/v3
v6.5.0...v6.6.0#diff-062b7a475c9ddd7765fd96c620a3f7854307a4b68c0ff57db24b9d912b5bcec9R88

But if i do so it stops working. For me it looks like its not reaching the api anymore.

I did not debug the code but if i read over it the ! in front of the regex seems wrong.

terraform debug Logoutput:

2025-08-15T14:59:56.138+0200 [ERROR] provider.terraform-provider-github_v6.6.0: Response contains error diagnostic: tf_provider_addr=provider @module=sdk.proto diagnostic_detail="" diagnostic_summary="this resource can only be used in the context of an organization, \"ORG_NAME\" is a user" tf_proto_version=5.6 tf_req_id=972af81f-996f-f7f4-3c43-89e27534e7e2 tf_resource_type=github_organization_custom_role tf_rpc=ReadResource @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/diag/diagnostics.go:58 diagnostic_severity=ERROR timestamp="2025-08-15T14:59:56.137+0200"

Actual Behavior

Terraform not working on ghe.com instance

Terraform Version

Terraform 1.12.1

Affected Resource(s)

github 6.6.0

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

    Status: TriageThis is being looked at and prioritizedType: BugSomething isn't working as documented

    Type

    No type

    Projects

    Status

    🆕 Triage

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions