Closed ashwinaggarwal closed 5 years ago
When evaluating an expression using If, and using the Set key to replace values, if the property to be replaced is a boolean value, it is skipped.
For. e.g.
custom: serverlessIfElse: - If: '["sit", "uat"].indexOf("${opt:stage, self:provider.stage}") === -1' Set: custom.customCertificate.enabled: false ElseSet: custom.customCertificate.enabled: true customCertificate: certificateName: ${file(./config.yml):${opt:stage, self:provider.stage}.FQDN} hostedZoneName: ${file(./config.yml):${opt:stage, self:provider.stage}.HOSTZONENAME} writeCertInfoToFile: true enabled: false
sls debug output
Serverless: Invoke aws:common:cleanupTempDir Serverless: serverless-plugin-ifelse - (["sit", "uat"].indexOf("dev") === -1) Condition true. Serverless: Compiling with Typescript...
expected output
Serverless: Invoke aws:common:cleanupTempDir Serverless: serverless-plugin-ifelse - (["sit", "uat"].indexOf("dev") === -1) Condition true. Serverless: serverless-plugin-ifelse - Value Changed for : custom.customCertificate.enabled to: false Serverless: Compiling with Typescript...
When evaluating an expression using If, and using the Set key to replace values, if the property to be replaced is a boolean value, it is skipped.
For. e.g.
sls debug output
expected output