Failed to install provider kreuzwerker/docker automatically

Upon executing terraform init I face issue with downloading only docker resource:

Initializing the backend...

Initializing provider plugins...
- Finding latest version of hashicorp/google...
- Finding latest version of hashicorp/random...
- Finding latest version of kreuzwerker/docker...
- Installing hashicorp/google v4.11.0...
- Installed hashicorp/google v4.11.0 (signed by HashiCorp)
- Installing hashicorp/random v3.1.0...
- Installed hashicorp/random v3.1.0 (signed by HashiCorp)
╷
│ Error: Failed to install provider
│ 
│ Error while installing kreuzwerker/docker v2.16.0: could not query provider registry for registry.terraform.io/kreuzwerker/docker: failed to retrieve authentication checksums for
│ provider: the request failed after 2 attempts, please try again later: Get
│ "https://github.com/kreuzwerker/terraform-provider-docker/releases/download/v2.16.0/terraform-provider-docker_2.16.0_SHA256SUMS": context deadline exceeded

After following this post I downloaded the file in local and I get to perform terraform init successfully but failed to run terraform apply with below error:

│ 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".
│ 
│ failed to instantiate provider "registry.terraform.io/kreuzwerker/docker" to obtain schema: fork/exec
│ .terraform/providers/registry.terraform.io/kreuzwerker/docker/2.16.0/linux_amd64/terraform-provider-docker_2.16.0_linux_amd64.zip: permission denied

System Details:

OS: Ubuntu 21.10
Terraform versions tried:

I have also launched another docker container and reproduce the issue and I was able to reproduce the same issue with terraform init

1 Like

Hey Gahan,

Have you found a solution to this issue. I’m experiencing same challenge following the tutorial here

1 Like

Has this been fixed yet? Is there a solution?
I’m just at the training side, so not sure what it’s doing. But I assume kreuzwerker/docker is the source of docker it assumed is installed. But I installed it from my companied repo, and not “kreuzwerker”.
Am I on the right track? Can I just replace kreuzwerker with something from “apt show docker”?

I solved for my setup.

Debian on WSL inside comapny VPN.

I needed to configure the proxy. adjust for your proxy: i.e.:

export http_proxy="http://user:password@proxy.example.com:8080"
export https_proxy="http://user:password@proxy.example.com:8080"

You might also need to setup “/etc/resolve” with your DNS IP addresses, if you’ve not done already.