This message was deleted.
# typescript
s
This message was deleted.
w
I’m thinking you can set a variable before agwConfig that defines the autoscaleConfiguration object and then use that value in the agwConfig setting. E.g.
Copy code
const autoscaleConfig = (useAppGaeayAutoScale ? {minCapacity: appGatewayAutoScaleMinimumInstanceCount, maxCapacity: appgatewayAutoScaleMaximumInstanceCount} : {})

let agwConfig ... = {
   ...
autoscaleConfiguration: autoscaleConfig
}
q
close! I think this works:
Copy code
const autoscaleConfig = (useAppGatewayAutoScale ? {minCapacity: appGatewayAutoScaleMinimumInstanceCount, maxCapacity: appGatewayAutoScaleMaximumInstanceCount} : undefined)
(just the last bit changed to undefined instead of {} object)