russellcardullo / terraform-provider-pingdom

No longer maintained: Terraform provider to manage pingdom resources
MIT License
121 stars 108 forks source link

Apply Errors without running: netrpc: connect: no such file or directory #12

Closed bradenwright closed 7 years ago

bradenwright commented 7 years ago

I'm getting the following error:

Error asking for user input: 1 error(s) occurred:

* provider.pingdom: dial unix /var/folders/s_/8r27qhtn6b34y1ykmb3jz7r00000gq/T/plugin064193899|netrpc: connect: no such file or directory

I'm new to go so maybe missing something but I've tried installing a few different ways. README doesn't mention how to deal with need libraries from terraform.

I did find I was able to install terraform-provider-pingdom and its dependencies in 1 command via:

$ go get -v github.com/russellcardullo/terraform-provider-pingdom
github.com/russellcardullo/terraform-provider-pingdom (download)
github.com/hashicorp/terraform (download)
github.com/mitchellh/mapstructure (download)
github.com/russellcardullo/go-pingdom (download)
github.com/hashicorp/terraform/vendor/github.com/hashicorp/go-hclog
github.com/hashicorp/terraform/vendor/github.com/mitchellh/go-testing-interface
github.com/hashicorp/terraform/vendor/github.com/golang/protobuf/proto
github.com/hashicorp/terraform/vendor/golang.org/x/net/context
github.com/hashicorp/terraform/vendor/golang.org/x/net/http2/hpack
github.com/hashicorp/terraform/vendor/golang.org/x/net/idna
github.com/hashicorp/terraform/vendor/github.com/hashicorp/yamux
github.com/hashicorp/terraform/vendor/golang.org/x/net/internal/timeseries
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/codes
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/grpclog
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/credentials
github.com/hashicorp/terraform/vendor/golang.org/x/net/lex/httplex
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/internal
github.com/hashicorp/terraform/vendor/golang.org/x/net/trace
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/keepalive
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/metadata
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/stats
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/connectivity
github.com/hashicorp/terraform/vendor/golang.org/x/net/http2
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/naming
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/tap
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/peer
github.com/hashicorp/terraform/vendor/github.com/hashicorp/go-cleanhttp
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/awserr
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults
github.com/hashicorp/terraform/vendor/github.com/go-ini/ini
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/client/metadata
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/endpoints
github.com/hashicorp/terraform/vendor/github.com/jmespath/go-jmespath
github.com/hashicorp/terraform/vendor/github.com/bgentry/go-netrc/netrc
github.com/hashicorp/terraform/vendor/github.com/hashicorp/go-getter/helper/url
github.com/hashicorp/terraform/vendor/github.com/hashicorp/go-version
github.com/hashicorp/terraform/vendor/github.com/mitchellh/go-homedir
github.com/hashicorp/terraform/vendor/github.com/ulikunitz/xz/internal/xlog
github.com/hashicorp/terraform/vendor/github.com/ulikunitz/xz/internal/hash
github.com/hashicorp/terraform/vendor/github.com/hashicorp/errwrap
github.com/hashicorp/terraform/vendor/github.com/ulikunitz/xz/lzma
github.com/hashicorp/terraform/vendor/github.com/hashicorp/go-multierror
github.com/hashicorp/terraform/vendor/github.com/armon/go-radix
github.com/hashicorp/terraform/vendor/github.com/bgentry/speakeasy
github.com/hashicorp/terraform/vendor/github.com/mattn/go-isatty
github.com/hashicorp/terraform/vendor/github.com/posener/complete/cmd/install
github.com/hashicorp/terraform/vendor/github.com/posener/complete/match
github.com/hashicorp/terraform/vendor/golang.org/x/crypto/openpgp/errors
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/credentials
github.com/hashicorp/terraform/vendor/github.com/posener/complete/cmd
github.com/hashicorp/terraform/vendor/golang.org/x/crypto/openpgp/armor
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/awsutil
github.com/hashicorp/terraform/vendor/github.com/posener/complete
github.com/hashicorp/terraform/vendor/golang.org/x/crypto/cast5
github.com/hashicorp/terraform/vendor/golang.org/x/crypto/openpgp/elgamal
github.com/hashicorp/terraform/vendor/golang.org/x/crypto/openpgp/s2k
github.com/hashicorp/terraform/vendor/golang.org/x/net/html/atom
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl/hcl/strconv
github.com/hashicorp/terraform/vendor/github.com/mitchellh/cli
github.com/hashicorp/terraform/vendor/golang.org/x/net/html
github.com/hashicorp/terraform/vendor/golang.org/x/crypto/openpgp/packet
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl/hcl/token
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl/hcl/ast
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl/hcl/scanner
github.com/hashicorp/terraform/vendor/github.com/ulikunitz/xz
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl/hcl/parser
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl/json/token
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1
github.com/hashicorp/terraform/vendor/github.com/golang/protobuf/ptypes/any
github.com/hashicorp/terraform/vendor/github.com/golang/protobuf/ptypes/duration
github.com/hashicorp/terraform/vendor/github.com/golang/protobuf/ptypes/timestamp
github.com/hashicorp/terraform/vendor/google.golang.org/genproto/googleapis/rpc/status
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl/json/scanner
github.com/hashicorp/terraform/vendor/github.com/golang/protobuf/ptypes
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil/ast
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl/json/parser
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/status
github.com/hashicorp/terraform/vendor/github.com/mitchellh/mapstructure
github.com/hashicorp/terraform/vendor/github.com/mitchellh/reflectwalk
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil/scanner
github.com/hashicorp/terraform/vendor/github.com/apparentlymart/go-cidr/cidr
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil/parser
github.com/hashicorp/terraform/vendor/github.com/blang/semver
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws
github.com/hashicorp/terraform/vendor/github.com/hashicorp/go-uuid
github.com/hashicorp/terraform/vendor/github.com/mitchellh/copystructure
github.com/hashicorp/terraform/helper/hilmapstructure
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil
github.com/hashicorp/terraform/vendor/github.com/mitchellh/hashstructure
github.com/hashicorp/terraform/vendor/golang.org/x/crypto/blowfish
github.com/hashicorp/terraform/dag
github.com/hashicorp/terraform/vendor/github.com/satori/go.uuid
github.com/hashicorp/terraform/helper/hashcode
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/request
github.com/mitchellh/mapstructure
github.com/hashicorp/terraform/vendor/golang.org/x/crypto/bcrypt
github.com/russellcardullo/go-pingdom/pingdom
github.com/hashicorp/terraform/vendor/golang.org/x/crypto/openpgp
github.com/hashicorp/terraform/flatmap
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/transport
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/client
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/corehandlers
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/private/protocol/rest
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/private/protocol
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/signer/v4
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/private/protocol/query
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/defaults
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/service/sts
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/service/s3
github.com/hashicorp/terraform/vendor/google.golang.org/grpc
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/session
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/health/grpc_health_v1
github.com/hashicorp/terraform/vendor/google.golang.org/grpc/health
github.com/hashicorp/terraform/vendor/github.com/hashicorp/go-plugin
github.com/hashicorp/terraform/vendor/github.com/hashicorp/go-getter
github.com/hashicorp/terraform/plugin/discovery
github.com/hashicorp/terraform/config
github.com/hashicorp/terraform/moduledeps
github.com/hashicorp/terraform/config/module
github.com/hashicorp/terraform/terraform
github.com/hashicorp/terraform/helper/schema
github.com/hashicorp/terraform/plugin
github.com/russellcardullo/terraform-provider-pingdom/pingdom
github.com/russellcardullo/terraform-provider-pingdom

