Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【terraform init error】provider binary not found #4

Open
moailaozi1 opened this issue May 11, 2024 · 2 comments
Open

【terraform init error】provider binary not found #4

moailaozi1 opened this issue May 11, 2024 · 2 comments

Comments

@moailaozi1
Copy link

Terraform Version

Terraform v1.8.3
on linux_amd64

Terraform Configuration Files

terraform {
  required_version = ">= 0.13"

  required_providers {
    huaweicloud = {
      source = "local-registry/huaweicloud/huaweicloud"
      version = ">= 2.3.4"
    }
  }
}

Debug Output

Crash Output

Expected Behavior

Initializing the backend...
Initializing provider plugins...
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Actual Behavior

Initializing the backend...

Initializing provider plugins...

  • Finding local-registry/huaweicloud/huaweicloud versions matching ">= 2.3.4"...
  • Installing local-registry/huaweicloud/huaweicloud v2.3.4...

    │ Error: Failed to install provider

    │ Error while installing local-registry/huaweicloud/huaweicloud v2.3.4: provider binary not found: could not find executable file starting with terraform-provider-huaweicloud

Steps to Reproduce

unzip -d ~/.terraform.d/plugins/local-registry/huaweicloud/huaweicloud/2.3.4/linux_amd64/ /root/terraform-provider-hcs_2.3.4_linux_amd64.zip
Archive: /root/terraform-provider-hcs_2.3.4_linux_amd64.zip
inflating: /root/.terraform.d/plugins/local-registry/huaweicloud/huaweicloud/2.3.4/linux_amd64/CHANGELOG.md
inflating: /root/.terraform.d/plugins/local-registry/huaweicloud/huaweicloud/2.3.4/linux_amd64/LICENSE
inflating: /root/.terraform.d/plugins/local-registry/huaweicloud/huaweicloud/2.3.4/linux_amd64/README.md
inflating: /root/.terraform.d/plugins/local-registry/huaweicloud/huaweicloud/2.3.4/linux_amd64/terraform-provider-hcs_v2.3.4

  1. terraform init

Additional Context

References

@moailaozi1
Copy link
Author

Add a comment

fix . Need terraform-provider-huaweicloud, but unzip is terraform-provider-hcs_v2.3.4

so i

cp terraform-provider-hcs_v2.3.4 terraform-provider-huaweicloud

and it works

@chengxiangdong
Copy link
Collaborator

terraform {
  required_version = ">= 0.13"

  required_providers {
    huaweicloud = {
      source = "local-registry/huaweicloud/huaweicloud"
      version = ">= 2.3.4"
    }
  }
}

local-registry/huaweicloud/huaweicloud is the provider of Huawei Cloud, not the Huawei Cloud Stack.
For Huawei Cloud Stack, the source should be local-registry/huaweicloud/hsc .

When src is prefixed with local-registry, you need to copy terraform-provider-huaweicloud to ~/.terraform.d/plugins/local-registry/huaweicloud/hsc/2.3.4/linux_amd64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants