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

Provider "mongodbatlas" not available for installation. #73

Open
abramovi opened this issue Mar 6, 2019 · 13 comments
Open

Provider "mongodbatlas" not available for installation. #73

abramovi opened this issue Mar 6, 2019 · 13 comments
Assignees
Labels
docs documentation good first issue Good for newcomers

Comments

@abramovi
Copy link

abramovi commented Mar 6, 2019

Hi ,

I am trying to use this provider following the example folder, but when I ran terraform init, i am getting - Provider "mongodbatlas" not available for installation.

Any idea ?

@Knappek
Copy link

Knappek commented Mar 6, 2019

@abramovi have you installed the provider? Check the Readme for installation guide, it's basically about downloading the binary from the release page and putting it into ~/.terraform.d/plugins

Sent with GitHawk

@gschaffer-cxn
Copy link

gschaffer-cxn commented Mar 7, 2019

We are experiencing the same issues. Downloaded the binary, put in into ~/.terraform.d/plugins and .../pluginslinux_amd64/ and get the same error. :(

The weird thing is that according to DEBUG log it appears to find the plugin, but still want to download it from releases.terraform.

-----------------------------------------------------
2019/03/07 10:44:54 [DEBUG] [aws-sdk-go] 
2019/03/07 10:44:54 [DEBUG] checking for provider in "."
2019/03/07 10:44:55 [DEBUG] checking for provider in "/usr/bin"
2019/03/07 10:44:55 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
2019/03/07 10:44:55 [DEBUG] found provider "terraform-provider-aws_v2.0.0_x4"
2019/03/07 10:44:55 [DEBUG] found provider "terraform-provider-template_v2.1.0_x4"
2019/03/07 10:44:55 [DEBUG] checking for provider in "/home/gschaffer/.terraform.d/plugins"
2019/03/07 10:44:55 [DEBUG] checking for provider in "/home/gschaffer/.terraform.d/plugins/linux_amd64"
2019/03/07 10:44:55 [DEBUG] found provider "terraform-provider-mongodbatlas_v0.8.1_linux_amd64"
2019/03/07 10:44:55 [DEBUG] found valid plugin: "template", "2.1.0", "/home/gschaffer/repos/cxn/terraform-infra/aws/cxn-prod-eu-west-1/prod-vpc01/services/license-server/.terraform/plugins/linux_amd64/terraform-provider-template_v2.1.0_x4"
2019/03/07 10:44:55 [DEBUG] found valid plugin: "aws", "2.0.0", "/home/gschaffer/repos/cxn/terraform-infra/aws/cxn-prod-eu-west-1/prod-vpc01/services/license-server/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.0.0_x4"
2019/03/07 10:44:55 [DEBUG] plugin requirements: "aws"=""
2019/03/07 10:44:55 [DEBUG] plugin requirements: "mongodbatlas"=""
2019/03/07 10:44:55 [DEBUG] plugin requirements: "template"=""

Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...
2019/03/07 10:44:55 [ERROR] failed to fetch plugin versions from https://releases.hashicorp.com/terraform-provider-mongodbatlas/
403 Forbidden
<html>
<head><title>403 Forbidden</title></head>
<body>
<h1>403 Forbidden</h1>
<ul>
<li>Code: AccessDenied</li>
<li>Message: Access Denied</li>
<li>RequestId: FCC9B7B4C1FE05E3</li>
<li>HostId: NNgLgnTDseSnIeVPfj3G0jq6lviMIsdDgtNSNBA7MZV+PvvtJYLOtr7s0TARItaoE3PlcytvN24=</li>
</ul>
<hr/>
</body>
</html>
2019/03/07 10:44:55 [ERROR] 1 error(s) occurred:

* no provider exists with the given name
2019/03/07 10:44:55 [DEBUG] plugin: waiting for all plugin processes to complete...

Provider "mongodbatlas" not available for installation.

A provider named "mongodbatlas" could not be found in the official repository.

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".

@Knappek
Copy link

Knappek commented Mar 7, 2019

I'm currently not on my computer so I can't reproduce it, but I guess the filename is not correct, you have to remove the "_linux_amd64" according to the naming scheme: https://www.terraform.io/docs/configuration/providers.html#third-party-plugins

Sent with GitHawk

@christianuhlcc
Copy link

Hi @Knappek we just experienced this issue and renaming (removing "_linux_amd64" ) helps, plugin is installed correctly

@gschaffer-cxn
Copy link

That fixed it for me aswell, thanks

@Knappek
Copy link

Knappek commented Mar 8, 2019

@akshaykarle you can close this issue.

Sent with GitHawk

@christianuhlcc
Copy link

@Knappek I would leave it open for a follow-up PR that fixes the actual issue - that the name of the compiled binary is not suitable for installation, otherwise every new user needs to find this closed issue to install it, right?

I can try to propose a PR, but I am horrible at go, so I for sure need some help.

@Knappek
Copy link

Knappek commented Mar 8, 2019

@christianuhlcc I don't think this is possible as you need to differentiate between the different operating systems...it's quite common that you need to rename binaries that you download from the web. What you can do though is enhancing the Readme maybe...

Sent with GitHawk

@gschaffer-cxn
Copy link

@Knappek the same issue exists within the zipped releases, we could at least fix those along with the README

@christianuhlcc
Copy link

I looked around how other community providers handle it, and everybody does it differently ...

Maybe only serving ZIP files with the target system in the name, and the containing file in the usable filename would be the way to go? That would make it obvious for downloaders and easy for installers to do the right thing.

@akshaykarle
Copy link
Owner

hey all, thanks for all the inputs. I will update the readme with instructions to rename the binaries to avoid confusion.

@akshaykarle akshaykarle self-assigned this Mar 25, 2019
@akshaykarle akshaykarle added good first issue Good for newcomers docs documentation labels Mar 25, 2019
@nitrag
Copy link

nitrag commented Jun 26, 2019

This was my first 3rd party plugin, phew complicated.

#for OSX
wget -O ~/.terraform.d/plugins/terraform-provider-mongodbatlas_v1.1.0 https://github.com/akshaykarle/terraform-provider-mongodbatlas/releases/download/v1.1.0/terraform-provider-mongodbatlas_v1.1.0_darwin_amd64

@petr-nazarov
Copy link

This worked for me, adding the following lines before using any resources:

terraform {
  required_providers {
    mongodbatlas = {
      source  = "mongodb/mongodbatlas"
      version = "0.9.1"
    }
  }
}

provider "mongodbatlas" {
  public_key  = var.mongodb_atlass_public_key
  private_key = var.mongodb_atlass_private_key
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

7 participants