How to Fix OpenTofu Registry Timeout Errors During Provider Initialization
OpenTofu users may encounter a 'Client.Timeout exceeded' error when running tofu init or tofu plan, caused by the tool failing to fetch providers from registry.opentofu.org within its default 60-second HTTP timeout. Common triggers include slow internet connections, firewall or proxy interference, DNS resolution delays, and occasional overload on the public registry. The most effective fix is setting the OPENTOFU_HTTP_TIMEOUT environment variable to a higher value, such as 120 or 300 seconds, a feature supported in OpenTofu v1.7.0 and later. Additional measures include enabling a shared plugin cache to avoid repeated downloads, verifying proxy settings, or switching to an alternative provider source if the registry is temporarily unavailable. For persistent issues in enterprise environments, configuring a local network mirror can eliminate dependency on the public registry entirely.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in