Open pauldraper opened 5 years ago
I was able to migrate the code, but it doesn't seem to work as expected:
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/terraform@v0.12.20
go get github.com/hashicorp/terraform-plugin-sdk@v1.6.0
tf-sdk-migrator check
tf-sdk-migrator migrate
make build
@h0x91b-wix's fork seems to work with Terraform 0.12. FWIW I've added their fork to my infrastructure in this commit.
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...
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.
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.
Thanks a lot @birchb1024 This is great.
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.
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.
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 ?