This repository was archived by the owner on Sep 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
This repository was archived by the owner on Sep 9, 2024. It is now read-only.
notifications
in nodeping_check
seems broken #19
Copy link
Copy link
Open
Description
Hi, I'm testing out this provider and just got a crash. Here is the relevant terraform output from terraform:
│ Error: Plugin did not respond
│
│ with nodeping_check.this,
│ on main.tf line 27, in resource "nodeping_check" "this":
│ 27: resource "nodeping_check" "this" {
│
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵
╷
│ Error: Plugin did not respond
│
│ with nodeping_check.this,
│ on main.tf line 27, in resource "nodeping_check" "this":
│ 27: resource "nodeping_check" "this" {
│
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵
Releasing state lock. This may take a few moments...
Stack trace from the terraform-provider-nodeping plugin:
panic: interface conversion: interface {} is nil, not float64
goroutine 26 [running]:
terraform-nodeping/nodeping_api_client.(*Notification).UnmarshalJSON(0xc0002454e0, 0xc0007d00a1, 0x12, 0x55f, 0x9b2fa98, 0xc0002454e0)
/softkraftco/terraform-nodeping/nodeping_api_client/models.go:143 +0x1b5
encoding/json.(*decodeState).object(0xc00042d760, 0x17d4b20, 0xc0002454e0, 0x199, 0xc00042d788, 0xc0002a8d7b)
/usr/local/Cellar/go/1.15.7/libexec/src/encoding/json/decode.go:609 +0x207c
encoding/json.(*decodeState).value(0xc00042d760, 0x17d4b20, 0xc0002454e0, 0x199, 0xc0002454e0, 0x199)
/usr/local/Cellar/go/1.15.7/libexec/src/encoding/json/decode.go:370 +0x6d
encoding/json.(*decodeState).object(0xc00042d760, 0x1796940, 0xc0002454c0, 0x195, 0x187560e, 0xb)
/usr/local/Cellar/go/1.15.7/libexec/src/encoding/json/decode.go:765 +0x12fe
encoding/json.(*decodeState).value(0xc00042d760, 0x1796940, 0xc0002454c0, 0x195, 0x1796940, 0xc0002454c0)
/usr/local/Cellar/go/1.15.7/libexec/src/encoding/json/decode.go:370 +0x6d
encoding/json.(*decodeState).array(0xc00042d760, 0x1754120, 0xc00035f060, 0x197, 0xc00042d788, 0x5b)
/usr/local/Cellar/go/1.15.7/libexec/src/encoding/json/decode.go:558 +0x1aa
encoding/json.(*decodeState).value(0xc00042d760, 0x1754120, 0xc00035f060, 0x197, 0x1754120, 0xc00035f060)
/usr/local/Cellar/go/1.15.7/libexec/src/encoding/json/decode.go:360 +0x105
encoding/json.(*decodeState).object(0xc00042d760, 0x174d860, 0xc00035efc0, 0x16, 0xc00042d788, 0x7b)
/usr/local/Cellar/go/1.15.7/libexec/src/encoding/json/decode.go:765 +0x12fe
encoding/json.(*decodeState).value(0xc00042d760, 0x174d860, 0xc00035efc0, 0x16, 0xc0002a9580, 0x1175599)
/usr/local/Cellar/go/1.15.7/libexec/src/encoding/json/decode.go:370 +0x6d
encoding/json.(*decodeState).unmarshal(0xc00042d760, 0x174d860, 0xc00035efc0, 0xc00042d788, 0x0)
/usr/local/Cellar/go/1.15.7/libexec/src/encoding/json/decode.go:180 +0x1ea
encoding/json.Unmarshal(0xc0007d0000, 0x276, 0x600, 0x174d860, 0xc00035efc0, 0xc0003eec80, 0x40)
/usr/local/Cellar/go/1.15.7/libexec/src/encoding/json/decode.go:107 +0x112
terraform-nodeping/nodeping_api_client.(*Client).UpdateCheck(0xc000427590, 0x195ca60, 0xc00010f0e0, 0xc00026a840, 0xc043bd26c0787bc0, 0x1176b194b5e, 0x1d987a0)
/softkraftco/terraform-nodeping/nodeping_api_client/checks.go:68 +0x23c
terraform-nodeping/nodeping.resourceCheckUpdate(0x195ca60, 0xc00010f0e0, 0xc00005f000, 0x1855320, 0xc000427590, 0xc00024e720, 0x12df90a, 0xc00068e700)
/softkraftco/terraform-nodeping/nodeping/resource_check.go:350 +0x74
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xc0000fe9c0, 0x195c9e0, 0xc00038c240, 0xc00005f000, 0x1855320, 0xc000427590, 0x0, 0x0, 0x0)
/softkraftco/terraform-nodeping/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go:309 +0x1ea
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0000fe9c0, 0x195c9e0, 0xc00038c240, 0xc0004ba620, 0xc00068e700, 0x1855320, 0xc000427590, 0x0, 0x0, 0x0, ...)
/softkraftco/terraform-nodeping/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go:404 +0x390
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc000268360, 0x195c9e0, 0xc00038c240, 0xc00042ae60, 0xc00038c240, 0x0, 0x1966460)
/softkraftco/terraform-nodeping/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/grpc_provider.go:955 +0x8cf
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ApplyResourceChange(0xc000702340, 0x195c9e0, 0xc00038c240, 0xc0004ba0e0, 0xc000702340, 0xc0002ba330, 0xc000620ba0)
/softkraftco/terraform-nodeping/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/server/server.go:332 +0xae
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x18393e0, 0xc000702340, 0x195caa0, 0xc0002ba330, 0xc00010e2a0, 0x0, 0x195caa0, 0xc0002ba330, 0xc0003fd800, 0x7bb)
/softkraftco/terraform-nodeping/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:380 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002b3180, 0x1964560, 0xc000102c00, 0xc0001e2200, 0xc0001107e0, 0x1d8bf20, 0x0, 0x0, 0x0)
/softkraftco/terraform-nodeping/vendor/google.golang.org/grpc/server.go:1194 +0x522
google.golang.org/grpc.(*Server).handleStream(0xc0002b3180, 0x1964560, 0xc000102c00, 0xc0001e2200, 0x0)
/softkraftco/terraform-nodeping/vendor/google.golang.org/grpc/server.go:1517 +0xd05
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000118210, 0xc0002b3180, 0x1964560, 0xc000102c00, 0xc0001e2200)
/softkraftco/terraform-nodeping/vendor/google.golang.org/grpc/server.go:859 +0xa5
created by google.golang.org/grpc.(*Server).serveStreams.func1
/softkraftco/terraform-nodeping/vendor/google.golang.org/grpc/server.go:857 +0x1fd
Error: The terraform-provider-nodeping plugin crashed!
The resource looks like this:
resource "nodeping_check" "this" {
customer_id = "..."
type = "HTTPCONTENT"
target = var.target
follow = false
contentstring = "pong"
label = var.label
public = false
interval = var.interval
runlocations = ["wlw"]
homeloc = "false"
threshold = 5
sens = 2
notifications {
contact = var.contact_id
delay = 1
schedule = "All"
}
}
It works if I omit the notifications
object.
Metadata
Metadata
Assignees
Labels
No labels