Please adjust konnect_mesh_control_plane.my_meshcontrolplane.id and konnect_mesh.my_mesh.name according to your current configuration.
resource "konnect_mesh_metric" "metrics_for_mesh_service" {
provider = konnect-beta
type = "MeshMetric"
name = "metrics-for-mesh-service"
spec = {
target_ref = {
kind = "Dataplane"
labels = {
framework = "example-web-framework"
}
}
default = {
applications = [
{
path = "/metrics/prometheus"
port = "8888"
}
]
}
}
labels = {
"kuma.io/mesh" = konnect_mesh.my_mesh.name
}
cp_id = konnect_mesh_control_plane.my_meshcontrolplane.id
mesh = konnect_mesh.my_mesh.name
}