From 39908f7deebee5f829b24f4d28d12e736dcd9678 Mon Sep 17 00:00:00 2001 From: Sasha Bauer Date: Thu, 2 Jan 2025 15:14:53 -0500 Subject: [PATCH] fix(oncall): change Route constructor --- grafanaplane/oncall/integration.libsonnet | 24 +++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/grafanaplane/oncall/integration.libsonnet b/grafanaplane/oncall/integration.libsonnet index 2c31680..d07b508 100644 --- a/grafanaplane/oncall/integration.libsonnet +++ b/grafanaplane/oncall/integration.libsonnet @@ -65,25 +65,23 @@ local forProvider = integration.spec.parameters.forProvider; route: { local forProvider = route.spec.parameters.forProvider, - '#chain':: d.func.new( + '#new':: d.func.new( ||| - `chain` configures a Route to reference an Escalation Chain. + `new` configures a Route with a given `routingRegex`. |||, - [d.argument.new('name', d.T.string)] + [d.argument.new('routingRegex', d.T.string)] ), - chain(name):: - forProvider.escalationChainRef.withName(name), + new(routingRegex):: + forProvider.withRoutingRegex(routingRegex), - - '#withRoutingRegex':: d.func.new( + '#withEscalationChain':: d.func.new( ||| - `withRoutingRegex` configures a Route to have routing type `regex` and - use the supplied regex. + `withEscalationChain` configures a Route with a destination Escalation + Chain. `escalationChainName` is the resource name of the chain. |||, - [d.argument.new('regex', d.T.string)] + [d.argument.new('escalationChainName', d.T.string)] ), - withRoutingRegex(regex):: - forProvider.withRoutingType('regex') - + forProvider.withRoutingRegex(regex), + withEscalationChain(escalationChainName):: + forProvider.escalationChainRef.withName(escalationChainName), }, }