Please adjust konnect_mesh_control_plane.my_meshcontrolplane.id and konnect_mesh.my_mesh.name according to your current configuration.
resource "konnect_mesh_fault_injection" "default_fault_injection" {
provider = konnect-beta
type = "MeshFaultInjection"
name = "default-fault-injection"
spec = {
target_ref = {
kind = "Dataplane"
labels = {
app = "backend"
}
}
from = [
{
target_ref = {
kind = "MeshSubset"
tags = {
kuma.io/service = "frontend"
}
}
default = {
http = [
{
abort = {
http_status = "500"
percentage = "2.5"
}
},
{
abort = {
http_status = "500"
percentage = "10"
}
},
{
delay = {
value = "5s"
percentage = "5"
}
}
]
}
}
]
}
labels = {
"kuma.io/mesh" = konnect_mesh.my_mesh.name
}
cp_id = konnect_mesh_control_plane.my_meshcontrolplane.id
mesh = konnect_mesh.my_mesh.name
}