Skip to content
This repository has been archived by the owner on Jan 11, 2018. It is now read-only.

Package no longer compatible with the current API provided by terraform #1

Open
voith opened this issue May 24, 2016 · 7 comments
Open

Comments

@voith
Copy link

voith commented May 24, 2016

Hi,

I've been using this package for a while now. Since this package doesn't have any releases I build it every time from source. Today I got the following error in my Continuous Integration builds while testing the terraform plan.

Error configuring: 1 error(s) occurred:

* Incompatible API version with plugin. Plugin version: 1, Ours: 2

After struggling for a while, trying to find the bug, I found this.

Terraform has updated its plugin protocol and since this package imports terraform packages directly from source, it's barfing at the moment.

@bitglue
Copy link
Contributor

bitglue commented Jun 1, 2016

Could this also be addressed by adjusting the terraform in your $GOPATH to match the version of Terraform that you have installed? That is, either check out an older Terraform, or build and install the Terraform you have checked out.

This plugin needs just a small subset of the Terraform source: just the plugin protocol bits. I'm not too keen on vendoring 5000 files to get just that little bit.

@voith
Copy link
Author

voith commented Jun 1, 2016

@bitglue Thanks for your input. I am not a go developer. I have been using this library for a while and was looking for an easy fix. I'll test it by changing the $GOPATH.

@bitglue
Copy link
Contributor

bitglue commented Jun 1, 2016

I'm not really a go developer either :)

Let me know if it works. If not, we can explore some other options.

@elg0nz
Copy link

elg0nz commented Jul 1, 2016

Just ran into this, the issue per this conversation on the terraform mailing list is that the plugin api that is on the terraform head (0.7) is incompatible with the 0.6 API this library expects.

To fix this you will need to either go install an old 0.6 version, or change this project to use a vendored 0.6 terraform package.

@bitglue
Copy link
Contributor

bitglue commented Jul 2, 2016

Can you please share the output of these two commands?

git -C "$GOPATH/src/github.com/hashicorp/terraform/" describe
terraform version

@voith
Copy link
Author

voith commented Jul 6, 2016

@bitglue extremely sorry for my delayed response. I was a bit caught up with some other work. Here's what fixed for me.

git clone https://github.com/hashicorp/terraform.git
mkdir -p $(echo $GOPATH | cut -d':' -f1)/src/github.com/hashicorp
mv -n terraform $(echo $GOPATH | cut -d':' -f1)/src/github.com/hashicorp/
git -C "$(echo $GOPATH | cut -d':' -f1)/src/github.com/hashicorp/terraform/" checkout tags/v0.6.16

Had to take such complicated way of getting terraform source because go get github.com/hashicorp/terraform gives the following error:

package github.com/masterzen/winrm/winrm: cannot find package "github.com/masterzen/winrm/winrm" in any of:
    /usr/local/go/src/github.com/masterzen/winrm/winrm (from $GOROOT)
    /home/ubuntu/.go_workspace/src/github.com/masterzen/winrm/winrm (from $GOPATH)
    /usr/local/go_workspace/src/github.com/masterzen/winrm/winrm

I did not bother resolving this issue and took the sophisticated path.
Here's the output of the commands that you mentioned:
git -C "$(echo $GOPATH | cut -d':' -f1)/src/github.com/hashicorp/terraform/" describe:
v0.6.16

terraform version:
Terraform v0.6.16

@voith
Copy link
Author

voith commented Jul 6, 2016

resolved the go get github.com/hashicorp/terraform error. The only two commands needed to resolve this issue are

go get github.com/hashicorp/terraform
git -C "$(echo $GOPATH | cut -d':' -f1)/src/github.com/hashicorp/terraform/" checkout tags/v0.6.16

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

Successfully merging a pull request may close this issue.

3 participants