-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(init): Make template spacing consistent (#962)
- Loading branch information
Showing
7 changed files
with
188 additions
and
211 deletions.
There are no files selected for viewing
70 changes: 34 additions & 36 deletions
70
...t/templates/cookiecutter-aws-sam-hello-dotnet/{{cookiecutter.project_name}}/template.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,44 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
Description: > | ||
Sample SAM Template for {{ cookiecutter.project_name }} | ||
Sample SAM Template for {{ cookiecutter.project_name }} | ||
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst | ||
Globals: | ||
Function: | ||
Timeout: 10 | ||
|
||
Function: | ||
Timeout: 10 | ||
|
||
Resources: | ||
|
||
HelloWorldFunction: | ||
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction | ||
Properties: | ||
CodeUri: ./artifacts/HelloWorld.zip | ||
Handler: HelloWorld::HelloWorld.Function::FunctionHandler | ||
{%- if cookiecutter.runtime == 'dotnetcore2.0' %} | ||
Runtime: {{ cookiecutter.runtime }} | ||
{%- elif cookiecutter.runtime == 'dotnetcore2.1' or cookiecutter.runtime == 'dotnet' %} | ||
Runtime: dotnetcore2.1 | ||
{%- endif %} | ||
Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object | ||
Variables: | ||
PARAM1: VALUE | ||
Events: | ||
HelloWorld: | ||
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api | ||
Properties: | ||
Path: /hello | ||
Method: get | ||
HelloWorldFunction: | ||
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction | ||
Properties: | ||
CodeUri: ./artifacts/HelloWorld.zip | ||
Handler: HelloWorld::HelloWorld.Function::FunctionHandler | ||
{%- if cookiecutter.runtime == 'dotnetcore2.0' %} | ||
Runtime: {{ cookiecutter.runtime }} | ||
{%- elif cookiecutter.runtime == 'dotnetcore2.1' or cookiecutter.runtime == 'dotnet' %} | ||
Runtime: dotnetcore2.1 | ||
{%- endif %} | ||
Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object | ||
Variables: | ||
PARAM1: VALUE | ||
Events: | ||
HelloWorld: | ||
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api | ||
Properties: | ||
Path: /hello | ||
Method: get | ||
|
||
Outputs: | ||
|
||
HelloWorldApi: | ||
Description: "API Gateway endpoint URL for Prod stage for Hello World function" | ||
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/" | ||
|
||
HelloWorldFunction: | ||
Description: "Hello World Lambda Function ARN" | ||
Value: !GetAtt HelloWorldFunction.Arn | ||
|
||
HelloWorldFunctionIamRole: | ||
Description: "Implicit IAM Role created for Hello World function" | ||
Value: !GetAtt HelloWorldFunctionRole.Arn | ||
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function | ||
# Find out more about other implicit resources you can reference within SAM | ||
# https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#api | ||
HelloWorldApi: | ||
Description: "API Gateway endpoint URL for Prod stage for Hello World function" | ||
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/" | ||
HelloWorldFunction: | ||
Description: "Hello World Lambda Function ARN" | ||
Value: !GetAtt HelloWorldFunction.Arn | ||
HelloWorldFunctionIamRole: | ||
Description: "Implicit IAM Role created for Hello World function" | ||
Value: !GetAtt HelloWorldFunctionRole.Arn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 31 additions & 33 deletions
64
...nit/templates/cookiecutter-aws-sam-hello-java/{{cookiecutter.project_name}}/template.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,42 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
Description: > | ||
{{ cookiecutter.project_name }} | ||
{{ cookiecutter.project_name }} | ||
Sample SAM Template for {{ cookiecutter.project_name }} | ||
Sample SAM Template for {{ cookiecutter.project_name }} | ||
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst | ||
Globals: | ||
Function: | ||
Timeout: 20 | ||
|
||
Function: | ||
Timeout: 20 | ||
|
||
Resources: | ||
|
||
HelloWorldFunction: | ||
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction | ||
Properties: | ||
CodeUri: target/HelloWorld-1.0.jar | ||
Handler: helloworld.App::handleRequest | ||
Runtime: java8 | ||
Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object | ||
Variables: | ||
PARAM1: VALUE | ||
Events: | ||
HelloWorld: | ||
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api | ||
Properties: | ||
Path: /hello | ||
Method: get | ||
HelloWorldFunction: | ||
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction | ||
Properties: | ||
CodeUri: target/HelloWorld-1.0.jar | ||
Handler: helloworld.App::handleRequest | ||
Runtime: java8 | ||
Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object | ||
Variables: | ||
PARAM1: VALUE | ||
Events: | ||
HelloWorld: | ||
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api | ||
Properties: | ||
Path: /hello | ||
Method: get | ||
|
||
Outputs: | ||
|
||
HelloWorldApi: | ||
Description: "API Gateway endpoint URL for Prod stage for Hello World function" | ||
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/" | ||
|
||
HelloWorldFunction: | ||
Description: "Hello World Lambda Function ARN" | ||
Value: !GetAtt HelloWorldFunction.Arn | ||
|
||
HelloWorldFunctionIamRole: | ||
Description: "Implicit IAM Role created for Hello World function" | ||
Value: !GetAtt HelloWorldFunctionRole.Arn | ||
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function | ||
# Find out more about other implicit resources you can reference within SAM | ||
# https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#api | ||
HelloWorldApi: | ||
Description: "API Gateway endpoint URL for Prod stage for Hello World function" | ||
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/" | ||
HelloWorldFunction: | ||
Description: "Hello World Lambda Function ARN" | ||
Value: !GetAtt HelloWorldFunction.Arn | ||
HelloWorldFunctionIamRole: | ||
Description: "Implicit IAM Role created for Hello World function" | ||
Value: !GetAtt HelloWorldFunctionRole.Arn |
63 changes: 29 additions & 34 deletions
63
...t/templates/cookiecutter-aws-sam-hello-nodejs/{{cookiecutter.project_name}}/template.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,39 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
Description: > | ||
{{ cookiecutter.project_name }} | ||
{{ cookiecutter.project_name }} | ||
Sample SAM Template for {{ cookiecutter.project_name }} | ||
Sample SAM Template for {{ cookiecutter.project_name }} | ||
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst | ||
Globals: | ||
Function: | ||
Timeout: 3 | ||
|
||
Function: | ||
Timeout: 3 | ||
|
||
Resources: | ||
|
||
HelloWorldFunction: | ||
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction | ||
Properties: | ||
CodeUri: hello-world/ | ||
Handler: app.lambdaHandler | ||
Runtime: nodejs8.10 | ||
Events: | ||
HelloWorld: | ||
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api | ||
Properties: | ||
Path: /hello | ||
Method: get | ||
HelloWorldFunction: | ||
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction | ||
Properties: | ||
CodeUri: hello-world/ | ||
Handler: app.lambdaHandler | ||
Runtime: nodejs8.10 | ||
Events: | ||
HelloWorld: | ||
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api | ||
Properties: | ||
Path: /hello | ||
Method: get | ||
|
||
Outputs: | ||
|
||
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function | ||
# Find out more about other implicit resources you can reference within SAM | ||
# https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#api | ||
HelloWorldApi: | ||
Description: "API Gateway endpoint URL for Prod stage for Hello World function" | ||
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/" | ||
|
||
HelloWorldFunction: | ||
Description: "Hello World Lambda Function ARN" | ||
Value: !GetAtt HelloWorldFunction.Arn | ||
|
||
HelloWorldFunctionIamRole: | ||
Description: "Implicit IAM Role created for Hello World function" | ||
Value: !GetAtt HelloWorldFunctionRole.Arn | ||
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function | ||
# Find out more about other implicit resources you can reference within SAM | ||
# https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#api | ||
HelloWorldApi: | ||
Description: "API Gateway endpoint URL for Prod stage for Hello World function" | ||
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/" | ||
HelloWorldFunction: | ||
Description: "Hello World Lambda Function ARN" | ||
Value: !GetAtt HelloWorldFunction.Arn | ||
HelloWorldFunctionIamRole: | ||
Description: "Implicit IAM Role created for Hello World function" | ||
Value: !GetAtt HelloWorldFunctionRole.Arn |
61 changes: 28 additions & 33 deletions
61
.../templates/cookiecutter-aws-sam-hello-nodejs6/{{cookiecutter.project_name}}/template.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,39 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
Description: > | ||
{{ cookiecutter.project_name }} | ||
{{ cookiecutter.project_name }} | ||
Sample SAM Template for {{ cookiecutter.project_name }} | ||
Sample SAM Template for {{ cookiecutter.project_name }} | ||
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst | ||
Globals: | ||
Function: | ||
Timeout: 3 | ||
|
||
Function: | ||
Timeout: 3 | ||
|
||
Resources: | ||
|
||
HelloWorldFunction: | ||
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction | ||
Properties: | ||
CodeUri: hello-world/ | ||
Handler: app.lambdaHandler | ||
Runtime: {{ cookiecutter.runtime }} | ||
Events: | ||
HelloWorld: | ||
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api | ||
Properties: | ||
Path: /hello | ||
Method: get | ||
HelloWorldFunction: | ||
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction | ||
Properties: | ||
CodeUri: hello-world/ | ||
Handler: app.lambdaHandler | ||
Runtime: {{ cookiecutter.runtime }} | ||
Events: | ||
HelloWorld: | ||
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api | ||
Properties: | ||
Path: /hello | ||
Method: get | ||
|
||
Outputs: | ||
|
||
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function | ||
# Find out more about other implicit resources you can reference within SAM | ||
# https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#api | ||
HelloWorldApi: | ||
Description: "API Gateway endpoint URL for Prod stage for Hello World function" | ||
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/" | ||
|
||
HelloWorldFunction: | ||
Description: "Hello World Lambda Function ARN" | ||
Value: !GetAtt HelloWorldFunction.Arn | ||
|
||
HelloWorldFunctionIamRole: | ||
Description: "Implicit IAM Role created for Hello World function" | ||
Value: !GetAtt HelloWorldFunctionRole.Arn | ||
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function | ||
# Find out more about other implicit resources you can reference within SAM | ||
# https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#api | ||
HelloWorldApi: | ||
Description: "API Gateway endpoint URL for Prod stage for Hello World function" | ||
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/" | ||
HelloWorldFunction: | ||
Description: "Hello World Lambda Function ARN" | ||
Value: !GetAtt HelloWorldFunction.Arn | ||
HelloWorldFunctionIamRole: | ||
Description: "Implicit IAM Role created for Hello World function" | ||
Value: !GetAtt HelloWorldFunctionRole.Arn |
Oops, something went wrong.