Add ability to customize search pattern
This adds the ability to customize the prefix and suffix of the search pattern.
My intention is written in more detail at https://forum.serverless.com/t/can-i-customize-the-valid-api-gateway-stage-name-pattern/9217
With this change I can create an API Gateway valid stage but one that is later replaced e.g. AbcStageXyz
The custom section in serverless.yml looks like
custom:
sub:
prefix: Abc
suffix: Xyz
Hi @khornberg, Thank you for this PR.
I think I understand what you mention, but just for clarity. You'd still want to use the Fn::Sub addition conversion part of this module? That is, when you have something equal AbcStageXyz, you'd want it to later become Fn::Sub: ${Stage} in the final CFN template?
Yes
This comes from wanting to get Fn::Sub into places where some characters are not allowed. Specifically, setting the provider.stage and wanting to replace that later on.