I've tried a few different versions of terraform 0.9.x, 0.10.x Currently:

$ tf -v
Terraform v0.9.8

$ go version
go version go1.9 darwin/amd64

Any advice would be great, I'm currently on a Mac

russellcardullo commented 7 years ago

I haven't seen that error before and am having trouble reproducing it. Does that happen when running terraform plan or terraform apply? Do you have a config that reproduces the issue?

I just tried on a fresh install using Mac OS 10.12.6:

$ go version
go version go1.9 darwin/amd64

$ terraform -v
Terraform v0.10.4

$ cat main.tf
provider "pingdom" {
    user = "REDACTED"
    password = "REDACTED"
    api_key = "REDACTED"
}

resource "pingdom_check" "example" {
    type = "http"
    name = "my http check"
    host = "example.com"
    resolution = 5
}

$ go get -v github.com/russellcardullo/terraform-provider-pingdom

$ terraform init

$ terraform plan

Have you tried something similar but with no success?

About the dependencies, one thing I can work on is vendoring them within this project to avoid issues when one of them has a breaking change. Not sure if that's the issue here but doing that would at least cut down on the surface area of things that could be going wrong.

bradenwright commented 7 years ago

@russellcardullo thanks for the reply. I was trying basically above. I had blown away all my dirs inside GOPATH, I was gonna go through steps again and respond, but this time its working?!?!

Alright so I had previously tried version 0.10.4 but must have had other issues at the time b/c it did not work then but now is working fine.

As of now if I use 0.10.4 it seems work, if I switch back to 0.9.8 it produces the error above. Could this be b/c go get is using terrform github master so if I wanted to use 0.9.8 I would have to compile against tag v0.9.8 is there an easy/preferred way to do this I'm new to go but tried a few things, none of which worked.

But essentially is there away to compile and get this working with previous versions, not sure we are ready to upgrade to 0.10.4

russellcardullo commented 7 years ago

I tried the following which works for me:

$ terraform -v
Terraform v0.9.8

$ cd $GOPATH/src/github.com/hashicorp/terraform

$ git co v0.9.8

$ go install github.com/russellcardullo/terraform-provider-pingdom

This is using the head of terraform-provider-pingdom and v0.9.8 of terraform.

Does that work in your environment? Hopefully this will be more straightforward once I vendor all the dependencies.

bradenwright commented 7 years ago

That was the first thing I tried (feel good I went down the right path), and I just tried again to be sure. I get the error I post when trying to plan or apply.

$ terraform plan
Error asking for user input: 1 error(s) occurred:

* provider.pingdom: dial unix /var/folders/s_/8r27qhtn6b34y1ykmb3jz7r00000gq/T/plugin094841271|netrpc: connect: no such file or directory

if I comment out the pingdom_check resource plan runs without errors, but obviously doesn't do anything

bradenwright commented 7 years ago
$ terraform -v
Terraform v0.9.8

Your version of Terraform is out of date! The latest version
is 0.10.4. You can update by downloading from www.terraform.io
$ cd $GOPATH/src/github.com/hashicorp/terraform
$ git checkout v0.9.8
HEAD is now at 8d560482c... v0.9.8
$ go install -v github.com/russellcardullo/terraform-provider-pingdom
github.com/hashicorp/terraform/vendor/github.com/hashicorp/go-plugin
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil/scanner
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/endpoints
github.com/hashicorp/terraform/vendor/github.com/apparentlymart/go-cidr/cidr
github.com/hashicorp/terraform/helper/shadow
github.com/hashicorp/terraform/dag
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil/parser
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil
github.com/hashicorp/terraform/config
github.com/hashicorp/terraform/flatmap
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/request
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/client
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/private/protocol/rest
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/corehandlers
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/private/protocol
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/signer/v4
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/private/protocol/query
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/defaults
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/service/sts
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/service/s3
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds
github.com/hashicorp/terraform/vendor/github.com/aws/aws-sdk-go/aws/session
github.com/hashicorp/terraform/vendor/github.com/hashicorp/go-getter
github.com/hashicorp/terraform/config/module
github.com/hashicorp/terraform/terraform
github.com/hashicorp/terraform/helper/schema
github.com/hashicorp/terraform/plugin
github.com/russellcardullo/terraform-provider-pingdom/pingdom
github.com/russellcardullo/terraform-provider-pingdom
russellcardullo commented 7 years ago

Maybe some dependency is still at a newer version? I pushed up a set of dependencies that works for me in the branch vendor-0.9.8. Would you mind trying that to see if it helps? Also you can try increasing the log level in Terraform in case that gives us any useful information:

$ git co vendor-0.9.8

$ go install -v github.com/russellcardullo/terraform-provider-pingdom

$ TF_LOG=DEBUG terraform plan
bradenwright commented 7 years ago

My apologies I thought I replied the other day. This branch worked great, so not sure where the dependency issue was but thank you kindly!

russellcardullo commented 7 years ago

Great glad to hear it worked! I'll get those dependencies pinned for the latest version as well and push those up so we don't run into issues again when everyone someone upgrades.