Skip to content

opentofu: accept terraform_registry credentials for private registries#14865

Merged
robaiken merged 3 commits into
dependabot:mainfrom
diofeher:opentofu/accept-terraform-registry-credentials
May 12, 2026
Merged

opentofu: accept terraform_registry credentials for private registries#14865
robaiken merged 3 commits into
dependabot:mainfrom
diofeher:opentofu/accept-terraform-registry-credentials

Conversation

@diofeher
Copy link
Copy Markdown
Contributor

@diofeher diofeher commented Apr 29, 2026

Summary

  • The OpenTofu RegistryClient previously only honored credentials typed opentofu_registry. That type isn't exposed in the dependabot.yml schema, so users with terraform-registry entries were effectively anonymous when their ecosystem was opentofu, hitting private_source_authentication_failure against private registries (e.g. app.terraform.io).
  • Accept terraform_registry credentials too, so configs that work for the terraform ecosystem keep working when switched to opentofu. The registry HTTP API is the same between the two, so the bearer token is valid against either.

@diofeher diofeher requested a review from a team as a code owner April 29, 2026 17:34
@diofeher
Copy link
Copy Markdown
Contributor Author

diofeher commented May 6, 2026

@robaiken This should be good to go, but in the future we will need to support opentofu_registry dependabot/proxy#115

@diofeher diofeher force-pushed the opentofu/accept-terraform-registry-credentials branch from 0411fbb to bb54feb Compare May 6, 2026 20:19
robaiken
robaiken previously approved these changes May 11, 2026
@robaiken robaiken self-assigned this May 11, 2026
diofeher added 2 commits May 11, 2026 13:38
The OpenTofu registry client previously only honored credentials
typed `opentofu_registry`. The dependabot.yml config schema does
not expose that type yet, so users authenticating against private
Terraform/OpenTofu registries (e.g. app.terraform.io) had no way
to supply a token to the OpenTofu ecosystem and would fall through
to anonymous requests, hitting `private_source_authentication_failure`.

Accept `terraform_registry` credentials as well so existing configs
keep working when the ecosystem is switched from `terraform` to
`opentofu`. The registry HTTP API is identical between the two,
so the same bearer token is valid.
@diofeher diofeher force-pushed the opentofu/accept-terraform-registry-credentials branch from bb54feb to 41c72b9 Compare May 11, 2026 16:38
@robaiken robaiken merged commit adfbf0d into dependabot:main May 12, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants