Kong / terraform-provider-konnect

16 stars 3 forks source link

OpenTelemetry fails to save Propagation configuration #25

Closed andrea-migliaccio closed 2 weeks ago

andrea-migliaccio commented 3 weeks ago

I configured the TF resource for the OpenTelemetry plugin in this way. Since no documentation / samples is provided for this plugin, we basically used the JSON representation of a similar resources and converted into terraform HCL..

I've taken a loog at the OpenAPI doc in the repo as well as the go-lang generated classes and I've noticed that the "propogation" object is missing at all while actually present in the OpenTelemetry Plugin on the Kong Portal and in the Plugin official documentation as well https://docs.konghq.com/hub/kong-inc/opentelemetry/#propagation


resource "konnect_gateway_plugin_opentelemetry" "opentelemetry_plugin" {
  config = {
    ...
    propagation =  {
      clear =  null
      default_format =  "b3"
      extract =  ["b3","datadog"]
      inject = ["b3","datadog"]
    }
    ....
  }
  enabled = true
  protocols =  ["grpc","grpcs","http","https"]

  control_plane_id = konnect_gateway_control_plane.kcp.id
}

But the provisioned plugin was wrong... It missed the default_format as well as the extract and inject arrays.

image

mheap commented 2 weeks ago

Thanks @andrea-migliaccio! Propagation is a new 3.7 field and I need to update the provider with new options. I'll get something released this week

andrea-migliaccio commented 2 weeks ago

Thank you! That would be great!

mheap commented 2 weeks ago

v0.3.0 is out now, which contains the propagation field