无服务器框架输出
Serverless framework outputs
我只想打印出应用配置所需的信息。从基础开始:UserPoolId。输出不工作。有人知道为什么吗?
service: test-ota-fmw
provider:
name: aws
runtime: nodejs8.10
stage: dev
custom:
stage: ${opt:stage, self:provider.stage}
variables:
facebook_app_id: fbappid
google_app_id: xxxxx.apps.googleusercontent.com
resources:
# Cognito
# - ${file(resources/cognito-user-pool.yml)}
# - ${file(resources/cognito-identity-pool.yml)}
Resources:
CognitoUserPool:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: mgnio-${self:custom.stage}-user-pool
UsernameAttributes:
- email
AutoVerifiedAttributes:
- email
CognitoUserPoolClient:
Type: AWS::Cognito::UserPoolClient
Properties:
ClientName: mgnio-${self:custom.stage}-mobile-app-client
GenerateSecret: true
UserPoolId:
Ref: CognitoUserPool
Outputs:
UserPoolId:
Value:
Ref: CognitoUserPool
输出
这是 运行 serverless deploy
之后的输出
Service Information
service: mgnio-ota-fmw
stage: dev
region: us-east-1
stack: mgnio-ota-fmw-dev
api keys:
None
endpoints:
None
functions:
None
显然我必须添加更多文本,因为它抱怨我的 post 大部分是代码。我真的不知道如何进一步解释,所以我将继续 运行t 直到我有足够的文本让 Whosebug 停止对我大喊大叫。谢谢!
更新
如果我 运行 serverless deploy -v
,我就能得到输出。
这是预期的行为吗?是否仅在设置 --verbose
标志时才显示输出?
要使无服务器框架显示任何堆栈输出,您需要使用 -v 或 --verbose 标志。
sls deploy -v
或
sls info -v
查看文档 here。
我只想打印出应用配置所需的信息。从基础开始:UserPoolId。输出不工作。有人知道为什么吗?
service: test-ota-fmw
provider:
name: aws
runtime: nodejs8.10
stage: dev
custom:
stage: ${opt:stage, self:provider.stage}
variables:
facebook_app_id: fbappid
google_app_id: xxxxx.apps.googleusercontent.com
resources:
# Cognito
# - ${file(resources/cognito-user-pool.yml)}
# - ${file(resources/cognito-identity-pool.yml)}
Resources:
CognitoUserPool:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: mgnio-${self:custom.stage}-user-pool
UsernameAttributes:
- email
AutoVerifiedAttributes:
- email
CognitoUserPoolClient:
Type: AWS::Cognito::UserPoolClient
Properties:
ClientName: mgnio-${self:custom.stage}-mobile-app-client
GenerateSecret: true
UserPoolId:
Ref: CognitoUserPool
Outputs:
UserPoolId:
Value:
Ref: CognitoUserPool
输出
这是 运行 serverless deploy
Service Information
service: mgnio-ota-fmw
stage: dev
region: us-east-1
stack: mgnio-ota-fmw-dev
api keys:
None
endpoints:
None
functions:
None
显然我必须添加更多文本,因为它抱怨我的 post 大部分是代码。我真的不知道如何进一步解释,所以我将继续 运行t 直到我有足够的文本让 Whosebug 停止对我大喊大叫。谢谢!
更新
如果我 运行 serverless deploy -v
,我就能得到输出。
这是预期的行为吗?是否仅在设置 --verbose
标志时才显示输出?
要使无服务器框架显示任何堆栈输出,您需要使用 -v 或 --verbose 标志。
sls deploy -v
或
sls info -v
查看文档 here。