Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't remove custom domain when run sls remove and has anothers API mappings #419

Closed
feeh27 opened this issue Apr 22, 2021 · 2 comments
Closed

Comments

@feeh27
Copy link

feeh27 commented Apr 22, 2021

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

Feature Request

Is your feature request related to a problem? Please describe.
I've a custom domain that I use for different services (different serverless.yml files) and each one has its own API Mapping.

I needed to delete a service that I no longer used and when running sls remove I noticed that the plugin removes the custom domain, causing all other services that use it to lose this configuration.

Describe the solution you'd like
I would like to see if another service uses the same Custom Domain before deleting it.

Describe alternatives you've considered
In order not to remove the Custom Domain I'm setting autoDomain to false before executing the sls remove command.

I use a tool that controls the environments and with it I can configure a pipeline to revert deploy, however in this case I would have to have 2 serverless.yml files to each service (one for sls deploy and another for sls remove).

@apoffa
Copy link

apoffa commented May 4, 2021

Hello Guys!
I’m having an issue with “serverless remove” and the custom domain plugin.
I have multiple services deployed with the following config:

custom:
domains:
prod: [subdomain].[domain]
dev: [subdomain]-dev.[domain]
customDomain:
domainName: ${self:custom.domains.${self:custom.stage}}
basePath: [Service name]
stage: ${self:custom.stage}
createRoute53Record: true
hostedZoneId: [Hosted zone ID]
autoDomain: true

Each service has a different basePath.
Every time I run “sls remove ….” from one of my services, every mapping from every other services gets removed so I need to manually map them again.

Is this due to a configuration error or might it be a bug?

@rddimon
Copy link
Collaborator

rddimon commented Jan 26, 2022

Hi @feeh27
You can handle it with #478 in version 5.6.0

Feel free to reopen it in case of any further issues with it

@rddimon rddimon closed this as completed Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants