Terraform resources can be structured into modules and within Terraform Enterprise, these modules may be located in the Private Module Registry. During
terraform init, module blocks are identified within the configuration and the source code for referenced modules is retrieved from the locations given in their source arguments.
This article outlines a possible cause of a
403 Forbidden error when attempting to download modules.
terraform init operation fails with the error
error looking up module versions: 403 Forbidden when Terraform attempts to look up module versions.
- A proxy environment variable such as
NO_PROXYmay be configured on the Terraform Enterprise workspace.
- Locate the workspace in Terraform Enterprise, check the variables tab, and remove any proxy environment variable.