kyma-incubator/terraform-provider-kind

terraform init issue

Closed this issue · 4 comments

Hi

I want to know if there is a way to check the way that kind search for the plugin. After I try to run terraform init it fails.

Provider "kind" not available for installation.

A provider named "kind" could not be found in the Terraform Registry.

This may result from mistyping the provider name, or the given provider may
be a third-party provider that cannot be installed automatically.

In the latter case, the plugin must be installed manually by locating and
downloading a suitable distribution package and placing the plugin's executable
file in the following directory:
terraform.d/plugins/linux_amd64

Terraform detects necessary plugins by inspecting the configuration and state.
To view the provider versions requested by each module, run
"terraform providers".

Error: no provider exists with the given name
How can I resolve this issue?.

Hi @fedemontaldo87,

provider search is not provided by us, but rather implemented in terraform itself. This provider is currently not in the terraform registry, hence you're getting the error of it not being available. You can manually install it in the location specified in your message, by either downloading the binary from the release section or checking out the code and building it yourself.

We're working to get the provider into the terraform registry to make it easier for everyone to consume.

Edit: There's an issue created for this, which I will update accordingly with the path to availability in the registry: #23

Hi
thanks for your respond. I tried to downlowd the latest release and include it in the path with no success.

federicomontaldo@SVARLP2018453:~/Documents/terraform-provider-kind-0.0.4/example$ terraform init -upgrade
2020/09/16 19:49:41 [INFO] Terraform version: 0.12.24
2020/09/16 19:49:41 [INFO] Go runtime version: go1.12.13
2020/09/16 19:49:41 [INFO] CLI args: []string{"/usr/local/bin/terraform", "init", "-upgrade"}
2020/09/16 19:49:41 [DEBUG] Attempting to open CLI config file: /home/federicomontaldo/.terraformrc
2020/09/16 19:49:41 Loading CLI configuration from /home/federicomontaldo/.terraformrc
2020/09/16 19:49:41 [DEBUG] checking for credentials in "/home/federicomontaldo/.terraform.d/plugins"
2020/09/16 19:49:41 [DEBUG] checking for credentials in "/home/federicomontaldo/.terraform.d/plugins/linux_amd64"
2020/09/16 19:49:41 [INFO] CLI command args: []string{"init", "-upgrade"}

2020/09/16 19:49:41 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
Initializing the backend...
2020/09/16 19:49:41 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2020/09/16 19:49:41 [DEBUG] New state was assigned lineage "d39b2db4-756a-d95a-2b15-07432295024d"
2020/09/16 19:49:41 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2020/09/16 19:49:41 [TRACE] Meta.Backend: instantiated backend of type
2020/09/16 19:49:41 [DEBUG] checking for provider in "."
2020/09/16 19:49:41 [DEBUG] checking for provider in "/usr/local/bin"
2020/09/16 19:49:41 [DEBUG] checking for provider in "/home/federicomontaldo/.terraform.d/plugins"
2020/09/16 19:49:41 [DEBUG] checking for provider in "/home/federicomontaldo/.terraform.d/plugins/linux_amd64"
2020/09/16 19:49:41 [WARN] found legacy provider "terraform-provider-kind-linux-amd64"
2020/09/16 19:49:41 [DEBUG] found valid plugin: "kind-linux-amd64", "0.0.0", "/home/federicomontaldo/.terraform.d/plugins/linux_amd64/terraform-provider-kind-linux-amd64"
2020/09/16 19:49:41 [DEBUG] checking for provisioner in "."
2020/09/16 19:49:41 [DEBUG] checking for provisioner in "/usr/local/bin"
2020/09/16 19:49:41 [DEBUG] checking for provisioner in "/home/federicomontaldo/.terraform.d/plugins"
2020/09/16 19:49:41 [DEBUG] checking for provisioner in "/home/federicomontaldo/.terraform.d/plugins/linux_amd64"
2020/09/16 19:49:41 [INFO] Failed to read plugin lock file .terraform/plugins/linux_amd64/lock.json: open .terraform/plugins/linux_amd64/lock.json: no such file or directory
2020/09/16 19:49:41 [TRACE] Meta.Backend: backend does not support operations, so wrapping it in a local backend
2020/09/16 19:49:41 [TRACE] backend/local: state manager for workspace "default" will:

  • read initial snapshot from terraform.tfstate
  • write new snapshots to terraform.tfstate
  • create any backup at terraform.tfstate.backup
    2020/09/16 19:49:41 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate
    2020/09/16 19:49:41 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
    2020/09/16 19:49:41 [TRACE] statemgr.Filesystem: read nil snapshot
    2020/09/16 19:49:41 [DEBUG] checking for provider in "."
    2020/09/16 19:49:41 [DEBUG] checking for provider in "/usr/local/bin"
    2020/09/16 19:49:41 [DEBUG] checking for provider in "/home/federicomontaldo/.terraform.d/plugins"
    2020/09/16 19:49:41 [DEBUG] checking for provider in "/home/federicomontaldo/.terraform.d/plugins/linux_amd64"
    2020/09/16 19:49:41 [WARN] found legacy provider "terraform-provider-kind-linux-amd64"
    2020/09/16 19:49:41 [DEBUG] found valid plugin: "kind-linux-amd64", "0.0.0", "/home/federicomontaldo/.terraform.d/plugins/linux_amd64/terraform-provider-kind-linux-amd64"

2020/09/16 19:49:41 [DEBUG] plugin requirements: "kind"=""
2020/09/16 19:49:41 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
Initializing provider plugins...
2020/09/16 19:49:41 [TRACE] HTTP client GET request to https://registry.terraform.io/.well-known/terraform.json

Provider "kind" not available for installation.

A provider named "kind" could not be found in the Terraform Registry.

This may result from mistyping the provider name, or the given provider may
be a third-party provider that cannot be installed automatically.

In the latter case, the plugin must be installed manually by locating and
downloading a suitable distribution package and placing the plugin's executable
file in the following directory:
terraform.d/plugins/linux_amd64

Terraform detects necessary plugins by inspecting the configuration and state.
To view the provider versions requested by each module, run
"terraform providers".

Error: no provider exists with the given name

Hi

I just resolve the issue but I need to check the memory setting for docker. Thanks for your support.

Regards

For the memory settings you want to check out the kind documentation: https://kind.sigs.k8s.io/docs/user/quick-start/#settings-for-docker-desktop

I'll close this issue for now as you were able to resolve it.