API error when using Terraform, backslash issues

Hey,

I’m trying to create the following:

resource ā€œpagerduty_event_orchestration_routerā€ ā€œrouterā€ {
event_orchestration = pagerduty_event_orchestration.devops.id
set {
id = ā€œstartā€
rule {
label = ā€œEvents relating to Aceā€
condition {
expression = ā€œevent.summary matches part ā€˜ace\bā€™ā€
}
actions {
route_to = pagerduty_service.ace.id
}
}
}
catch_all {
actions {
route_to = ā€œunroutedā€
}
}
}

And getting the following error code when running terraform apply:

Error: PUT API call to https://api.pagerduty.com/event_orchestrations/6fd1056d-59f8-4e04-9d90-5d92b1cf301d/router failed 400 Bad Request. Code: 0, Errors: map[sets:[map[rules:[map[conditions:[map[expression:[unexpected word 'ā€˜ace’ on line 1 offset 27 unexpected symbols ā€˜ā€™ on line 1 offset 31, unexpected word ā€˜ā€™ā€™ on line 1 offset 33]]]]

As you can see, i’m using \ but still.

Thanks

This was fixed by using \\ so instead of
expression = ā€œevent.summary matches part ā€˜ace\bā€™ā€
I had to setup:
expression = ā€œevent.summary matches part ā€˜ace\bā€™ā€
and in Terraform this was written like that:
expression = ā€œevent.summary matches part ā€˜ace\\bā€™ā€