Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the registry runnable locally in case of an emergency #1518

Open
abstractionfactory opened this issue Feb 6, 2025 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@abstractionfactory
Copy link
Contributor

abstractionfactory commented Feb 6, 2025

Currently, the OpenTofu Registry is at least partially unavailable due to an R2 outage on Cloudflare. While this is a rare event, we should make it easy to run the registry locally at least in a read-only fashion so people can reroute to it when the main OpenTofu Registry is unavailable.

@apparentlymart
Copy link

This seems like it overlaps with opentofu/opentofu#618, since running a local copy of the registry would only be useful if it were possible to convince OpenTofu to use that local copy as a substitute for registry.opentofu.org.

The possible design I described in opentofu/opentofu#618 (comment) could potentially accommodate this by allowing operators to configure OpenTofu with an overridden service discovery URL for registry.opentofu.org:

host "registry.opentofu.org" {
  service_discovery_url = "http://127.0.0.1:5000/local-services.json"
}

As long as the local copy of the registry can serve something like this /local-services.json discovery document announcing the same modules.v1 and providers.v1 services that the real registry provides, OpenTofu would then treat those local services as if they were the remote registry.

Since we use an upstream library for the service discovery system, I've opened hashicorp/terraform-svchost#85 to see if the maintainers would be willing to support this "service discovery URL override" mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants