Coder Social home page Coder Social logo

Comments (15)

AlphaWong avatar AlphaWong commented on August 19, 2024 12

I find out the reason. The current document is outdated.

  1. rename it to terraform-provider-rke_v0.14.1
  2. put it to ~/.terraform.d/plugins
  3. remove the .terraform in ur project_directory
  4. run terraform init

from quickstart.

nikkelma avatar nikkelma commented on August 19, 2024 5

Hey all, this is a result of the RKE provider still being a community plugin and not able to be installed through terraform init. A requirement in the README gives a link to the installation process for the RKE provider. As soon as the RKE provider is an official plugin, the provider will be updated to allow terraform init to install all plugins.

from quickstart.

shpwrck avatar shpwrck commented on August 19, 2024 4

The rke provider is currently in the process of making it's way into https://www.terraform.io/docs/providers/, and will be maintained.

from quickstart.

srirajan avatar srirajan commented on August 19, 2024 3

Thanks for the response. Rancher2 is already included in the providers and I am using the example described here https://github.com/rancher/quickstart/blob/master/rancher-common/provider.tf

However, after experimenting a bit, if I remove the RKE provider in the above template, it works

from quickstart.

nikkelma avatar nikkelma commented on August 19, 2024 1

@sneakersgames I apologize for misunderstanding your original question - the issue according to your screenshot is that terraform expects platform-specific plugins to be installed under <OS>_<arch>. In the case of your screenshot, the expected folder name is darwin_amd64 but it appears your folder is named darwin-amd64 (notice the dash instead of an underscore).

from quickstart.

nikkelma avatar nikkelma commented on August 19, 2024 1

@haimari Yes, this issue was created when the required version of the RKE provider was 0.14.1 - my comment above you references a merged PR that added installation instructions for terraform-provder-rke in the README.

from quickstart.

matinats avatar matinats commented on August 19, 2024 1

I was able to solve that issue by manually downloading the rke v1.1.5 as defined here: https://github.com/rancher/terraform-provider-rke and then creating a directory path ~/.terraform.d/plugins/registry.terraform.io/hashicorp/rke/1.1.5/linux_amd64/ and copying the unzipped file here as terraform-provider-rke.

from quickstart.

srirajan avatar srirajan commented on August 19, 2024

Got a similar error.

$ terraform12 init
Initializing modules...

Initializing the backend...

Initializing provider plugins...

  • Checking for available provider plugins...

Provider "rke" not available for installation.

A provider named "rke" 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/darwin_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

$ ls ~/.terraform.d/plugins/
darwin_amd64 terraform-provider-rke

$ ls ~/.terraform.d/plugins/darwin_amd64/
terraform-provider-rke

[Edit]
Tried copying the plugin to the folder's .terraform directory, but still the same issue.

$ ls .terraform/plugins/darwin_amd64/
terraform-provider-aws_v2.53.0_x4 terraform-provider-kubernetes_v1.10.0_x4 terraform-provider-rancher2_v1.7.2_x4
terraform-provider-helm_v1.0.0_x4 terraform-provider-local_v1.4.0_x4 terraform-provider-rke

from quickstart.

 avatar commented on August 19, 2024

Provider "rke" not available for installation.

Please refer the terraform official documentation and try to use the "rancher2" as a provider
I wish that will resolve your issue.
https://www.terraform.io/docs/providers/rancher2/index.html

I have reviewed the terraform documentation link on the rke provider repository where the provider documentation link is broken, seems like reference is bit outdated.
https://github.com/rancher/terraform-provider-rke
https://www.terraform.io/docs/providers/rke/index.html

from quickstart.

ajithgudem avatar ajithgudem commented on August 19, 2024

Will the "Terraform Provider for RKE" actively maintained to be compatible with current and future rke releases. I ask because I did not see this listed as on the official list of terraform providers on https://www.terraform.io/docs/providers/ but found an obsolete link on https://github.com/rancher/terraform-provider-rke#using-the-provider pointing to https://www.terraform.io/docs/providers/rke/index.html

from quickstart.

AlphaWong avatar AlphaWong commented on August 19, 2024

same issue. After I copy it.

/Users/Alpha/.terraform.d/plugins/darwin_amd64
total 127072
-rwxr-xr-x@ 1 Alpha  staff    62M Apr  7 16:04 terraform-provider-rke

from quickstart.

srirajan avatar srirajan commented on August 19, 2024

For me, doing the following helped. In rancher-common/provider.tf, comment the rke provider

# RKE provider - community plugin as of 2020-02-02
#provider "rke" {
#  version = "0.14.1"
#}

from quickstart.

AlphaWong avatar AlphaWong commented on August 19, 2024

For me, doing the following helped. In rancher-common/provider.tf, comment the rke provider

# RKE provider - community plugin as of 2020-02-02
#provider "rke" {
#  version = "0.14.1"
#}

true. but I do not know it will break something or not.

from quickstart.

nikkelma avatar nikkelma commented on August 19, 2024

#89 has been merged, are these documentation changes enough to close this issue?

from quickstart.

haimari avatar haimari commented on August 19, 2024

I find out the reason. The current document is outdated.

  1. rename it to terraform-provider-rke_v0.14.1
  2. put it to ~/.terraform.d/plugins
  3. remove the .terraform in ur project_directory
  4. run terraform init

Getting this error:

[aws] terraform init                                                                                                                                                                                     master  ✗
Initializing modules...
- rancher_common in ../rancher-common

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "helm" (hashicorp/helm) 1.0.0...
- Downloading plugin for provider "rancher2" (terraform-providers/rancher2) 1.8.3...

Provider "rke" not available for installation.

A provider named "rke" 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/darwin_amd64

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

- Downloading plugin for provider "aws" (hashicorp/aws) 2.41.0...
- Downloading plugin for provider "tls" (hashicorp/tls) 2.1.1...
- Downloading plugin for provider "local" (hashicorp/local) 1.4.0...
- Downloading plugin for provider "kubernetes" (hashicorp/kubernetes) 1.10.0...

Error: no provider exists with the given name

This worked for me:

mv  ~/.terraform.d/plugins/darwin_amd64/terraform-provider-rke_v0.14.1 ~/.terraform.d/plugins/darwin_amd64/terraform-provider-rke_v1.0.0
[aws] terraform init                                                                                                                                                                                     master  ✗
Initializing modules...
- rancher_common in ../rancher-common

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "tls" (hashicorp/tls) 2.1.1...
- Downloading plugin for provider "local" (hashicorp/local) 1.4.0...
- Downloading plugin for provider "rancher2" (terraform-providers/rancher2) 1.8.3...
- Downloading plugin for provider "kubernetes" (hashicorp/kubernetes) 1.10.0...
- Downloading plugin for provider "helm" (hashicorp/helm) 1.0.0...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.41.0...

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.

from quickstart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.