anantab / serverless-plugin-ifelse

A Serverless Plugin to write If Else conditions in serverless YAML file
69 stars 21 forks source link

Regex pattern with if condition not working as expected #29

Open iamyogeshg opened 3 years ago

iamyogeshg commented 3 years ago

Hi there,

My requirement is to exclude a certain function from all stages where stage name does not end with shrd. I am doing it in the way as shown below. Using version 1.0.7 and node version is 12.22.1.

serverlessIfElse:
      - If: '"${self:custom.stage}" != "(*shrd)"'
        Exclude:
          - functions.LogArchiver

What's happening is that even in stage matching with "*shrd" pattern, plugin is excluding that function. Please advise.

Thanks Yogesh