serverless-domain-manager icon indicating copy to clipboard operation
serverless-domain-manager copied to clipboard

Custom domain names not using the right environment

Open ramzauchenna opened this issue 5 years ago • 2 comments

I have multiple domains for both dev and prod and both apis are talking the the dev stage which should not be.

No idea what the issue is here.

custom:
  stage: ${opt:stage, self:provider.stage}
  domains:
    dev: devapi.xxx.co
    prod: api.xxx.co
  customDomain:
      domainName: ${self:custom.domains.${self:custom.stage}}
      basePath: 'xxx' # This will be prefixed to all routes
      stage: ${self:provider.stage}
      createRoute53Record: true
      endpointType: 'edge'`

api.xxx.co when deployed with sls deploy --stage prod loads the dev lamda api

Versions

  • Domain Manager version(s): [v4.2.0]
  • Node/npm version: [Node 12.14.1/npm 5]
  • Serverless Version: [V1.68.0]
  • Lambda Code [e.g. Javascript

ramzauchenna avatar Sep 09 '20 08:09 ramzauchenna

hey @ramzauchenna any news on that?

brunopadz avatar Jan 27 '21 21:01 brunopadz

any update on this?

kaykhan avatar Jul 19 '22 09:07 kaykhan

Hi @ramzauchenna

Hope you have solved this issue. I don't see an issue with the plugin here. It looks like the real problem is with the stage: ${self:provider.stage} config it might be something like ${opt:stage,self:provider.stage}

We are not supporting version 4.x anymore please try our latest version 6.x and let us know in case of any issues

rddimon avatar Feb 06 '23 21:02 rddimon