-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
V4: ${opt:stage} does not resolve when using "-s" but does when using "--stage" #12545
Comments
@jaffadog Thanks for the report. We will be looking into this. As an alternative to |
After a quick test I can confirm that |
Thanks @jaffadog. Fix coming shortly. |
Super @ac360. Thank you all for the quick fix. Cheers! |
Release coming with a fix in ~4 hours. |
Issue description
when deploying to AWS using:
serverless deploy -s v1
${opt:stage} does not resolve and results in unexpected results when using things like this in you yml:
environment:
bucket: ${self:custom.${opt:stage, self:provider.stage}.bucket}
If instead you deploy to AWS using:
serverless deploy --stage v1
then things wok fine.
Documentation states:
--stage or -s The stage in your service that you want to deploy to.
(ref https://www.serverless.com/framework/docs-providers-aws-cli-reference-deploy)
Context
Serverless ϟ Support
This generates a report from your last Serverless Framework command (including any errors) to use for Github Issues, debugging w/ AI, or creating a support ticket w/ Serverless Inc.
Summary Report -----------------
Service Overview
Service Path
/home/ec2-user/environment/fastseas/fastseas-get-oscar2-data
Error Message
Cannot resolve '${opt:stage}' variable at 'provider.environment.test1'. None of the variables returned a value and no default value was provided. Please check your variable definitions or provide a default value.
Error Stacktrace
Service Config
Above is a summary report of your last Serverless Framework command.
Use it to debug with AI (e.g. ChatGPT) or report a new Github Issue: https://slss.io/issue
The text was updated successfully, but these errors were encountered: