0.13 upgrade issues

So I’ve been working on upgrading from 0.11 to 0.13.3, I went to version 0.12.29 at first and that was successful. Now I’m having issues moving from 12 to 13.

we use this command to initialize the modules
terraform init -get-plugins=false $module_path 1>>$2/$3.log

but then I get errors like this

Info: Check inner_registry module

Error: Failed to query available provider packages

Could not retrieve the list of available versions for provider hashicorp/null:
could not connect to registry.terraform.io: Failed to request discovery
document: Get "https://registry.terraform.io/.well-known/terraform.json":
net/http: request canceled while waiting for connection (Client.Timeout
exceeded while awaiting headers)


Error: Failed to query available provider packages

Could not retrieve the list of available versions for provider
hashicorp/external: could not connect to registry.terraform.io: Failed to
request discovery document: Get
"https://registry.terraform.io/.well-known/terraform.json": net/http: request
canceled while waiting for connection (Client.Timeout exceeded while awaiting
headers)


Error: Could not load plugin


Plugin reinitialization required. Please run "terraform init".

Plugins are external binaries that Terraform uses to access and manipulate
resources. The configuration provided requires plugins which can't be located,
don't satisfy the version constraints, or are otherwise incompatible.

Terraform automatically discovers provider requirements from your
configuration, including providers used in child modules. To see the
requirements and constraints, run "terraform providers".

2 problems:

- Failed to instantiate provider "registry.terraform.io/hashicorp/external" to
obtain schema: unknown provider "registry.terraform.io/hashicorp/external"
- Failed to instantiate provider "registry.terraform.io/hashicorp/null" to
obtain schema: unknown provider "registry.terraform.io/hashicorp/null"



Warning: No outputs found

The state file either has no outputs defined, or all the defined outputs are
empty. Please define an output in your configuration with the `output` keyword
and run `terraform refresh` for it to become available. If you are using
interpolation, please verify the interpolated value is not empty. You can use
the `terraform console` command to assist.

this is the contents of the log

cat inner_registry.log
Initializing modules...

Initializing the backend...

Initializing provider plugins...
- Finding latest version of hashicorp/null...
- Finding latest version of hashicorp/external...

the plugins live in a central location at the base of the project directory here
.terraform/plugins/linux_amd64

Can terraform no longer read them from there for every module/submodule on 0.12.29 it seemed to work fine.

I tried also to use -plugin-dir=.terraform/plugins/linux_amd64 and that did not work it still tries to download them it seems. I don’t have access to the internet on the server

Quick followup, I ended up creating a .terraformrc file and doing some filesystem mirror stuff, this works but I had to change the directory structure to match this

.terraform.d/plugins/registry.terraform.io/hashicorp/null/2.1.2/linux_amd64

Is this the only way to do this? It did work after I did all that

Hi @nicks1993,

The new directory layout was the key requirement here. You shouldn’t need to explicitly write a filesystem_mirror CLI configuration if you put the files in one of the implied filesystem mirror directories. The explicit provider_installation configuration is for more complex requirements, such as retrieving only a subset of providers from a different source.