Kong / terraform-provider-konnect

16 stars 3 forks source link

Creating a file-log (same for OpenTelemetry plugin resource) plugin at Global Level ends up with a unmarshal error of the response #24

Closed andrea-migliaccio closed 2 weeks ago

andrea-migliaccio commented 3 weeks ago

│ Error: failure to invoke API │ │ with module.multi_control_planes_dev[0].konnect_gateway_plugin_file_log.file_log_plugin[0], │ on modules/control-plane/control-plane.tf line 54, in resource "konnect_gateway_plugin_file_log" "file_log_plugin": │ 54: resource "konnect_gateway_plugin_file_log" "file_log_plugin" { │ │ error unmarshalling json response body: json: cannot unmarshal array into Go value of type map[string]interface {}

resource "konnect_gateway_plugin_file_log" "file_log_plugin" {
  config = {
    path = "/dev/stdout"
    reopen = false
  }
  enabled = true
  protocols = ["grpc","grpcs","http","https","udp","ws","wss","tls"]

  control_plane_id = konnect_gateway_control_plane.kcp.id
}

It seems that the go class is not aligned with the kong api response schema.. I guess..

mheap commented 2 weeks ago

Thanks for the report @andrea-migliaccio - can you please test v0.3.0, which should resolve this issue

andrea-migliaccio commented 2 weeks ago

I'm re-testing everything this afternoon. I'll provide you with a feedback on each issues

Thanks!

andrea-migliaccio commented 2 weeks ago

I'm not getting the error anymore globally for the plugin i provisioned (OpenTelemetry and file-log) and the "propagation" part is also present for OpenTelemetry as reported in the issues #25