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

Use serverless-{service-name}-{stage}-ServiceEndpoint as default CF export name for ServiceEndput #3616

Closed
mykemd opened this issue May 12, 2017 · 7 comments · Fixed by #9313

Comments

@mykemd
Copy link

mykemd commented May 12, 2017

Currently ServiceEndpoint and ImportEventLambdaFunctionQualifiedArn from CF stack are Output variables, but it would be nice to have default Export Name for them, something like sls-{service-name}-{stage}-ServiceEndpoint.

It would allow to auto-use outputs from the stack in other CF scripts by default.

We currently can do the same functionality in the custom resource section where we can introduce an output variable with export name but it would be cool to have this available by default for core output variables.


Proposed solution

(added by maintainers)

For each configured output in scope of the Framework, configure an export name with following naming rules:

sls-{service}-{stage}-{outputName}

I think it's unique enough to not be considered as breaking change, still if you feel it can be risky to just introduce that please elaborate.

@riquier
Copy link

riquier commented Feb 2, 2018

That would be very useful, even better if it could export a few extra details (e.g. the API ID)

@hubsi
Copy link

hubsi commented Mar 9, 2018

Just want to clarify on what to add to the custom resource section in serverless.yml, since I was looking for it myself:

  Outputs:
    ServiceEndpointExport:
      Description: Exported Url of the endpoint
      Value:
        Fn::Join:
          - ""
          - - "https://"
            - "Ref": "ApiGatewayRestApi"
            - ".execute-api.eu-west-1.amazonaws.com/dev"
      Export:
        Name: "${self:provider.stage}:${self:service}:ServiceEndpoint"

@medikoo
Copy link
Contributor

medikoo commented Oct 29, 2020

I've updated main description with implementation proposal. PR's welcome!

@js-cha
Copy link
Contributor

js-cha commented Apr 17, 2021

hey @medikoo 👋 - first time OS contributor here. Just wanted to ask if this issue is still relevant and can be worked on? Would love to have a crack.

@medikoo
Copy link
Contributor

medikoo commented Apr 17, 2021

@js-cha I believe that it's still relevant. Still let me confirm with @pgrzesik, @pgrzesik what do you think about this proposal?

@pgrzesik
Copy link
Contributor

I think the proposal looks good, nothing to add from me 👍

@medikoo
Copy link
Contributor

medikoo commented Apr 19, 2021

@js-cha it's all yours!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants