serverless-domain-manager
serverless-domain-manager copied to clipboard
Remove stack issue with the plugin serverlessIfElse
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Bug Report
Error Description
The creation is right. The issue appears when I try to remove the stack. Seems the remove code read the domain directly from the serverless.yml
and is not executed the plugin serverlessIfElse
because the domainName
is empty
Command Run
create: sls deploy --stage test remove: sls remove --stage test
Console Output

Domain Manager Configuration
Replace this with your own serverless.yml
file (anonymized, of course) to help us better resolve your issue.
custom:
stage: ${opt:stage, self:provider.stage}
serverlessIfElse:
- If: '"${self:custom.stage}" == "prod"'
Set:
custom.customDomain.domainName domain.com
ElseSet:
custom.customDomain.domainName: ${self:custom.stage}-domain.com
customDomain:
basePath: ""
stage: ${opt:stage}
createRoute53Record: true
autoDomain: true
domainName: ""
Versions
- Domain Manager version(s): 5.1.0
- Node/npm version: v12.13.0
- Serverless Version: 1.76.1
- Lambda Code: Javascript
Possible Solution No idea
Additional context/Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.