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

Not compatible with Terraform 0.12 #1

Open
pauldraper opened this issue Oct 2, 2019 · 8 comments
Open

Not compatible with Terraform 0.12 #1

pauldraper opened this issue Oct 2, 2019 · 8 comments

Comments

@pauldraper
Copy link

pauldraper commented Oct 2, 2019

Error: Failed to instantiate provider "multiverse" to obtain schema: Incompatible API version with plugin. Plugin version: 4, Client versions: [5]

@jimmy-scott
Copy link

I was able to migrate the code, but it doesn't seem to work as expected:

  • The plugin seems to pass a string to 'delete' instead of json.
  • No messages from stderr are passed terraform.
  • Crashes when 'read' returns a non-json value.

Anyway, whoever feels working on it:

   export GOPATH=$(pwd)
   export PATH="${PATH}:${GOPATH}/bin"
   cd src/github.com/mobfox/terraform-provider-multiverse
   go get github.com/hashicorp/tf-sdk-migrator
   go install github.com/hashicorp/tf-sdk-migrator
   rm -rf vendor
   go mod init
   go get github.com/hashicorp/[email protected]
   go get github.com/hashicorp/[email protected]
   tf-sdk-migrator check
   tf-sdk-migrator migrate
   make build

@jacquev6
Copy link

@h0x91b-wix's fork seems to work with Terraform 0.12. FWIW I've added their fork to my infrastructure in this commit.

@h0x91b
Copy link

h0x91b commented Feb 18, 2020

Yes, it's working, we are using it already here in wix, but I did some changes to API, please wait while I finish to document it and rewrite python example...

@birchb1024
Copy link

birchb1024 commented Oct 17, 2020

I have a fork which now works with Terraform 0.13 and the plugin SDK 5.
Added make install for the new local plugins layout.

my fork here

Also tweaked it so that the resource name can be anything you like, since the Provider gets it's binding from the binary name. example, here there are two copies of the binary,

/home/me/.terraform.d/
├── checkpoint_cache
├── checkpoint_signature
└── plugins
    ├── github.com
    │   └── mobfox
    │       ├── alpha
    │       │   └── 0.0.1
    │       │       └── linux_amd64
    │       │           └── terraform-provider-alpha
    │       └── multiverse
    │           └── 0.0.1
    │               └── linux_amd64
    │                   └── terraform-provider-multiverse
    ├── terraform-provider-alpha
    └── terraform-provider-multiverse

resource "multiverse" "h" {
  executor = "python3"
  script = "hello_world.py"
  id_key = "id"
  data = <<JSON
{
  "name": "test-terraform-test",
  "url" : "https://foo.bar.quux/",
  "created-by" : "Elvis Presley"
}
JSON
}

resource "alpha" "h" {
  executor = "python3"
  script = "hello_world.py"
  id_key = "id"
  data = <<JSON
{
  "name": "A strange alpha resource",
  "url" : "https://alpha.com/",
  "created-by" : "Winston Churchill",
  "subject" : "Painting

I'm still working on this fork, there's documents to update and more examples to add.

@benishak
Copy link
Contributor

Thanks a lot @birchb1024
This is great.

@birchb1024
Copy link

My fork is mostly ready to use. I've added a proper round trip in and out of TF for the data with many validations added.
Unit/acceptance testing is a problem. The usual provider testing framework is so complicated :-(
Anyhow I'll start to use my fork.

@benishak
Copy link
Contributor

it's a pity, this git repo is no longer maintained, I was the creator and maintainer of this project but I left the company long time ago.

@birchb1024
Copy link

birchb1024 commented Oct 23, 2020

I would like to rename my fork to 'universe', assuming the name is not already taken. Not least because GitHub forks cannot have their own issues. Mainly though because my fork is no longer compatible with multiverse. Is that OK? Does anyone object?

Especially want to hear from @benishak ?

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

6 participants