Terraform v0.14.5
cloudflare_page_rule, cloudflare_record, etc
resource "cloudflare_record" "A_record" {
zone_id = cloudflare_zone.myzone.id
name = "something"
type = "A"
ttl = 1
proxied = false
value = "127.0.0.1"
}
2021-03-11T11:08:46.123Z [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2021-03-11T11:08:46.128Z [DEBUG] plugin: plugin process exited: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/2.19.1/linux_amd64/terraform-provider-cloudflare_v2.19.1 pid=1576
2021-03-11T11:08:46.128Z [DEBUG] plugin: plugin exited
2021/03/11 11:08:46 [INFO] backend/local: plan operation completed
Error: rpc error: code = Canceled desc = context canceled
Error: rpc error: code = Canceled desc = context canceled
Error: rpc error: code = Unavailable desc = transport is closing
_No response_
Plan to succeed
Error messages as described above
I've pulled the state from terraform cloud and ran terraform plan locally without any issues.
Opened a pull request pinning the provider version to 2.18.0 and plan ran without issues on terraform cloud.
_No response_
The issue is also logged here: https://github.com/cloudflare/terraform-provider-cloudflare/issues/988
The issue is also logged here: #988
Thanks @KyleNesium
I saw that issue but seems somehow unrelated. I managed to run a successful plan with provider version 2.19.1 locally (Terraform v0.14.5 for Darwin), without crashes.
This seems to affect terraform cloud only.
I'm getting a bunch of following errors:
Error: rpc error: code = Unavailable desc = transport is closing
Error: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: write unix @->/tmp/plugin771003864: write: broken pipe"
Error: rpc error: code = Canceled desc = context canceled
And part of crash report:
panic: runtime error: invalid memory address or nil pointer dereference
--
422 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x103cdac]
423 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1:
424 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: goroutine 45 [running]:
425 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: github.com/cloudflare/terraform-provider-cloudflare/cloudflare.resourceCloudflareRecordRead(0xc000262460, 0x13417c0, 0xc0001a5500, 0xc000262460, 0x0)
426 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: github.com/cloudflare/terraform-provider-cloudflare/cloudflare/resource_cloudflare_record.go:442 +0xacc
427 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000157cb0, 0xc0006300f0, 0x13417c0, 0xc0001a5500, 0xc0007babf0, 0x0, 0x0)
428 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: github.com/hashicorp/[email protected]/helper/schema/resource.go:460 +0x129
429 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadResource(0xc000188c10, 0x1516240, 0xc0009237a0, 0xc00087ab40, 0xc000188c10, 0xc0009237a0, 0xc0006a1ba0)
430 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: github.com/hashicorp/[email protected]/internal/helper/plugin/grpc_provider.go:525 +0x3dd
431 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadResource_Handler(0x12fd8c0, 0xc000188c10, 0x1516240, 0xc0009237a0, 0xc00087aae0, 0x0, 0x1516240, 0xc0009237a0, 0xc000640480, 0x204)
432 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3269 +0x214
433 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: google.golang.org/grpc.(*Server).processUnaryRPC(0xc000134380, 0x1521a00, 0xc000876180, 0xc0006ac500, 0xc00017eae0, 0x1c0c510, 0x0, 0x0, 0x0)
434 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: google.golang.org/[email protected]/server.go:1171 +0x522
435 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: google.golang.org/grpc.(*Server).handleStream(0xc000134380, 0x1521a00, 0xc000876180, 0xc0006ac500, 0x0)
436 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: google.golang.org/[email protected]/server.go:1494 +0xcc5
437 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0003f4290, 0xc000134380, 0x1521a00, 0xc000876180, 0xc0006ac500)
438 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: google.golang.org/[email protected]/server.go:834 +0xa5
439 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: created by google.golang.org/grpc.(*Server).serveStreams.func1
440 | 2021-03-11T03:42:39.964Z [DEBUG] plugin.terraform-provider-cloudflare_v2.19.1: google.golang.org/[email protected]/server.go:832 +0x1fd
441 | 2021-03-11T03:42:39.966Z [DEBUG] plugin: plugin process exited: path=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/2.19.1/linux_amd64/terraform-provider-cloudflare_v2.19.1 pid=24688 error="exit status 2"
Started to happen today with newest provider 2.19.1.
Works ok with 2.19.0.
I can also confirm that first failed run was seen ~5h ago and previous successful run was ~20h ago.
That means that v2.19.0 was used in successful runs and once v2.19.1 was released we started to see these errors.
I will amend the title.
@KyleNesium I stand corrected.
After looking into this carefully I noticed I was still using the cached version of the provider (2.18.0) since I didn't run terraform init -upgrade locally.
Removed cached version, wiped .terraform to start anew and removed version constraints from the provider.
I managed to reproduce #988
Using v2.19.0 works as mentioned by others. Closing this issue as it's a duplicate.