Introduction

If tofu init or tofu plan fails with Client.Timeout exceeded while awaiting headers, OpenTofu could not fetch providers from registry.opentofu.org within the default HTTP timeout. Below are the root causes, the most effective fix, and additional ways to prevent the error.

Problem

The exact error message looks like this:

$ tofu init