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

Custom stackName in next serverless version that will brake this plugin. #15

Open
egut opened this issue Jul 3, 2018 · 3 comments · May be fixed by #30
Open

Custom stackName in next serverless version that will brake this plugin. #15

egut opened this issue Jul 3, 2018 · 3 comments · May be fixed by #30

Comments

@egut
Copy link

egut commented Jul 3, 2018

In serverless version above 1.27.3 one can set a custom stackName.

provider:
   stackName: my-custom-name

In main serverless they are using this getStackName from this code to fetch the stackname:
https://github.com/serverless/serverless/blob/cbc5e3c4e199a08650b02def8d1f9e91a13e7844/lib/plugins/aws/lib/naming.js

Used as in serverless, if you get the this reference correct you are done:

const stackname = this.provider.naming.getStackName();
@dls314
Copy link

dls314 commented Jul 23, 2018

This breaks with an error message like
Serverless: Cannot process Stack Output: Stack with id - does not exist!

@debanshus
Copy link

@egut , @dls314 any replacement for this plugin ? I am stuck.

@dls314
Copy link

dls314 commented Aug 18, 2020

@egut , @dls314 any replacement for this plugin ? I am stuck.

I gave up using the plugin and query the deployed stack with AWS CLI using a command like this

STACK_OUTPUTS=$(aws cloudformation describe-stacks --stack-name $STACK_NAME --region $AWS_REGION --no-paginate --query 'Stacks[0].Outputs[*].{key:OutputKey,value:OutputValue}' --output json)

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

Successfully merging a pull request may close this issue.

3 participants