Closed nemetht closed 4 years ago
Hi,
Thanks for reporting this.
The error is due to poor error handling in our terraform provider and we will look into this.
The error occurs because of wrong region name, you should be using azure-arm::eastus
and not azure::eastus
The provider should handle these cases and not crash, but try with the other region name and you should get your instance up and running.
Using azure-arm::eastus
or azure-arm::westeurope
brings a similar error...
It seems that this unexpected EOF
is just always printed, if there are any kinds of problems during the creation, just like missing baseurl
from the cloudamqp provider configuration or even using the wrong region, where no clusters are available.
Trying to create instances via curl
shows the error messages I had along the way:
{"error":"No cluster available in azure::west-europe yet"}
or
{"error":"Invalid region name"}
So the request here is more to have a better logging of error messages.
Closing this issue. Due to much older version and overall better error handling was implemented a while back. Missed to refer to this issue when it was indirectly solved.
I cant figure out how to create a CloudAMQP instance in Azure.
Using the following terraform template: `resource "cloudamqp_instance" "rmq_bunny" { name = "terraform-provider-test" plan = "bunny" region = "azure::eastus" }
output "rmq_url" { value = "${cloudamqp_instance.rmq_bunny.url}" }`
I've used an api key from over here: customer.cloudamqp.com/apikeys
I get the following error output: `cloudamqp_instance.rmq_bunny: Creating... apikey: "" => ""
name: "" => "terraform-provider-test"
nodes: "" => "1"
plan: "" => "bunny"
region: "" => "azure::eastus"
url: "" => ""
Error: Error applying plan:
1 error(s) occurred:
cloudamqp_instance.rmq_bunny: 1 error(s) occurred:
cloudamqp_instance.rmq_bunny: unexpected EOF
Terraform does not automatically rollback in the face of errors. Instead, your Terraform state file has been partially updated with any resources that successfully completed. Please address the error above and apply again to incrementally change your infrastructure.
panic: interface conversion: interface {} is nil, not float64 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: goroutine 45 [running]: 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: github.com/cloudamqp/terraform-provider/vendor/github.com/84codes/go-api/api.(API).Create(0xc000526d28, 0xc0003fede0, 0xfe71aa, 0x5, 0xc000177858) 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: C:/playground/GoWorkspace/src/github.com/cloudamqp/terraform-provider/vendor/github.com/84codes/go-api/api/api.go:45 +0x270 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: main.resourceCreate(0xc0001e52d0, 0xf08ea0, 0xc000526d28, 0x24, 0x1a78e00) 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: C:/playground/GoWorkspace/src/github.com/cloudamqp/terraform-provider/resource_instance.go:72 +0x120 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: github.com/cloudamqp/terraform-provider/vendor/github.com/hashicorp/terraform/helper/schema.(Resource).Apply(0xc000193b20, 0xc00047e320, 0xc000005900, 0xf08ea0, 0xc000526d28, 0xd7bc01, 0xc0003bbd70, 0x0) 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: C:/playground/GoWorkspace/src/github.com/cloudamqp/terraform-provider/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:225 +0x3a9 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: github.com/cloudamqp/terraform-provider/vendor/github.com/hashicorp/terraform/helper/schema.(Provider).Apply(0xc000193b90, 0xc00047e2d0, 0xc00047e320, 0xc000005900, 0xc0003fed80, 0xc000139530, 0x18) 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: C:/playground/GoWorkspace/src/github.com/cloudamqp/terraform-provider/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:283 +0x196 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: github.com/cloudamqp/terraform-provider/vendor/github.com/hashicorp/terraform/plugin.(ResourceProviderServer).Apply(0xc000523f80, 0xc0000054e0, 0xc0001aef30, 0x0, 0x0) 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: C:/playground/GoWorkspace/src/github.com/cloudamqp/terraform-provider/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:527 +0x5e 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: reflect.Value.call(0xc0004b2420, 0xc000526ac8, 0x13, 0xfe6012, 0x4, 0xc000137f18, 0x3, 0x3, 0xc00013a240, 0xc000520028, ...) 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: C:/Go/src/reflect/value.go:447 +0x468 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: reflect.Value.Call(0xc0004b2420, 0xc000526ac8, 0x13, 0xc000137f18, 0x3, 0x3, 0xc000520000, 0xc000137f10, 0xc000137fb8) 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: C:/Go/src/reflect/value.go:308 +0xab 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: net/rpc.(service).call(0xc000460b00, 0xc000524730, 0xc000536bf0, 0xc000536c00, 0xc000497300, 0xc0003a84a0, 0xe0dfa0, 0xc0000054e0, 0x16, 0xe0dfe0, ...) 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: C:/Go/src/net/rpc/server.go:384 +0x155 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: created by net/rpc.(Server).ServeCodec 2019-04-24T11:52:51.592+0200 [DEBUG] plugin.terraform-provider-cloudamqp.exe: C:/Go/src/net/rpc/server.go:481 +0x432 2019/04/24 11:52:51 [TRACE] root: eval: terraform.EvalWriteState 2019/04/24 11:52:51 [TRACE] root: eval: terraform.EvalApplyProvisioners 2019/04/24 11:52:51 [TRACE] root: eval: terraform.EvalIf 2019/04/24 11:52:51 [TRACE] root: eval: terraform.EvalWriteState 2019/04/24 11:52:51 [TRACE] root: eval: terraform.EvalWriteDiff 2019/04/24 11:52:51 [TRACE] root: eval: terraform.EvalApplyPost 2019/04/24 11:52:51 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:
cloudamqp_instance.rmq_bunny: unexpected EOF 2019/04/24 11:52:51 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:
cloudamqp_instance.rmq_bunny: unexpected EOF 2019/04/24 11:52:51 [TRACE] [walkApply] Exiting eval tree: cloudamqp_instance.rmq_bunny 2019/04/24 11:52:51 [TRACE] dag/walk: upstream errored, not walking "provider.cloudamqp (close)" 2019/04/24 11:52:51 [TRACE] dag/walk: upstream errored, not walking "output.rmq_url" 2019/04/24 11:52:51 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)" 2019/04/24 11:52:51 [TRACE] dag/walk: upstream errored, not walking "root" 2019/04/24 11:52:51 [TRACE] Preserving existing state lineage "3a35c17c-9de8-0b1f-96cb-51fc0d1f02ec" 2019/04/24 11:52:51 [TRACE] Preserving existing state lineage "3a35c17c-9de8-0b1f-96cb-51fc0d1f02ec" 2019/04/24 11:52:51 [TRACE] Preserving existing state lineage "3a35c17c-9de8-0b1f-96cb-51fc0d1f02ec" 2019/04/24 11:52:51 [TRACE] Preserving existing state lineage "3a35c17c-9de8-0b1f-96cb-51fc0d1f02ec" 2019/04/24 11:52:51 [DEBUG] plugin: waiting for all plugin processes to complete... 2019-04-24T11:52:51.604+0200 [WARN ] plugin: error closing client during Kill: err="connection is shut down" 2019-04-24T11:52:51.605+0200 [DEBUG] plugin.terraform-provider-azurerm_v1.25.0_x4.exe: 2019/04/24 11:52:51 [ERR] plugin: plugin server: accept tcp 127.0.0.1:10004: use of closed network connection 2019-04-24T11:52:51.605+0200 [DEBUG] plugin: plugin process exited: path=C:\playground\GoWorkspace\bin\terraform-provider-cloudamqp.exe 2019-04-24T11:52:51.622+0200 [DEBUG] plugin: plugin process exited: path=c:\gits\PPM-infrastructure.terraform\plugins\windows_amd64\terraform-provider-azurerm_v1.25.0_x4.exe
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Terraform crashed! This is always indicative of a bug within Terraform. A crash log has been placed at "crash.log" relative to your current working directory. It would be immensely helpful if you could please report the crash with Terraform1 so that we can fix this.
When reporting bugs, please include your terraform version. That information is available on the first line of crash.log. You can also get it by running 'terraform --version' on the command line.
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!`