diff --git a/Makefile b/Makefile index 6da84ab35..45fabfb34 100755 --- a/Makefile +++ b/Makefile @@ -19,13 +19,15 @@ integ-test: black: black setup.py samtranslator/* tests/* integration/* bin/*.py - bin/json-format.py --write tests + bin/json-format.py --write tests integration bin/yaml-format.py --write tests + bin/yaml-format.py --write integration --add-test-metadata black-check: black --check setup.py samtranslator/* tests/* integration/* bin/*.py - bin/json-format.py --check tests + bin/json-format.py --check tests integration bin/yaml-format.py --check tests + bin/yaml-format.py --check integration --add-test-metadata lint: # mypy performs type check diff --git a/integration/config/code_key_to_file_map.json b/integration/config/code_key_to_file_map.json index 75ab8c0d0..a58131d85 100644 --- a/integration/config/code_key_to_file_map.json +++ b/integration/config/code_key_to_file_map.json @@ -1,8 +1,8 @@ { - "codeuri": "code.zip", - "contenturi": "layer1.zip", - "definitionuri": "swagger1.json", - "templateurl": "template.yaml", - "binaryMediaCodeUri": "binary-media.zip", - "mtlsuri": "MTLSCert.pem" -} \ No newline at end of file + "binaryMediaCodeUri": "binary-media.zip", + "codeuri": "code.zip", + "contenturi": "layer1.zip", + "definitionuri": "swagger1.json", + "mtlsuri": "MTLSCert.pem", + "templateurl": "template.yaml" +} diff --git a/integration/config/file_to_s3_map.json b/integration/config/file_to_s3_map.json index c8096eefc..204409bbd 100644 --- a/integration/config/file_to_s3_map.json +++ b/integration/config/file_to_s3_map.json @@ -1,11 +1,38 @@ { - "code.zip": {"type": "s3", "uri": ""}, - "code2.zip": {"type": "s3", "uri": ""}, - "layer1.zip": {"type": "s3", "uri": ""}, - "swagger1.json": {"type": "s3", "uri": ""}, - "swagger2.json": {"type": "s3", "uri": ""}, - "binary-media.zip": {"type": "s3", "uri": ""}, - "template.yaml": {"type": "http", "uri": ""}, - "MTLSCert.pem": {"type": "s3", "uri": ""}, - "MTLSCert-Updated.pem": {"type": "s3", "uri": ""} -} \ No newline at end of file + "MTLSCert-Updated.pem": { + "type": "s3", + "uri": "" + }, + "MTLSCert.pem": { + "type": "s3", + "uri": "" + }, + "binary-media.zip": { + "type": "s3", + "uri": "" + }, + "code.zip": { + "type": "s3", + "uri": "" + }, + "code2.zip": { + "type": "s3", + "uri": "" + }, + "layer1.zip": { + "type": "s3", + "uri": "" + }, + "swagger1.json": { + "type": "s3", + "uri": "" + }, + "swagger2.json": { + "type": "s3", + "uri": "" + }, + "template.yaml": { + "type": "http", + "uri": "" + } +} diff --git a/integration/resources/code/swagger1.json b/integration/resources/code/swagger1.json index 81d235a10..ca8e572a4 100644 --- a/integration/resources/code/swagger1.json +++ b/integration/resources/code/swagger1.json @@ -1,12 +1,13 @@ { - "swagger": "2.0", + "definitions": { + "Empty": { + "type": "object" + } + }, "info": { - "title": "PetStore", - "description": "Your first API with Amazon API Gateway. This is a sample API that integrates via HTTP with our demo Pet Store endpoints" + "description": "Your first API with Amazon API Gateway. This is a sample API that integrates via HTTP with our demo Pet Store endpoints", + "title": "PetStore" }, - "schemes": [ - "https" - ], "paths": { "/": { "get": { @@ -27,264 +28,264 @@ } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { "method.response.header.Content-Type": "'text/html'" }, "responseTemplates": { "text/html": "\n
\n \n \n \n\n You have succesfully deployed your first API. You are seeing this HTML page because the GET
method to the root resource of your API returns this content as a Mock integration.\n
\n The Pet Store API contains the /pets
and /pets/{petId}
resources. By making a GET
request to /pets
you can retrieve a list of Pets in your API. If you are looking for a specific pet, for example the pet with ID 1, you can make a GET
request to /pets/1
.\n
\n You can use a REST client such as Postman to test the POST
methods in your API to create a new pet. Use the sample body below to send the POST
request:\n
\n{\n \"type\" : \"cat\",\n \"price\" : 123.11\n}\n\n \n" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, "type": "mock" } }, - "post": { + "options": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { + "Access-Control-Allow-Headers": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", + "method.response.header.Access-Control-Allow-Methods": "'POST,OPTIONS'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets", - "httpMethod": "POST", - "type": "http" + "type": "mock" } }, - "options": { - "consumes": [ - "application/json" - ], + "post": { "produces": [ "application/json" ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { "Access-Control-Allow-Origin": { "type": "string" - }, - "Access-Control-Allow-Methods": { - "type": "string" - }, - "Access-Control-Allow-Headers": { - "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "httpMethod": "POST", "responses": { "default": { - "statusCode": "200", "responseParameters": { - "method.response.header.Access-Control-Allow-Methods": "'POST,OPTIONS'", - "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, - "type": "mock" + "type": "http", + "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets" } } }, "/pets": { "get": { - "produces": [ - "application/json" - ], "parameters": [ { - "name": "type", "in": "query", + "name": "type", "required": false, "type": "string" }, { - "name": "page", "in": "query", + "name": "page", "required": false, "type": "string" } ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "httpMethod": "GET", + "requestParameters": { + "integration.request.querystring.page": "method.request.querystring.page", + "integration.request.querystring.type": "method.request.querystring.type" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets", - "httpMethod": "GET", - "requestParameters": { - "integration.request.querystring.page": "method.request.querystring.page", - "integration.request.querystring.type": "method.request.querystring.type" - }, - "type": "http" + "type": "http", + "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets" } }, - "post": { + "options": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { + "Access-Control-Allow-Headers": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", + "method.response.header.Access-Control-Allow-Methods": "'POST,GET,OPTIONS'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets", - "httpMethod": "POST", - "type": "http" + "type": "mock" } }, - "options": { - "consumes": [ - "application/json" - ], + "post": { "produces": [ "application/json" ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { "Access-Control-Allow-Origin": { "type": "string" - }, - "Access-Control-Allow-Methods": { - "type": "string" - }, - "Access-Control-Allow-Headers": { - "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "httpMethod": "POST", "responses": { "default": { - "statusCode": "200", "responseParameters": { - "method.response.header.Access-Control-Allow-Methods": "'POST,GET,OPTIONS'", - "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, - "type": "mock" + "type": "http", + "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets" } } }, "/pets/{petId}": { "get": { - "produces": [ - "application/json" - ], "parameters": [ { - "name": "petId", "in": "path", + "name": "petId", "required": true, "type": "string" } ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "httpMethod": "GET", + "requestParameters": { + "integration.request.path.petId": "method.request.path.petId" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets/{petId}", - "httpMethod": "GET", - "requestParameters": { - "integration.request.path.petId": "method.request.path.petId" - }, - "type": "http" + "type": "http", + "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets/{petId}" } }, "options": { @@ -297,44 +298,43 @@ "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { - "Access-Control-Allow-Origin": { + "Access-Control-Allow-Headers": { "type": "string" }, "Access-Control-Allow-Methods": { "type": "string" }, - "Access-Control-Allow-Headers": { + "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { - "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, "type": "mock" } } } }, - "definitions": { - "Empty": { - "type": "object" - } - } + "schemes": [ + "https" + ], + "swagger": "2.0" } diff --git a/integration/resources/code/swagger2.json b/integration/resources/code/swagger2.json index 7db53a271..f04889120 100644 --- a/integration/resources/code/swagger2.json +++ b/integration/resources/code/swagger2.json @@ -1,12 +1,13 @@ { - "swagger": "2.0", + "definitions": { + "Empty": { + "type": "object" + } + }, "info": { - "title": "PetStore", - "description": "Your first API with Amazon API Gateway. This is a sample API that integrates via HTTP with our demo Pet Store endpoints" + "description": "Your first API with Amazon API Gateway. This is a sample API that integrates via HTTP with our demo Pet Store endpoints", + "title": "PetStore" }, - "schemes": [ - "https" - ], "paths": { "/": { "get": { @@ -27,139 +28,139 @@ } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { "method.response.header.Content-Type": "'text/html'" }, "responseTemplates": { "text/html": "\n \n \n \n \n
\n You have succesfully deployed your first API. You are seeing this HTML page because the GET
method to the root resource of your API returns this content as a Mock integration.\n
\n The Pet Store API contains the /pets
and /pets/{petId}
resources. By making a GET
request to /pets
you can retrieve a list of Pets in your API. If you are looking for a specific pet, for example the pet with ID 1, you can make a GET
request to /pets/1
.\n
\n You can use a REST client such as Postman to test the POST
methods in your API to create a new pet. Use the sample body below to send the POST
request:\n
\n{\n \"type\" : \"cat\",\n \"price\" : 123.11\n}\n\n \n" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, "type": "mock" } }, - "post": { + "options": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { + "Access-Control-Allow-Headers": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", + "method.response.header.Access-Control-Allow-Methods": "'POST,OPTIONS'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets", - "httpMethod": "POST", - "type": "http" + "type": "mock" } }, - "options": { - "consumes": [ - "application/json" - ], + "post": { "produces": [ "application/json" ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { "Access-Control-Allow-Origin": { "type": "string" - }, - "Access-Control-Allow-Methods": { - "type": "string" - }, - "Access-Control-Allow-Headers": { - "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "httpMethod": "POST", "responses": { "default": { - "statusCode": "200", "responseParameters": { - "method.response.header.Access-Control-Allow-Methods": "'POST,OPTIONS'", - "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, - "type": "mock" + "type": "http", + "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets" } } }, "/pets/{petId}": { "get": { - "produces": [ - "application/json" - ], "parameters": [ { - "name": "petId", "in": "path", + "name": "petId", "required": true, "type": "string" } ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "httpMethod": "GET", + "requestParameters": { + "integration.request.path.petId": "method.request.path.petId" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets/{petId}", - "httpMethod": "GET", - "requestParameters": { - "integration.request.path.petId": "method.request.path.petId" - }, - "type": "http" + "type": "http", + "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets/{petId}" } }, "options": { @@ -172,44 +173,43 @@ "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { - "Access-Control-Allow-Origin": { + "Access-Control-Allow-Headers": { "type": "string" }, "Access-Control-Allow-Methods": { "type": "string" }, - "Access-Control-Allow-Headers": { + "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { - "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, "type": "mock" } } } }, - "definitions": { - "Empty": { - "type": "object" - } - } + "schemes": [ + "https" + ], + "swagger": "2.0" } diff --git a/integration/resources/code/template.yaml b/integration/resources/code/template.yaml index 1949e8ba6..2b7feebce 100644 --- a/integration/resources/code/template.yaml +++ b/integration/resources/code/template.yaml @@ -1,8 +1,10 @@ AWSTemplateFormatVersion: '2010-09-09' -Transform: 'AWS::Serverless-2016-10-31' +Transform: AWS::Serverless-2016-10-31 Resources: MyTable: - Type: 'AWS::Serverless::SimpleTable' + Type: AWS::Serverless::SimpleTable Outputs: TableName: - Value: !Ref MyTable \ No newline at end of file + Value: !Ref MyTable +Metadata: + SamTransformTest: true diff --git a/integration/resources/expected/combination/all_policy_templates.json b/integration/resources/expected/combination/all_policy_templates.json index c6006004b..93ed45933 100644 --- a/integration/resources/expected/combination/all_policy_templates.json +++ b/integration/resources/expected/combination/all_policy_templates.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyFunction2", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunction2Role", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyFunction3", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunction3Role", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyFunction2", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunction2Role", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyFunction3", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunction3Role", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_authorizer_apikey.json b/integration/resources/expected/combination/api_with_authorizer_apikey.json index ecf278698..ed67d8da7 100644 --- a/integration/resources/expected/combination/api_with_authorizer_apikey.json +++ b/integration/resources/expected/combination/api_with_authorizer_apikey.json @@ -1,15 +1,54 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyLambdaTokenAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFirstApiKey", "ResourceType":"AWS::ApiGateway::ApiKey" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionLambdaTokenPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaAuthFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaAuthFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyUsagePlan", "ResourceType":"AWS::ApiGateway::UsagePlan" }, - { "LogicalResourceId":"MyUsagePlanKey", "ResourceType":"AWS::ApiGateway::UsagePlanKey" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyLambdaTokenAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFirstApiKey", + "ResourceType": "AWS::ApiGateway::ApiKey" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionLambdaTokenPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaAuthFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaAuthFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyUsagePlan", + "ResourceType": "AWS::ApiGateway::UsagePlan" + }, + { + "LogicalResourceId": "MyUsagePlanKey", + "ResourceType": "AWS::ApiGateway::UsagePlanKey" + } +] diff --git a/integration/resources/expected/combination/api_with_authorizers_invokefunction_set_none.json b/integration/resources/expected/combination/api_with_authorizers_invokefunction_set_none.json index 48e1752b6..06753ea5f 100644 --- a/integration/resources/expected/combination/api_with_authorizers_invokefunction_set_none.json +++ b/integration/resources/expected/combination/api_with_authorizers_invokefunction_set_none.json @@ -1,15 +1,54 @@ [ - { "LogicalResourceId":"MyApiWithAwsIamAuthNoCallerCredentials", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiWithAwsIamAuthNoCallerCredentialsDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiWithAwsIamAuthNoCallerCredentialsProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFunctionDefaultInvokeRole", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionDefaultInvokeRoleAPI3PermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionDefaultInvokeRoleRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyFunctionNONEInvokeRole", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionNONEInvokeRoleAPI3PermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionNONEInvokeRoleRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyFunctionWithAwsIamAuth", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionWithAwsIamAuthMyApiWithAwsIamAuthPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionWithAwsIamAuthMyApiWithNoAuthPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionWithAwsIamAuthRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiWithAwsIamAuthNoCallerCredentials", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiWithAwsIamAuthNoCallerCredentialsDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiWithAwsIamAuthNoCallerCredentialsProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFunctionDefaultInvokeRole", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionDefaultInvokeRoleAPI3PermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionDefaultInvokeRoleRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyFunctionNONEInvokeRole", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionNONEInvokeRoleAPI3PermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionNONEInvokeRoleRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyFunctionWithAwsIamAuth", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionWithAwsIamAuthMyApiWithAwsIamAuthPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionWithAwsIamAuthMyApiWithNoAuthPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionWithAwsIamAuthRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_authorizers_max.json b/integration/resources/expected/combination/api_with_authorizers_max.json index 44effbbf1..e95a803ec 100644 --- a/integration/resources/expected/combination/api_with_authorizers_max.json +++ b/integration/resources/expected/combination/api_with_authorizers_max.json @@ -1,21 +1,78 @@ [ - { "LogicalResourceId":"LambdaAuthInvokeRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyLambdaRequestAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiMyLambdaTokenAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyCognitoUserPool", "ResourceType":"AWS::Cognito::UserPool" }, - { "LogicalResourceId":"MyCognitoUserPoolTwo", "ResourceType":"AWS::Cognito::UserPool" }, - { "LogicalResourceId":"MyCognitoUserPoolClient", "ResourceType":"AWS::Cognito::UserPoolClient" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionCognitoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionLambdaRequestPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionLambdaTokenPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionIamPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaAuthFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaAuthFunctionApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaAuthFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "LambdaAuthInvokeRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyLambdaRequestAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiMyLambdaTokenAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyCognitoUserPool", + "ResourceType": "AWS::Cognito::UserPool" + }, + { + "LogicalResourceId": "MyCognitoUserPoolTwo", + "ResourceType": "AWS::Cognito::UserPool" + }, + { + "LogicalResourceId": "MyCognitoUserPoolClient", + "ResourceType": "AWS::Cognito::UserPoolClient" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionCognitoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionLambdaRequestPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionLambdaTokenPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaAuthFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaAuthFunctionApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaAuthFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_authorizers_max_openapi.json b/integration/resources/expected/combination/api_with_authorizers_max_openapi.json index 7b3dee7d3..06469c03c 100644 --- a/integration/resources/expected/combination/api_with_authorizers_max_openapi.json +++ b/integration/resources/expected/combination/api_with_authorizers_max_openapi.json @@ -1,25 +1,94 @@ [ - { "LogicalResourceId":"LambdaAuthInvokeRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyLambdaRequestAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiMyLambdaTokenAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyCognitoUserPool", "ResourceType":"AWS::Cognito::UserPool" }, - { "LogicalResourceId":"MyCognitoUserPoolTwo", "ResourceType":"AWS::Cognito::UserPool" }, - { "LogicalResourceId":"MyCognitoUserPoolClient", "ResourceType":"AWS::Cognito::UserPoolClient" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionCognitoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionLambdaRequestPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionLambdaTokenPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionIamPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaAuthFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaAuthFunctionApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionApiKeyPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaAuthFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyUsagePlanKey", "ResourceType":"AWS::ApiGateway::UsagePlanKey" }, - { "LogicalResourceId":"MyFirstApiKey", "ResourceType":"AWS::ApiGateway::ApiKey" }, - { "LogicalResourceId":"MyUsagePlan", "ResourceType":"AWS::ApiGateway::UsagePlan" } -] \ No newline at end of file + { + "LogicalResourceId": "LambdaAuthInvokeRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyLambdaRequestAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiMyLambdaTokenAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyCognitoUserPool", + "ResourceType": "AWS::Cognito::UserPool" + }, + { + "LogicalResourceId": "MyCognitoUserPoolTwo", + "ResourceType": "AWS::Cognito::UserPool" + }, + { + "LogicalResourceId": "MyCognitoUserPoolClient", + "ResourceType": "AWS::Cognito::UserPoolClient" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionCognitoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionLambdaRequestPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionLambdaTokenPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaAuthFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaAuthFunctionApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionApiKeyPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaAuthFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyUsagePlanKey", + "ResourceType": "AWS::ApiGateway::UsagePlanKey" + }, + { + "LogicalResourceId": "MyFirstApiKey", + "ResourceType": "AWS::ApiGateway::ApiKey" + }, + { + "LogicalResourceId": "MyUsagePlan", + "ResourceType": "AWS::ApiGateway::UsagePlan" + } +] diff --git a/integration/resources/expected/combination/api_with_authorizers_min.json b/integration/resources/expected/combination/api_with_authorizers_min.json index 85cbb5b71..4891a326e 100644 --- a/integration/resources/expected/combination/api_with_authorizers_min.json +++ b/integration/resources/expected/combination/api_with_authorizers_min.json @@ -1,18 +1,66 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyLambdaRequestAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiMyLambdaTokenAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyCognitoUserPool", "ResourceType":"AWS::Cognito::UserPool" }, - { "LogicalResourceId":"MyCognitoUserPoolClient", "ResourceType":"AWS::Cognito::UserPoolClient" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionCognitoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionLambdaRequestPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionLambdaTokenPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionIamPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaAuthFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaAuthFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyLambdaRequestAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiMyLambdaTokenAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyCognitoUserPool", + "ResourceType": "AWS::Cognito::UserPool" + }, + { + "LogicalResourceId": "MyCognitoUserPoolClient", + "ResourceType": "AWS::Cognito::UserPoolClient" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionCognitoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionLambdaRequestPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionLambdaTokenPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaAuthFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaAuthFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_binary_media_types.json b/integration/resources/expected/combination/api_with_binary_media_types.json index bd48f03b9..3d879f645 100644 --- a/integration/resources/expected/combination/api_with_binary_media_types.json +++ b/integration/resources/expected/combination/api_with_binary_media_types.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body.json b/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body.json index bd48f03b9..3d879f645 100644 --- a/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body.json +++ b/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body_openapi.json b/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body_openapi.json index 55ec077b3..a3019c030 100644 --- a/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body_openapi.json +++ b/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body_openapi.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyLambda", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyLambda", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_cors.json b/integration/resources/expected/combination/api_with_cors.json index 79a2fbc3a..c96cc3b30 100644 --- a/integration/resources/expected/combination/api_with_cors.json +++ b/integration/resources/expected/combination/api_with_cors.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionApiOnePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionApiTwoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiOnePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiTwoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_cors_only_headers.json b/integration/resources/expected/combination/api_with_cors_only_headers.json index 79a2fbc3a..c96cc3b30 100644 --- a/integration/resources/expected/combination/api_with_cors_only_headers.json +++ b/integration/resources/expected/combination/api_with_cors_only_headers.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionApiOnePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionApiTwoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiOnePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiTwoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_cors_only_max_age.json b/integration/resources/expected/combination/api_with_cors_only_max_age.json index 79a2fbc3a..c96cc3b30 100644 --- a/integration/resources/expected/combination/api_with_cors_only_max_age.json +++ b/integration/resources/expected/combination/api_with_cors_only_max_age.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionApiOnePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionApiTwoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiOnePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiTwoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_cors_only_methods.json b/integration/resources/expected/combination/api_with_cors_only_methods.json index 79a2fbc3a..c96cc3b30 100644 --- a/integration/resources/expected/combination/api_with_cors_only_methods.json +++ b/integration/resources/expected/combination/api_with_cors_only_methods.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionApiOnePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionApiTwoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiOnePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiTwoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_cors_openapi.json b/integration/resources/expected/combination/api_with_cors_openapi.json index 79a2fbc3a..c96cc3b30 100644 --- a/integration/resources/expected/combination/api_with_cors_openapi.json +++ b/integration/resources/expected/combination/api_with_cors_openapi.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionApiOnePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionApiTwoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiOnePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiTwoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_cors_shorthand.json b/integration/resources/expected/combination/api_with_cors_shorthand.json index 79a2fbc3a..c96cc3b30 100644 --- a/integration/resources/expected/combination/api_with_cors_shorthand.json +++ b/integration/resources/expected/combination/api_with_cors_shorthand.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionApiOnePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionApiTwoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiOnePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiTwoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_custom_domains_edge.json b/integration/resources/expected/combination/api_with_custom_domains_edge.json index d8dd5918f..ff3d53996 100644 --- a/integration/resources/expected/combination/api_with_custom_domains_edge.json +++ b/integration/resources/expected/combination/api_with_custom_domains_edge.json @@ -1,11 +1,38 @@ [ - { "LogicalResourceId":"RecordSetGroup1b7eeb359e", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ApiGatewayDomainName1101a94567", "ResourceType":"AWS::ApiGateway::DomainName" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyApigetBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"MyFunctionFetchPermissionProd", "ResourceType":"AWS::Lambda::Permission" } -] \ No newline at end of file + { + "LogicalResourceId": "RecordSetGroup1b7eeb359e", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ApiGatewayDomainName1101a94567", + "ResourceType": "AWS::ApiGateway::DomainName" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyApigetBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "MyFunctionFetchPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + } +] diff --git a/integration/resources/expected/combination/api_with_custom_domains_edge_feature_toggle.json b/integration/resources/expected/combination/api_with_custom_domains_edge_feature_toggle.json index 83afc8d73..87c82b557 100644 --- a/integration/resources/expected/combination/api_with_custom_domains_edge_feature_toggle.json +++ b/integration/resources/expected/combination/api_with_custom_domains_edge_feature_toggle.json @@ -1,11 +1,38 @@ [ - { "LogicalResourceId":"RecordSetGroupc911be5759", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ApiGatewayDomainName299fac327d", "ResourceType":"AWS::ApiGateway::DomainName" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyApigetBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"MyFunctionFetchPermissionProd", "ResourceType":"AWS::Lambda::Permission" } - ] \ No newline at end of file + { + "LogicalResourceId": "RecordSetGroupc911be5759", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ApiGatewayDomainName299fac327d", + "ResourceType": "AWS::ApiGateway::DomainName" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyApigetBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "MyFunctionFetchPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + } +] diff --git a/integration/resources/expected/combination/api_with_custom_domains_regional.json b/integration/resources/expected/combination/api_with_custom_domains_regional.json index b3d611ea3..eec0647ef 100644 --- a/integration/resources/expected/combination/api_with_custom_domains_regional.json +++ b/integration/resources/expected/combination/api_with_custom_domains_regional.json @@ -1,13 +1,46 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApipostBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"RecordSetGroupddfc299be2", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ServerlessRestApigetBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ApiGatewayDomainName7898169271", "ResourceType":"AWS::ApiGateway::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApipostBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RecordSetGroupddfc299be2", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ServerlessRestApigetBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ApiGatewayDomainName7898169271", + "ResourceType": "AWS::ApiGateway::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_custom_domains_regional_feature_toggle.json b/integration/resources/expected/combination/api_with_custom_domains_regional_feature_toggle.json index d83cd1c29..751a57f17 100644 --- a/integration/resources/expected/combination/api_with_custom_domains_regional_feature_toggle.json +++ b/integration/resources/expected/combination/api_with_custom_domains_regional_feature_toggle.json @@ -1,13 +1,46 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApipostBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"RecordSetGroupd17dced08c", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ServerlessRestApigetBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ApiGatewayDomainName98c928338d", "ResourceType":"AWS::ApiGateway::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } - ] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApipostBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RecordSetGroupd17dced08c", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ServerlessRestApigetBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ApiGatewayDomainName98c928338d", + "ResourceType": "AWS::ApiGateway::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification.json b/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification.json index 7b9e37471..fec74ff5e 100644 --- a/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification.json +++ b/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification.json @@ -1,13 +1,46 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApipostBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"RecordSetGroupddfc299be2", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ServerlessRestApigetBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ApiGatewayDomainNamec6418178e6", "ResourceType":"AWS::ApiGateway::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApipostBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RecordSetGroupddfc299be2", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ServerlessRestApigetBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ApiGatewayDomainNamec6418178e6", + "ResourceType": "AWS::ApiGateway::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification_feature_toggle.json b/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification_feature_toggle.json index 815a864c0..db2d7a0f5 100644 --- a/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification_feature_toggle.json +++ b/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification_feature_toggle.json @@ -1,13 +1,46 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApipostBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"RecordSetGroupd17dced08c", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ServerlessRestApigetBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ApiGatewayDomainNamef593820b0b", "ResourceType":"AWS::ApiGateway::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } - ] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApipostBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RecordSetGroupd17dced08c", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ServerlessRestApigetBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ApiGatewayDomainNamef593820b0b", + "ResourceType": "AWS::ApiGateway::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_disable_execute_api_endpoint.json b/integration/resources/expected/combination/api_with_disable_execute_api_endpoint.json index 3dd2412b9..8a83e221c 100644 --- a/integration/resources/expected/combination/api_with_disable_execute_api_endpoint.json +++ b/integration/resources/expected/combination/api_with_disable_execute_api_endpoint.json @@ -1,8 +1,26 @@ [ - {"LogicalResourceId": "RestApiGateway", "ResourceType": "AWS::ApiGateway::RestApi"}, - {"LogicalResourceId": "RestApiGatewayDeployment", "ResourceType": "AWS::ApiGateway::Deployment"}, - {"LogicalResourceId": "RestApiGatewayProdStage", "ResourceType": "AWS::ApiGateway::Stage"}, - {"LogicalResourceId": "RestApiFunction", "ResourceType": "AWS::Lambda::Function"}, - {"LogicalResourceId": "RestApiFunctionIamPermissionProd", "ResourceType": "AWS::Lambda::Permission"}, - {"LogicalResourceId": "RestApiFunctionRole", "ResourceType": "AWS::IAM::Role"} + { + "LogicalResourceId": "RestApiGateway", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RestApiGatewayDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "RestApiGatewayProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "RestApiFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "RestApiFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "RestApiFunctionRole", + "ResourceType": "AWS::IAM::Role" + } ] diff --git a/integration/resources/expected/combination/api_with_disable_execute_api_endpoint_openapi_3.json b/integration/resources/expected/combination/api_with_disable_execute_api_endpoint_openapi_3.json index 3dd2412b9..8a83e221c 100644 --- a/integration/resources/expected/combination/api_with_disable_execute_api_endpoint_openapi_3.json +++ b/integration/resources/expected/combination/api_with_disable_execute_api_endpoint_openapi_3.json @@ -1,8 +1,26 @@ [ - {"LogicalResourceId": "RestApiGateway", "ResourceType": "AWS::ApiGateway::RestApi"}, - {"LogicalResourceId": "RestApiGatewayDeployment", "ResourceType": "AWS::ApiGateway::Deployment"}, - {"LogicalResourceId": "RestApiGatewayProdStage", "ResourceType": "AWS::ApiGateway::Stage"}, - {"LogicalResourceId": "RestApiFunction", "ResourceType": "AWS::Lambda::Function"}, - {"LogicalResourceId": "RestApiFunctionIamPermissionProd", "ResourceType": "AWS::Lambda::Permission"}, - {"LogicalResourceId": "RestApiFunctionRole", "ResourceType": "AWS::IAM::Role"} + { + "LogicalResourceId": "RestApiGateway", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RestApiGatewayDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "RestApiGatewayProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "RestApiFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "RestApiFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "RestApiFunctionRole", + "ResourceType": "AWS::IAM::Role" + } ] diff --git a/integration/resources/expected/combination/api_with_endpoint_configuration.json b/integration/resources/expected/combination/api_with_endpoint_configuration.json index bd48f03b9..3d879f645 100644 --- a/integration/resources/expected/combination/api_with_endpoint_configuration.json +++ b/integration/resources/expected/combination/api_with_endpoint_configuration.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_endpoint_configuration_dict.json b/integration/resources/expected/combination/api_with_endpoint_configuration_dict.json index bd48f03b9..3d879f645 100644 --- a/integration/resources/expected/combination/api_with_endpoint_configuration_dict.json +++ b/integration/resources/expected/combination/api_with_endpoint_configuration_dict.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_fail_on_warnings.json b/integration/resources/expected/combination/api_with_fail_on_warnings.json index b1f81c7a0..8a83e221c 100644 --- a/integration/resources/expected/combination/api_with_fail_on_warnings.json +++ b/integration/resources/expected/combination/api_with_fail_on_warnings.json @@ -1,8 +1,26 @@ [ - {"LogicalResourceId": "RestApiGateway", "ResourceType": "AWS::ApiGateway::RestApi"}, - {"LogicalResourceId": "RestApiGatewayDeployment", "ResourceType": "AWS::ApiGateway::Deployment"}, - {"LogicalResourceId": "RestApiGatewayProdStage", "ResourceType": "AWS::ApiGateway::Stage"}, - {"LogicalResourceId": "RestApiFunction", "ResourceType": "AWS::Lambda::Function"}, - {"LogicalResourceId": "RestApiFunctionIamPermissionProd", "ResourceType": "AWS::Lambda::Permission"}, - {"LogicalResourceId": "RestApiFunctionRole", "ResourceType": "AWS::IAM::Role"} -] \ No newline at end of file + { + "LogicalResourceId": "RestApiGateway", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RestApiGatewayDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "RestApiGatewayProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "RestApiFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "RestApiFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "RestApiFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_gateway_responses.json b/integration/resources/expected/combination/api_with_gateway_responses.json index 03b8a01d5..0a91b2a4d 100644 --- a/integration/resources/expected/combination/api_with_gateway_responses.json +++ b/integration/resources/expected/combination/api_with_gateway_responses.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionIamPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_method_settings.json b/integration/resources/expected/combination/api_with_method_settings.json index bd48f03b9..3d879f645 100644 --- a/integration/resources/expected/combination/api_with_method_settings.json +++ b/integration/resources/expected/combination/api_with_method_settings.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_request_models.json b/integration/resources/expected/combination/api_with_request_models.json index 6bb28b0df..9a721ff19 100644 --- a/integration/resources/expected/combination/api_with_request_models.json +++ b/integration/resources/expected/combination/api_with_request_models.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_request_models_openapi.json b/integration/resources/expected/combination/api_with_request_models_openapi.json index 6bb28b0df..9a721ff19 100644 --- a/integration/resources/expected/combination/api_with_request_models_openapi.json +++ b/integration/resources/expected/combination/api_with_request_models_openapi.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_request_parameters_openapi.json b/integration/resources/expected/combination/api_with_request_parameters_openapi.json index 7787fc1a1..6c6ed74a2 100644 --- a/integration/resources/expected/combination/api_with_request_parameters_openapi.json +++ b/integration/resources/expected/combination/api_with_request_parameters_openapi.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ApiParameterFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"ApiParameterFunctionGetHtmlPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ApiParameterFunctionAnotherGetHtmlPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ApiParameterFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ApiParameterFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "ApiParameterFunctionGetHtmlPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ApiParameterFunctionAnotherGetHtmlPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ApiParameterFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_resource_policies.json b/integration/resources/expected/combination/api_with_resource_policies.json index a92cd0eb4..e574e8465 100644 --- a/integration/resources/expected/combination/api_with_resource_policies.json +++ b/integration/resources/expected/combination/api_with_resource_policies.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionApiPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionAnotherApiPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionAnotherApiPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_resource_policies_aws_account.json b/integration/resources/expected/combination/api_with_resource_policies_aws_account.json index e99ee073a..3d9c57644 100644 --- a/integration/resources/expected/combination/api_with_resource_policies_aws_account.json +++ b/integration/resources/expected/combination/api_with_resource_policies_aws_account.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionApiPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_resource_refs.json b/integration/resources/expected/combination/api_with_resource_refs.json index 4ff8679c2..30b334c23 100644 --- a/integration/resources/expected/combination/api_with_resource_refs.json +++ b/integration/resources/expected/combination/api_with_resource_refs.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_usage_plan.json b/integration/resources/expected/combination/api_with_usage_plan.json index a04e57274..bcf9ee1cf 100644 --- a/integration/resources/expected/combination/api_with_usage_plan.json +++ b/integration/resources/expected/combination/api_with_usage_plan.json @@ -1,20 +1,74 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyApiUsagePlan", "ResourceType":"AWS::ApiGateway::UsagePlan" }, - { "LogicalResourceId":"MyApiUsagePlanKey", "ResourceType":"AWS::ApiGateway::UsagePlanKey" }, - { "LogicalResourceId":"MyApiApiKey", "ResourceType":"AWS::ApiGateway::ApiKey" }, - { "LogicalResourceId":"MyApi2", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApi2Deployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi2ProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyApi3", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApi3Deployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi3ProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyApi4", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApi4Deployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi4ProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ServerlessUsagePlan", "ResourceType":"AWS::ApiGateway::UsagePlan" }, - { "LogicalResourceId":"ServerlessUsagePlanKey", "ResourceType":"AWS::ApiGateway::UsagePlanKey" }, - { "LogicalResourceId":"ServerlessApiKey", "ResourceType":"AWS::ApiGateway::ApiKey" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyApiUsagePlan", + "ResourceType": "AWS::ApiGateway::UsagePlan" + }, + { + "LogicalResourceId": "MyApiUsagePlanKey", + "ResourceType": "AWS::ApiGateway::UsagePlanKey" + }, + { + "LogicalResourceId": "MyApiApiKey", + "ResourceType": "AWS::ApiGateway::ApiKey" + }, + { + "LogicalResourceId": "MyApi2", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApi2Deployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi2ProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyApi3", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApi3Deployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi3ProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyApi4", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApi4Deployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi4ProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ServerlessUsagePlan", + "ResourceType": "AWS::ApiGateway::UsagePlan" + }, + { + "LogicalResourceId": "ServerlessUsagePlanKey", + "ResourceType": "AWS::ApiGateway::UsagePlanKey" + }, + { + "LogicalResourceId": "ServerlessApiKey", + "ResourceType": "AWS::ApiGateway::ApiKey" + } +] diff --git a/integration/resources/expected/combination/connector_bucket_to_function_write.json b/integration/resources/expected/combination/connector_bucket_to_function_write.json index c710e10f6..cbc95069b 100644 --- a/integration/resources/expected/combination/connector_bucket_to_function_write.json +++ b/integration/resources/expected/combination/connector_bucket_to_function_write.json @@ -31,4 +31,4 @@ "LogicalResourceId": "ConnectorNotTestedPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_event_rule_to_eb_custom_write.json b/integration/resources/expected/combination/connector_event_rule_to_eb_custom_write.json index 9aa4cb743..331e760f5 100644 --- a/integration/resources/expected/combination/connector_event_rule_to_eb_custom_write.json +++ b/integration/resources/expected/combination/connector_event_rule_to_eb_custom_write.json @@ -35,4 +35,4 @@ "LogicalResourceId": "VerificationQueue", "ResourceType": "AWS::SQS::Queue" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_event_rule_to_eb_default_write.json b/integration/resources/expected/combination/connector_event_rule_to_eb_default_write.json index 9aa4cb743..331e760f5 100644 --- a/integration/resources/expected/combination/connector_event_rule_to_eb_default_write.json +++ b/integration/resources/expected/combination/connector_event_rule_to_eb_default_write.json @@ -35,4 +35,4 @@ "LogicalResourceId": "VerificationQueue", "ResourceType": "AWS::SQS::Queue" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_event_rule_to_lambda_write.json b/integration/resources/expected/combination/connector_event_rule_to_lambda_write.json index 227d117c3..d723187ef 100644 --- a/integration/resources/expected/combination/connector_event_rule_to_lambda_write.json +++ b/integration/resources/expected/combination/connector_event_rule_to_lambda_write.json @@ -27,4 +27,4 @@ "LogicalResourceId": "VerificationQueue", "ResourceType": "AWS::SQS::Queue" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_event_rule_to_sfn_write.json b/integration/resources/expected/combination/connector_event_rule_to_sfn_write.json index b523ff64d..03868525e 100644 --- a/integration/resources/expected/combination/connector_event_rule_to_sfn_write.json +++ b/integration/resources/expected/combination/connector_event_rule_to_sfn_write.json @@ -31,4 +31,4 @@ "LogicalResourceId": "StateMachineRole", "ResourceType": "AWS::IAM::Role" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_event_rule_to_sns_write.json b/integration/resources/expected/combination/connector_event_rule_to_sns_write.json index ec8c2c15d..048263a94 100644 --- a/integration/resources/expected/combination/connector_event_rule_to_sns_write.json +++ b/integration/resources/expected/combination/connector_event_rule_to_sns_write.json @@ -31,4 +31,4 @@ "LogicalResourceId": "ConnectorNotBeingTestedQueuePolicy", "ResourceType": "AWS::SQS::QueuePolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_event_rule_to_sqs_write.json b/integration/resources/expected/combination/connector_event_rule_to_sqs_write.json index 15dd9518f..502a4e49c 100644 --- a/integration/resources/expected/combination/connector_event_rule_to_sqs_write.json +++ b/integration/resources/expected/combination/connector_event_rule_to_sqs_write.json @@ -19,4 +19,4 @@ "LogicalResourceId": "MyConnectorQueuePolicy", "ResourceType": "AWS::SQS::QueuePolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_bucket_read.json b/integration/resources/expected/combination/connector_function_to_bucket_read.json index 92e23cfdb..a02bc5b6a 100644 --- a/integration/resources/expected/combination/connector_function_to_bucket_read.json +++ b/integration/resources/expected/combination/connector_function_to_bucket_read.json @@ -15,4 +15,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_bucket_write.json b/integration/resources/expected/combination/connector_function_to_bucket_write.json index 92e23cfdb..a02bc5b6a 100644 --- a/integration/resources/expected/combination/connector_function_to_bucket_write.json +++ b/integration/resources/expected/combination/connector_function_to_bucket_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_eventbus_write.json b/integration/resources/expected/combination/connector_function_to_eventbus_write.json index 3f2c3bba9..8f46ee98b 100644 --- a/integration/resources/expected/combination/connector_function_to_eventbus_write.json +++ b/integration/resources/expected/combination/connector_function_to_eventbus_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_function.json b/integration/resources/expected/combination/connector_function_to_function.json index c7299e46f..927a18df2 100644 --- a/integration/resources/expected/combination/connector_function_to_function.json +++ b/integration/resources/expected/combination/connector_function_to_function.json @@ -19,4 +19,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_queue_read.json b/integration/resources/expected/combination/connector_function_to_queue_read.json index 7bb4b7c42..d9dd3466e 100644 --- a/integration/resources/expected/combination/connector_function_to_queue_read.json +++ b/integration/resources/expected/combination/connector_function_to_queue_read.json @@ -15,4 +15,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_queue_write.json b/integration/resources/expected/combination/connector_function_to_queue_write.json index 7bb4b7c42..d9dd3466e 100644 --- a/integration/resources/expected/combination/connector_function_to_queue_write.json +++ b/integration/resources/expected/combination/connector_function_to_queue_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_sfn_read.json b/integration/resources/expected/combination/connector_function_to_sfn_read.json index 347cd2498..3dfa6b0b2 100644 --- a/integration/resources/expected/combination/connector_function_to_sfn_read.json +++ b/integration/resources/expected/combination/connector_function_to_sfn_read.json @@ -27,4 +27,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_sfn_write.json b/integration/resources/expected/combination/connector_function_to_sfn_write.json index 347cd2498..3dfa6b0b2 100644 --- a/integration/resources/expected/combination/connector_function_to_sfn_write.json +++ b/integration/resources/expected/combination/connector_function_to_sfn_write.json @@ -27,4 +27,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_table_read.json b/integration/resources/expected/combination/connector_function_to_table_read.json index acd04bd85..4dabd2c5e 100644 --- a/integration/resources/expected/combination/connector_function_to_table_read.json +++ b/integration/resources/expected/combination/connector_function_to_table_read.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyReadConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_table_write.json b/integration/resources/expected/combination/connector_function_to_table_write.json index c2fc1b29c..293521ea5 100644 --- a/integration/resources/expected/combination/connector_function_to_table_write.json +++ b/integration/resources/expected/combination/connector_function_to_table_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyWriteConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_topic_write.json b/integration/resources/expected/combination/connector_function_to_topic_write.json index 773f7f721..14ece9873 100644 --- a/integration/resources/expected/combination/connector_function_to_topic_write.json +++ b/integration/resources/expected/combination/connector_function_to_topic_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_httpapi_to_function.json b/integration/resources/expected/combination/connector_httpapi_to_function.json index 26fd37b3a..89841392e 100644 --- a/integration/resources/expected/combination/connector_httpapi_to_function.json +++ b/integration/resources/expected/combination/connector_httpapi_to_function.json @@ -35,4 +35,4 @@ "LogicalResourceId": "HttpApi", "ResourceType": "AWS::ApiGatewayV2::Api" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_restapi_to_function.json b/integration/resources/expected/combination/connector_restapi_to_function.json index 6f5140962..78de28363 100644 --- a/integration/resources/expected/combination/connector_restapi_to_function.json +++ b/integration/resources/expected/combination/connector_restapi_to_function.json @@ -39,4 +39,4 @@ "LogicalResourceId": "RestApi", "ResourceType": "AWS::ApiGateway::RestApi" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_bucket_read.json b/integration/resources/expected/combination/connector_sfn_to_bucket_read.json index 166b303b3..9d07739dc 100644 --- a/integration/resources/expected/combination/connector_sfn_to_bucket_read.json +++ b/integration/resources/expected/combination/connector_sfn_to_bucket_read.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_bucket_write.json b/integration/resources/expected/combination/connector_sfn_to_bucket_write.json index 166b303b3..9d07739dc 100644 --- a/integration/resources/expected/combination/connector_sfn_to_bucket_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_bucket_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_eb_custom_write.json b/integration/resources/expected/combination/connector_sfn_to_eb_custom_write.json index eec04c6a8..c3a669491 100644 --- a/integration/resources/expected/combination/connector_sfn_to_eb_custom_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_eb_custom_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_eb_default_write.json b/integration/resources/expected/combination/connector_sfn_to_eb_default_write.json index ced2c2f08..228eab25f 100644 --- a/integration/resources/expected/combination/connector_sfn_to_eb_default_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_eb_default_write.json @@ -11,4 +11,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_function_write.json b/integration/resources/expected/combination/connector_sfn_to_function_write.json index f77efc655..6ba1b3b23 100644 --- a/integration/resources/expected/combination/connector_sfn_to_function_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_function_write.json @@ -19,4 +19,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_sfn_async.json b/integration/resources/expected/combination/connector_sfn_to_sfn_async.json index c041658a7..b1ddd3387 100644 --- a/integration/resources/expected/combination/connector_sfn_to_sfn_async.json +++ b/integration/resources/expected/combination/connector_sfn_to_sfn_async.json @@ -19,4 +19,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_sfn_sync.json b/integration/resources/expected/combination/connector_sfn_to_sfn_sync.json index c041658a7..b1ddd3387 100644 --- a/integration/resources/expected/combination/connector_sfn_to_sfn_sync.json +++ b/integration/resources/expected/combination/connector_sfn_to_sfn_sync.json @@ -19,4 +19,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_sns_write.json b/integration/resources/expected/combination/connector_sfn_to_sns_write.json index 0696e0d89..b5856feb3 100644 --- a/integration/resources/expected/combination/connector_sfn_to_sns_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_sns_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_sqs_write.json b/integration/resources/expected/combination/connector_sfn_to_sqs_write.json index caf304a39..1da63e974 100644 --- a/integration/resources/expected/combination/connector_sfn_to_sqs_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_sqs_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_table_read.json b/integration/resources/expected/combination/connector_sfn_to_table_read.json index 3286c575a..60ff63c83 100644 --- a/integration/resources/expected/combination/connector_sfn_to_table_read.json +++ b/integration/resources/expected/combination/connector_sfn_to_table_read.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_table_write.json b/integration/resources/expected/combination/connector_sfn_to_table_write.json index 3286c575a..60ff63c83 100644 --- a/integration/resources/expected/combination/connector_sfn_to_table_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_table_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sns_to_function_write.json b/integration/resources/expected/combination/connector_sns_to_function_write.json index 6292b7a9e..2c5362378 100644 --- a/integration/resources/expected/combination/connector_sns_to_function_write.json +++ b/integration/resources/expected/combination/connector_sns_to_function_write.json @@ -31,4 +31,4 @@ "LogicalResourceId": "ConnectorNotTestedPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sqs_to_function.json b/integration/resources/expected/combination/connector_sqs_to_function.json index ffe320b5f..714d4bf96 100644 --- a/integration/resources/expected/combination/connector_sqs_to_function.json +++ b/integration/resources/expected/combination/connector_sqs_to_function.json @@ -31,4 +31,4 @@ "LogicalResourceId": "SQSEventSourceMapping", "ResourceType": "AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_table_to_function_read.json b/integration/resources/expected/combination/connector_table_to_function_read.json index 97c4bf221..6c18147ca 100644 --- a/integration/resources/expected/combination/connector_table_to_function_read.json +++ b/integration/resources/expected/combination/connector_table_to_function_read.json @@ -35,4 +35,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_topic_to_queue_write.json b/integration/resources/expected/combination/connector_topic_to_queue_write.json index df5d7545b..ae426670c 100644 --- a/integration/resources/expected/combination/connector_topic_to_queue_write.json +++ b/integration/resources/expected/combination/connector_topic_to_queue_write.json @@ -27,4 +27,4 @@ "LogicalResourceId": "Connector3Policy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/depends_on.json b/integration/resources/expected/combination/depends_on.json index 7c4a4a034..f927bcd22 100644 --- a/integration/resources/expected/combination/depends_on.json +++ b/integration/resources/expected/combination/depends_on.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"LambdaRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"LambdaRolePolicy", "ResourceType":"AWS::IAM::Policy" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "LambdaRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "LambdaRolePolicy", + "ResourceType": "AWS::IAM::Policy" + } +] diff --git a/integration/resources/expected/combination/function_with_alias.json b/integration/resources/expected/combination/function_with_alias.json index c87908d15..af92023eb 100644 --- a/integration/resources/expected/combination/function_with_alias.json +++ b/integration/resources/expected/combination/function_with_alias.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + } +] diff --git a/integration/resources/expected/combination/function_with_alias_and_event_sources.json b/integration/resources/expected/combination/function_with_alias_and_event_sources.json index 178938026..beb13ad46 100644 --- a/integration/resources/expected/combination/function_with_alias_and_event_sources.json +++ b/integration/resources/expected/combination/function_with_alias_and_event_sources.json @@ -1,27 +1,102 @@ [ - { "LogicalResourceId":"MyAwesomeFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyAwesomeFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyAwesomeFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyAwesomeFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"MyAwesomeFunctionDDBStream", "ResourceType":"AWS::Lambda::EventSourceMapping" }, - { "LogicalResourceId":"MyAwesomeFunctionExplicitApiPermissionDev", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionKinesisStream", "ResourceType":"AWS::Lambda::EventSourceMapping" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyAwesomeFunctionCWSchedule", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"Stream", "ResourceType":"AWS::Kinesis::Stream" }, - { "LogicalResourceId":"MyAwesomeFunctionS3TriggerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ExistingRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyAwesomeFunctionNotificationTopic", "ResourceType":"AWS::SNS::Subscription" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ExistingRestApiDevStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyAwesomeFunctionCWSchedulePermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyTable", "ResourceType":"AWS::DynamoDB::Table" }, - { "LogicalResourceId":"Images", "ResourceType":"AWS::S3::Bucket" }, - { "LogicalResourceId":"ExistingRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyAwesomeFunctionCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyAwesomeFunctionCWEventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionNotificationTopicPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"Notifications", "ResourceType":"AWS::SNS::Topic" }, - { "LogicalResourceId":"MyAwesomeFunctionImplicitApiPermissionProd", "ResourceType":"AWS::Lambda::Permission" } -] \ No newline at end of file + { + "LogicalResourceId": "MyAwesomeFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyAwesomeFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyAwesomeFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyAwesomeFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "MyAwesomeFunctionDDBStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + }, + { + "LogicalResourceId": "MyAwesomeFunctionExplicitApiPermissionDev", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionKinesisStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWSchedule", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "Stream", + "ResourceType": "AWS::Kinesis::Stream" + }, + { + "LogicalResourceId": "MyAwesomeFunctionS3TriggerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ExistingRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyAwesomeFunctionNotificationTopic", + "ResourceType": "AWS::SNS::Subscription" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ExistingRestApiDevStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWSchedulePermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyTable", + "ResourceType": "AWS::DynamoDB::Table" + }, + { + "LogicalResourceId": "Images", + "ResourceType": "AWS::S3::Bucket" + }, + { + "LogicalResourceId": "ExistingRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWEventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionNotificationTopicPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "Notifications", + "ResourceType": "AWS::SNS::Topic" + }, + { + "LogicalResourceId": "MyAwesomeFunctionImplicitApiPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + } +] diff --git a/integration/resources/expected/combination/function_with_alias_globals.json b/integration/resources/expected/combination/function_with_alias_globals.json index a8de059ba..64e5fdacb 100644 --- a/integration/resources/expected/combination/function_with_alias_globals.json +++ b/integration/resources/expected/combination/function_with_alias_globals.json @@ -1,10 +1,34 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasprod", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"FunctionWithOverride", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"FunctionWithOverrideRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"FunctionWithOverrideAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"FunctionWithOverrideVersion", "ResourceType":"AWS::Lambda::Version" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasprod", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "FunctionWithOverride", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "FunctionWithOverrideRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "FunctionWithOverrideAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "FunctionWithOverrideVersion", + "ResourceType": "AWS::Lambda::Version" + } +] diff --git a/integration/resources/expected/combination/function_with_alias_intrinsics.json b/integration/resources/expected/combination/function_with_alias_intrinsics.json index c87908d15..af92023eb 100644 --- a/integration/resources/expected/combination/function_with_alias_intrinsics.json +++ b/integration/resources/expected/combination/function_with_alias_intrinsics.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + } +] diff --git a/integration/resources/expected/combination/function_with_all_event_types.json b/integration/resources/expected/combination/function_with_all_event_types.json index fc771413b..c4bcca3e5 100644 --- a/integration/resources/expected/combination/function_with_all_event_types.json +++ b/integration/resources/expected/combination/function_with_all_event_types.json @@ -1,31 +1,118 @@ [ - { "LogicalResourceId":"FunctionOne", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"FunctionOneRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"FunctionOneImageBucketPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"Images", "ResourceType":"AWS::S3::Bucket" }, - { "LogicalResourceId":"Notifications", "ResourceType":"AWS::SNS::Topic" }, - { "LogicalResourceId":"CloudWatchLambdaLogsGroup", "ResourceType":"AWS::Logs::LogGroup" }, - { "LogicalResourceId":"MyStream", "ResourceType":"AWS::Kinesis::Stream" }, - { "LogicalResourceId":"MyDynamoDB", "ResourceType":"AWS::DynamoDB::Table" }, - { "LogicalResourceId":"MyAwesomeFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyAwesomeFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyAwesomeFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"MyAwesomeFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyAwesomeFunctionCWSchedule", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyAwesomeFunctionCWSchedulePermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionIoTRule", "ResourceType":"AWS::IoT::TopicRule" }, - { "LogicalResourceId":"MyAwesomeFunctionIoTRulePermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyAwesomeFunctionCWEventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionS3TriggerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionNotificationTopic", "ResourceType":"AWS::SNS::Subscription" }, - { "LogicalResourceId":"MyAwesomeFunctionNotificationTopicPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionApiEventPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionCWLog", "ResourceType":"AWS::Logs::SubscriptionFilter" }, - { "LogicalResourceId":"MyAwesomeFunctionCWLogPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyAwesomeFunctionKinesisStream", "ResourceType":"AWS::Lambda::EventSourceMapping" }, - { "LogicalResourceId":"MyAwesomeFunctionDDBStream", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "FunctionOne", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "FunctionOneRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "FunctionOneImageBucketPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "Images", + "ResourceType": "AWS::S3::Bucket" + }, + { + "LogicalResourceId": "Notifications", + "ResourceType": "AWS::SNS::Topic" + }, + { + "LogicalResourceId": "CloudWatchLambdaLogsGroup", + "ResourceType": "AWS::Logs::LogGroup" + }, + { + "LogicalResourceId": "MyStream", + "ResourceType": "AWS::Kinesis::Stream" + }, + { + "LogicalResourceId": "MyDynamoDB", + "ResourceType": "AWS::DynamoDB::Table" + }, + { + "LogicalResourceId": "MyAwesomeFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyAwesomeFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyAwesomeFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "MyAwesomeFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWSchedule", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWSchedulePermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionIoTRule", + "ResourceType": "AWS::IoT::TopicRule" + }, + { + "LogicalResourceId": "MyAwesomeFunctionIoTRulePermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWEventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionS3TriggerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionNotificationTopic", + "ResourceType": "AWS::SNS::Subscription" + }, + { + "LogicalResourceId": "MyAwesomeFunctionNotificationTopicPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionApiEventPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWLog", + "ResourceType": "AWS::Logs::SubscriptionFilter" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWLogPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyAwesomeFunctionKinesisStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + }, + { + "LogicalResourceId": "MyAwesomeFunctionDDBStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_all_event_types_condition_false.json b/integration/resources/expected/combination/function_with_all_event_types_condition_false.json index 7fd7c6312..071ebf887 100644 --- a/integration/resources/expected/combination/function_with_all_event_types_condition_false.json +++ b/integration/resources/expected/combination/function_with_all_event_types_condition_false.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"FunctionOne", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"FunctionOneRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"FunctionOneImageBucketPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"Images", "ResourceType":"AWS::S3::Bucket" } -] \ No newline at end of file + { + "LogicalResourceId": "FunctionOne", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "FunctionOneRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "FunctionOneImageBucketPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "Images", + "ResourceType": "AWS::S3::Bucket" + } +] diff --git a/integration/resources/expected/combination/function_with_api.json b/integration/resources/expected/combination/function_with_api.json index 8fb2e128c..b0ac39a30 100644 --- a/integration/resources/expected/combination/function_with_api.json +++ b/integration/resources/expected/combination/function_with_api.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionPostApiPermissionDev", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermissionDev", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ExistingRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ExistingRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ExistingRestApiDevStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionPostApiPermissionDev", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermissionDev", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ExistingRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ExistingRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ExistingRestApiDevStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/function_with_application.json b/integration/resources/expected/combination/function_with_application.json index c90dda99e..bad7fc3ae 100644 --- a/integration/resources/expected/combination/function_with_application.json +++ b/integration/resources/expected/combination/function_with_application.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyNestedApp", "ResourceType":"AWS::CloudFormation::Stack" }, - { "LogicalResourceId":"MyLambdaFunctionWithApplication", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionWithApplicationRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyNestedApp", + "ResourceType": "AWS::CloudFormation::Stack" + }, + { + "LogicalResourceId": "MyLambdaFunctionWithApplication", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionWithApplicationRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_cloudwatch_log.json b/integration/resources/expected/combination/function_with_cloudwatch_log.json index 96648fa98..27654f893 100644 --- a/integration/resources/expected/combination/function_with_cloudwatch_log.json +++ b/integration/resources/expected/combination/function_with_cloudwatch_log.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionLogProcessorPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"CloudWatchLambdaLogsGroup", "ResourceType":"AWS::Logs::LogGroup" }, - { "LogicalResourceId":"MyLambdaFunctionLogProcessor", "ResourceType":"AWS::Logs::SubscriptionFilter" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionLogProcessorPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "CloudWatchLambdaLogsGroup", + "ResourceType": "AWS::Logs::LogGroup" + }, + { + "LogicalResourceId": "MyLambdaFunctionLogProcessor", + "ResourceType": "AWS::Logs::SubscriptionFilter" + } +] diff --git a/integration/resources/expected/combination/function_with_custom_code_deploy.json b/integration/resources/expected/combination/function_with_custom_code_deploy.json index 8b2a29691..2fb3d043d 100644 --- a/integration/resources/expected/combination/function_with_custom_code_deploy.json +++ b/integration/resources/expected/combination/function_with_custom_code_deploy.json @@ -1,10 +1,34 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"ServerlessDeploymentApplication", "ResourceType":"AWS::CodeDeploy::Application" }, - { "LogicalResourceId":"MyLambdaFunctionDeploymentGroup", "ResourceType":"AWS::CodeDeploy::DeploymentGroup" }, - { "LogicalResourceId":"DeploymentRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"CustomDeploymentConfig", "ResourceType":"AWS::CodeDeploy::DeploymentConfig" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "ServerlessDeploymentApplication", + "ResourceType": "AWS::CodeDeploy::Application" + }, + { + "LogicalResourceId": "MyLambdaFunctionDeploymentGroup", + "ResourceType": "AWS::CodeDeploy::DeploymentGroup" + }, + { + "LogicalResourceId": "DeploymentRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "CustomDeploymentConfig", + "ResourceType": "AWS::CodeDeploy::DeploymentConfig" + } +] diff --git a/integration/resources/expected/combination/function_with_cwe_dlq_and_retry_policy.json b/integration/resources/expected/combination/function_with_cwe_dlq_and_retry_policy.json index 35a00939c..5915c182a 100644 --- a/integration/resources/expected/combination/function_with_cwe_dlq_and_retry_policy.json +++ b/integration/resources/expected/combination/function_with_cwe_dlq_and_retry_policy.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyLambdaFunctionCWEventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyDeadLetterQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyLambdaFunctionCWEventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyDeadLetterQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/combination/function_with_cwe_dlq_generated.json b/integration/resources/expected/combination/function_with_cwe_dlq_generated.json index bc5511772..382d98e23 100644 --- a/integration/resources/expected/combination/function_with_cwe_dlq_generated.json +++ b/integration/resources/expected/combination/function_with_cwe_dlq_generated.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyLambdaFunctionCWEventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyDlq", "ResourceType":"AWS::SQS::Queue" }, - { "LogicalResourceId":"MyLambdaFunctionCWEventQueuePolicy", "ResourceType":"AWS::SQS::QueuePolicy" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyLambdaFunctionCWEventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyDlq", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MyLambdaFunctionCWEventQueuePolicy", + "ResourceType": "AWS::SQS::QueuePolicy" + } +] diff --git a/integration/resources/expected/combination/function_with_deployment_alarms_and_hooks.json b/integration/resources/expected/combination/function_with_deployment_alarms_and_hooks.json index d5a161172..b7c59d3fc 100644 --- a/integration/resources/expected/combination/function_with_deployment_alarms_and_hooks.json +++ b/integration/resources/expected/combination/function_with_deployment_alarms_and_hooks.json @@ -1,16 +1,58 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"PreTrafficFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"PreTrafficFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"PostTrafficFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"PostTrafficFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"ServerlessDeploymentApplication", "ResourceType":"AWS::CodeDeploy::Application" }, - { "LogicalResourceId":"MyLambdaFunctionDeploymentGroup", "ResourceType":"AWS::CodeDeploy::DeploymentGroup" }, - { "LogicalResourceId":"DeploymentRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"FunctionErrorsAlarm", "ResourceType":"AWS::CloudWatch::Alarm" }, - { "LogicalResourceId":"AliasErrorsAlarm", "ResourceType":"AWS::CloudWatch::Alarm" }, - { "LogicalResourceId":"NewVersionErrorsAlarm", "ResourceType":"AWS::CloudWatch::Alarm" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "PreTrafficFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "PreTrafficFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "PostTrafficFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "PostTrafficFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "ServerlessDeploymentApplication", + "ResourceType": "AWS::CodeDeploy::Application" + }, + { + "LogicalResourceId": "MyLambdaFunctionDeploymentGroup", + "ResourceType": "AWS::CodeDeploy::DeploymentGroup" + }, + { + "LogicalResourceId": "DeploymentRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "FunctionErrorsAlarm", + "ResourceType": "AWS::CloudWatch::Alarm" + }, + { + "LogicalResourceId": "AliasErrorsAlarm", + "ResourceType": "AWS::CloudWatch::Alarm" + }, + { + "LogicalResourceId": "NewVersionErrorsAlarm", + "ResourceType": "AWS::CloudWatch::Alarm" + } +] diff --git a/integration/resources/expected/combination/function_with_deployment_basic.json b/integration/resources/expected/combination/function_with_deployment_basic.json index 4aa5ea974..76e6c4484 100644 --- a/integration/resources/expected/combination/function_with_deployment_basic.json +++ b/integration/resources/expected/combination/function_with_deployment_basic.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"ServerlessDeploymentApplication", "ResourceType":"AWS::CodeDeploy::Application" }, - { "LogicalResourceId":"MyLambdaFunctionDeploymentGroup", "ResourceType":"AWS::CodeDeploy::DeploymentGroup" }, - { "LogicalResourceId":"DeploymentRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "ServerlessDeploymentApplication", + "ResourceType": "AWS::CodeDeploy::Application" + }, + { + "LogicalResourceId": "MyLambdaFunctionDeploymentGroup", + "ResourceType": "AWS::CodeDeploy::DeploymentGroup" + }, + { + "LogicalResourceId": "DeploymentRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_deployment_default_role_managed_policy.json b/integration/resources/expected/combination/function_with_deployment_default_role_managed_policy.json index 2b061ccf4..20cce17a1 100644 --- a/integration/resources/expected/combination/function_with_deployment_default_role_managed_policy.json +++ b/integration/resources/expected/combination/function_with_deployment_default_role_managed_policy.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"ServerlessDeploymentApplication", "ResourceType":"AWS::CodeDeploy::Application" }, - { "LogicalResourceId":"MyLambdaFunctionDeploymentGroup", "ResourceType":"AWS::CodeDeploy::DeploymentGroup" }, - { "LogicalResourceId":"CodeDeployServiceRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "ServerlessDeploymentApplication", + "ResourceType": "AWS::CodeDeploy::Application" + }, + { + "LogicalResourceId": "MyLambdaFunctionDeploymentGroup", + "ResourceType": "AWS::CodeDeploy::DeploymentGroup" + }, + { + "LogicalResourceId": "CodeDeployServiceRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_deployment_disabled.json b/integration/resources/expected/combination/function_with_deployment_disabled.json index 77ca0a93c..9a3f23079 100644 --- a/integration/resources/expected/combination/function_with_deployment_disabled.json +++ b/integration/resources/expected/combination/function_with_deployment_disabled.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"DeploymentRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "DeploymentRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_deployment_globals.json b/integration/resources/expected/combination/function_with_deployment_globals.json index 4aa5ea974..76e6c4484 100644 --- a/integration/resources/expected/combination/function_with_deployment_globals.json +++ b/integration/resources/expected/combination/function_with_deployment_globals.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"ServerlessDeploymentApplication", "ResourceType":"AWS::CodeDeploy::Application" }, - { "LogicalResourceId":"MyLambdaFunctionDeploymentGroup", "ResourceType":"AWS::CodeDeploy::DeploymentGroup" }, - { "LogicalResourceId":"DeploymentRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "ServerlessDeploymentApplication", + "ResourceType": "AWS::CodeDeploy::Application" + }, + { + "LogicalResourceId": "MyLambdaFunctionDeploymentGroup", + "ResourceType": "AWS::CodeDeploy::DeploymentGroup" + }, + { + "LogicalResourceId": "DeploymentRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_dynamodb.json b/integration/resources/expected/combination/function_with_dynamodb.json index b76de6e5f..c0fcd935c 100644 --- a/integration/resources/expected/combination/function_with_dynamodb.json +++ b/integration/resources/expected/combination/function_with_dynamodb.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyTable", "ResourceType":"AWS::DynamoDB::Table" }, - { "LogicalResourceId":"MyLambdaFunctionDdbStream", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyTable", + "ResourceType": "AWS::DynamoDB::Table" + }, + { + "LogicalResourceId": "MyLambdaFunctionDdbStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_file_system_config.json b/integration/resources/expected/combination/function_with_file_system_config.json index 6d5b273af..9ce62bd95 100644 --- a/integration/resources/expected/combination/function_with_file_system_config.json +++ b/integration/resources/expected/combination/function_with_file_system_config.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"EfsFileSystem", "ResourceType":"AWS::EFS::FileSystem" }, - { "LogicalResourceId":"MountTarget", "ResourceType":"AWS::EFS::MountTarget" }, - { "LogicalResourceId":"AccessPoint", "ResourceType":"AWS::EFS::AccessPoint" }, - { "LogicalResourceId":"LambdaFunctionWithEfs", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MySecurityGroup", "ResourceType":"AWS::EC2::SecurityGroup" }, - { "LogicalResourceId":"LambdaFunctionWithEfsRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "EfsFileSystem", + "ResourceType": "AWS::EFS::FileSystem" + }, + { + "LogicalResourceId": "MountTarget", + "ResourceType": "AWS::EFS::MountTarget" + }, + { + "LogicalResourceId": "AccessPoint", + "ResourceType": "AWS::EFS::AccessPoint" + }, + { + "LogicalResourceId": "LambdaFunctionWithEfs", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MySecurityGroup", + "ResourceType": "AWS::EC2::SecurityGroup" + }, + { + "LogicalResourceId": "LambdaFunctionWithEfsRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_http_api.json b/integration/resources/expected/combination/function_with_http_api.json index 7f6ef2926..0c7a8e27d 100644 --- a/integration/resources/expected/combination/function_with_http_api.json +++ b/integration/resources/expected/combination/function_with_http_api.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"MyApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } +] diff --git a/integration/resources/expected/combination/function_with_http_api_default_path.json b/integration/resources/expected/combination/function_with_http_api_default_path.json index 7f6ef2926..0c7a8e27d 100644 --- a/integration/resources/expected/combination/function_with_http_api_default_path.json +++ b/integration/resources/expected/combination/function_with_http_api_default_path.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"MyApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } +] diff --git a/integration/resources/expected/combination/function_with_implicit_api_and_conditions.json b/integration/resources/expected/combination/function_with_implicit_api_and_conditions.json index 41048af23..6f1a766d7 100644 --- a/integration/resources/expected/combination/function_with_implicit_api_and_conditions.json +++ b/integration/resources/expected/combination/function_with_implicit_api_and_conditions.json @@ -1,14 +1,50 @@ [ - { "LogicalResourceId":"helloworld4", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"helloworld4Role", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"helloworld4ApiEventPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"helloworld6", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"helloworld6Role", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"helloworld6ApiEventPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"helloworld8", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"helloworld8Role", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"helloworld8ApiEventPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "helloworld4", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "helloworld4Role", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "helloworld4ApiEventPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "helloworld6", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "helloworld6Role", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "helloworld6ApiEventPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "helloworld8", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "helloworld8Role", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "helloworld8ApiEventPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/function_with_implicit_http_api.json b/integration/resources/expected/combination/function_with_implicit_http_api.json index 60b6bd921..f7051e22b 100644 --- a/integration/resources/expected/combination/function_with_implicit_http_api.json +++ b/integration/resources/expected/combination/function_with_implicit_http_api.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessHttpApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"ServerlessHttpApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessHttpApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "ServerlessHttpApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } +] diff --git a/integration/resources/expected/combination/function_with_kinesis.json b/integration/resources/expected/combination/function_with_kinesis.json index 64511cfc4..c2838a9b2 100644 --- a/integration/resources/expected/combination/function_with_kinesis.json +++ b/integration/resources/expected/combination/function_with_kinesis.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStream", "ResourceType":"AWS::Kinesis::Stream" }, - { "LogicalResourceId":"MyLambdaFunctionKinesisStream", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStream", + "ResourceType": "AWS::Kinesis::Stream" + }, + { + "LogicalResourceId": "MyLambdaFunctionKinesisStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_kinesis_intrinsics.json b/integration/resources/expected/combination/function_with_kinesis_intrinsics.json index 64511cfc4..c2838a9b2 100644 --- a/integration/resources/expected/combination/function_with_kinesis_intrinsics.json +++ b/integration/resources/expected/combination/function_with_kinesis_intrinsics.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStream", "ResourceType":"AWS::Kinesis::Stream" }, - { "LogicalResourceId":"MyLambdaFunctionKinesisStream", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStream", + "ResourceType": "AWS::Kinesis::Stream" + }, + { + "LogicalResourceId": "MyLambdaFunctionKinesisStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_layer.json b/integration/resources/expected/combination/function_with_layer.json index 05716338a..1f50aba61 100644 --- a/integration/resources/expected/combination/function_with_layer.json +++ b/integration/resources/expected/combination/function_with_layer.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyLambdaFunctionWithLayer", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionWithLayerRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaLayer", "ResourceType":"AWS::Lambda::LayerVersion" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunctionWithLayer", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionWithLayerRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaLayer", + "ResourceType": "AWS::Lambda::LayerVersion" + } +] diff --git a/integration/resources/expected/combination/function_with_mq.json b/integration/resources/expected/combination/function_with_mq.json index 09f23b169..400d440d8 100644 --- a/integration/resources/expected/combination/function_with_mq.json +++ b/integration/resources/expected/combination/function_with_mq.json @@ -1,11 +1,38 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaExecutionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"PublicSubnetRouteTableAssociation", "ResourceType":"AWS::EC2::SubnetRouteTableAssociation" }, - { "LogicalResourceId":"MQSecurityGroup", "ResourceType":"AWS::EC2::SecurityGroup" }, - { "LogicalResourceId":"MyMqBroker", "ResourceType":"AWS::AmazonMQ::Broker" }, - { "LogicalResourceId":"RouteTable", "ResourceType":"AWS::EC2::RouteTable" }, - { "LogicalResourceId":"MQBrokerUserSecret", "ResourceType":"AWS::SecretsManager::Secret" }, - { "LogicalResourceId":"MyLambdaFunctionMyMqEvent", "ResourceType":"AWS::Lambda::EventSourceMapping" }, - { "LogicalResourceId":"Route", "ResourceType":"AWS::EC2::Route" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaExecutionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "PublicSubnetRouteTableAssociation", + "ResourceType": "AWS::EC2::SubnetRouteTableAssociation" + }, + { + "LogicalResourceId": "MQSecurityGroup", + "ResourceType": "AWS::EC2::SecurityGroup" + }, + { + "LogicalResourceId": "MyMqBroker", + "ResourceType": "AWS::AmazonMQ::Broker" + }, + { + "LogicalResourceId": "RouteTable", + "ResourceType": "AWS::EC2::RouteTable" + }, + { + "LogicalResourceId": "MQBrokerUserSecret", + "ResourceType": "AWS::SecretsManager::Secret" + }, + { + "LogicalResourceId": "MyLambdaFunctionMyMqEvent", + "ResourceType": "AWS::Lambda::EventSourceMapping" + }, + { + "LogicalResourceId": "Route", + "ResourceType": "AWS::EC2::Route" + } +] diff --git a/integration/resources/expected/combination/function_with_mq_using_autogen_role.json b/integration/resources/expected/combination/function_with_mq_using_autogen_role.json index d486b2323..3bad71500 100644 --- a/integration/resources/expected/combination/function_with_mq_using_autogen_role.json +++ b/integration/resources/expected/combination/function_with_mq_using_autogen_role.json @@ -1,11 +1,38 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"PublicSubnetRouteTableAssociation", "ResourceType":"AWS::EC2::SubnetRouteTableAssociation" }, - { "LogicalResourceId":"MQSecurityGroup", "ResourceType":"AWS::EC2::SecurityGroup" }, - { "LogicalResourceId":"MyMqBroker", "ResourceType":"AWS::AmazonMQ::Broker" }, - { "LogicalResourceId":"RouteTable", "ResourceType":"AWS::EC2::RouteTable" }, - { "LogicalResourceId":"MQBrokerUserSecret", "ResourceType":"AWS::SecretsManager::Secret" }, - { "LogicalResourceId":"MyLambdaFunctionMyMqEvent", "ResourceType":"AWS::Lambda::EventSourceMapping" }, - { "LogicalResourceId":"Route", "ResourceType":"AWS::EC2::Route" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "PublicSubnetRouteTableAssociation", + "ResourceType": "AWS::EC2::SubnetRouteTableAssociation" + }, + { + "LogicalResourceId": "MQSecurityGroup", + "ResourceType": "AWS::EC2::SecurityGroup" + }, + { + "LogicalResourceId": "MyMqBroker", + "ResourceType": "AWS::AmazonMQ::Broker" + }, + { + "LogicalResourceId": "RouteTable", + "ResourceType": "AWS::EC2::RouteTable" + }, + { + "LogicalResourceId": "MQBrokerUserSecret", + "ResourceType": "AWS::SecretsManager::Secret" + }, + { + "LogicalResourceId": "MyLambdaFunctionMyMqEvent", + "ResourceType": "AWS::Lambda::EventSourceMapping" + }, + { + "LogicalResourceId": "Route", + "ResourceType": "AWS::EC2::Route" + } +] diff --git a/integration/resources/expected/combination/function_with_msk.json b/integration/resources/expected/combination/function_with_msk.json index f39a0f703..c0b6d8162 100644 --- a/integration/resources/expected/combination/function_with_msk.json +++ b/integration/resources/expected/combination/function_with_msk.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyMskStreamProcessor", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaExecutionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyMskCluster", "ResourceType":"AWS::MSK::Cluster" }, - { "LogicalResourceId":"MyMskStreamProcessorMyMskEvent", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "MyMskStreamProcessor", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaExecutionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyMskCluster", + "ResourceType": "AWS::MSK::Cluster" + }, + { + "LogicalResourceId": "MyMskStreamProcessorMyMskEvent", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_msk_using_managed_policy.json b/integration/resources/expected/combination/function_with_msk_using_managed_policy.json index 04a09de04..a17f16c86 100644 --- a/integration/resources/expected/combination/function_with_msk_using_managed_policy.json +++ b/integration/resources/expected/combination/function_with_msk_using_managed_policy.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyMskStreamProcessor", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyMskStreamProcessorRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyMskCluster", "ResourceType":"AWS::MSK::Cluster" }, - { "LogicalResourceId":"MyMskStreamProcessorMyMskEvent", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "MyMskStreamProcessor", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyMskStreamProcessorRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyMskCluster", + "ResourceType": "AWS::MSK::Cluster" + }, + { + "LogicalResourceId": "MyMskStreamProcessorMyMskEvent", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_policy_templates.json b/integration/resources/expected/combination/function_with_policy_templates.json index 1bd08615e..fa491013e 100644 --- a/integration/resources/expected/combination/function_with_policy_templates.json +++ b/integration/resources/expected/combination/function_with_policy_templates.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/combination/function_with_resource_refs.json b/integration/resources/expected/combination/function_with_resource_refs.json index d7c8494cb..5b8046406 100644 --- a/integration/resources/expected/combination/function_with_resource_refs.json +++ b/integration/resources/expected/combination/function_with_resource_refs.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"MyOtherFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyOtherFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "MyOtherFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyOtherFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_s3.json b/integration/resources/expected/combination/function_with_s3.json index 7f0714302..cc3c250cb 100644 --- a/integration/resources/expected/combination/function_with_s3.json +++ b/integration/resources/expected/combination/function_with_s3.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionS3EventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyBucket", "ResourceType":"AWS::S3::Bucket" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionS3EventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyBucket", + "ResourceType": "AWS::S3::Bucket" + } +] diff --git a/integration/resources/expected/combination/function_with_s3_intrinsics.json b/integration/resources/expected/combination/function_with_s3_intrinsics.json index 2fdb0626a..cc3c250cb 100644 --- a/integration/resources/expected/combination/function_with_s3_intrinsics.json +++ b/integration/resources/expected/combination/function_with_s3_intrinsics.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyBucket", "ResourceType": "AWS::S3::Bucket" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/function_with_schedule.json b/integration/resources/expected/combination/function_with_schedule.json index 86e067c17..b6d38b7e4 100644 --- a/integration/resources/expected/combination/function_with_schedule.json +++ b/integration/resources/expected/combination/function_with_schedule.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionRepeat", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyLambdaFunctionRepeatPermission", "ResourceType":"AWS::Lambda::Permission" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeat", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeatPermission", + "ResourceType": "AWS::Lambda::Permission" + } +] diff --git a/integration/resources/expected/combination/function_with_schedule_dlq_and_retry_policy.json b/integration/resources/expected/combination/function_with_schedule_dlq_and_retry_policy.json index e0d7734e0..c966d4808 100644 --- a/integration/resources/expected/combination/function_with_schedule_dlq_and_retry_policy.json +++ b/integration/resources/expected/combination/function_with_schedule_dlq_and_retry_policy.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionRepeat", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyLambdaFunctionRepeatPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyDeadLetterQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeat", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeatPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyDeadLetterQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/combination/function_with_schedule_dlq_generated.json b/integration/resources/expected/combination/function_with_schedule_dlq_generated.json index bd0044265..b60c4c8e0 100644 --- a/integration/resources/expected/combination/function_with_schedule_dlq_generated.json +++ b/integration/resources/expected/combination/function_with_schedule_dlq_generated.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionRepeat", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyLambdaFunctionRepeatPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionRepeatQueue", "ResourceType":"AWS::SQS::Queue" }, - { "LogicalResourceId":"MyLambdaFunctionRepeatQueuePolicy", "ResourceType":"AWS::SQS::QueuePolicy" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeat", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeatPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeatQueue", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeatQueuePolicy", + "ResourceType": "AWS::SQS::QueuePolicy" + } +] diff --git a/integration/resources/expected/combination/function_with_self_managed_kafka.json b/integration/resources/expected/combination/function_with_self_managed_kafka.json index 9cf382960..4e39134ce 100644 --- a/integration/resources/expected/combination/function_with_self_managed_kafka.json +++ b/integration/resources/expected/combination/function_with_self_managed_kafka.json @@ -15,4 +15,4 @@ "LogicalResourceId": "KafkaUserSecret", "ResourceType": "AWS::SecretsManager::Secret" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/function_with_self_managed_kafka_intrinsics.json b/integration/resources/expected/combination/function_with_self_managed_kafka_intrinsics.json index f4d3f90a5..352af6de6 100644 --- a/integration/resources/expected/combination/function_with_self_managed_kafka_intrinsics.json +++ b/integration/resources/expected/combination/function_with_self_managed_kafka_intrinsics.json @@ -15,4 +15,4 @@ "LogicalResourceId": "KafkaUserSecret", "ResourceType": "AWS::SecretsManager::Secret" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/function_with_signing_profile.json b/integration/resources/expected/combination/function_with_signing_profile.json index 028381361..e9e693ef8 100644 --- a/integration/resources/expected/combination/function_with_signing_profile.json +++ b/integration/resources/expected/combination/function_with_signing_profile.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyUnsignedLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyUnsignedLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MySigningProfile", "ResourceType":"AWS::Signer::SigningProfile" }, - { "LogicalResourceId":"MySignedFunctionCodeSigningConfig", "ResourceType":"AWS::Lambda::CodeSigningConfig" } -] \ No newline at end of file + { + "LogicalResourceId": "MyUnsignedLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyUnsignedLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MySigningProfile", + "ResourceType": "AWS::Signer::SigningProfile" + }, + { + "LogicalResourceId": "MySignedFunctionCodeSigningConfig", + "ResourceType": "AWS::Lambda::CodeSigningConfig" + } +] diff --git a/integration/resources/expected/combination/function_with_sns.json b/integration/resources/expected/combination/function_with_sns.json index d7d511135..90c98cb4a 100644 --- a/integration/resources/expected/combination/function_with_sns.json +++ b/integration/resources/expected/combination/function_with_sns.json @@ -1,11 +1,38 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionSNSEventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MySnsTopic", "ResourceType":"AWS::SNS::Topic" }, - { "LogicalResourceId":"MyLambdaFunctionSQSSubscriptionEvent", "ResourceType":"AWS::SNS::Subscription" }, - { "LogicalResourceId":"MyLambdaFunctionSQSSubscriptionEventQueue", "ResourceType":"AWS::SQS::Queue" }, - { "LogicalResourceId":"MyLambdaFunctionSQSSubscriptionEventEventSourceMapping", "ResourceType":"AWS::Lambda::EventSourceMapping" }, - { "LogicalResourceId":"MyLambdaFunctionSQSSubscriptionEventQueuePolicy", "ResourceType":"AWS::SQS::QueuePolicy" }, - { "LogicalResourceId":"MyLambdaFunctionSNSEvent", "ResourceType":"AWS::SNS::Subscription" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionSNSEventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MySnsTopic", + "ResourceType": "AWS::SNS::Topic" + }, + { + "LogicalResourceId": "MyLambdaFunctionSQSSubscriptionEvent", + "ResourceType": "AWS::SNS::Subscription" + }, + { + "LogicalResourceId": "MyLambdaFunctionSQSSubscriptionEventQueue", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MyLambdaFunctionSQSSubscriptionEventEventSourceMapping", + "ResourceType": "AWS::Lambda::EventSourceMapping" + }, + { + "LogicalResourceId": "MyLambdaFunctionSQSSubscriptionEventQueuePolicy", + "ResourceType": "AWS::SQS::QueuePolicy" + }, + { + "LogicalResourceId": "MyLambdaFunctionSNSEvent", + "ResourceType": "AWS::SNS::Subscription" + } +] diff --git a/integration/resources/expected/combination/function_with_sns_intrinsics.json b/integration/resources/expected/combination/function_with_sns_intrinsics.json index 8d715ef5d..eb53cd880 100644 --- a/integration/resources/expected/combination/function_with_sns_intrinsics.json +++ b/integration/resources/expected/combination/function_with_sns_intrinsics.json @@ -27,4 +27,4 @@ "LogicalResourceId": "MyLambdaFunctionSNSEventQueuePolicy", "ResourceType": "AWS::SQS::QueuePolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/function_with_sqs.json b/integration/resources/expected/combination/function_with_sqs.json index 188e4c467..ecb8dd073 100644 --- a/integration/resources/expected/combination/function_with_sqs.json +++ b/integration/resources/expected/combination/function_with_sqs.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MySqsQueueFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MySqsQueueFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MySqsQueue", "ResourceType":"AWS::SQS::Queue" }, - { "LogicalResourceId":"MySqsQueueFunctionMySqsEvent", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "MySqsQueueFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MySqsQueueFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MySqsQueue", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MySqsQueueFunctionMySqsEvent", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_userpool_event.json b/integration/resources/expected/combination/function_with_userpool_event.json index f55909f48..2aeda3e48 100644 --- a/integration/resources/expected/combination/function_with_userpool_event.json +++ b/integration/resources/expected/combination/function_with_userpool_event.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyCognitoUserPool", "ResourceType":"AWS::Cognito::UserPool" }, - { "LogicalResourceId":"PreSignupLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"PreSignupLambdaFunctionCognitoPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"PreSignupLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyCognitoUserPool", + "ResourceType": "AWS::Cognito::UserPool" + }, + { + "LogicalResourceId": "PreSignupLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "PreSignupLambdaFunctionCognitoPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "PreSignupLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/http_api_with_auth.json b/integration/resources/expected/combination/http_api_with_auth.json index 102d81d4f..8df633121 100644 --- a/integration/resources/expected/combination/http_api_with_auth.json +++ b/integration/resources/expected/combination/http_api_with_auth.json @@ -1,11 +1,38 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyAuthFn", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyAuthFnRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionPostApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionDefaultApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"MyApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyAuthFn", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyAuthFnRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionPostApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionDefaultApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } +] diff --git a/integration/resources/expected/combination/http_api_with_cors.json b/integration/resources/expected/combination/http_api_with_cors.json index 8bbb430cd..280c0bf68 100644 --- a/integration/resources/expected/combination/http_api_with_cors.json +++ b/integration/resources/expected/combination/http_api_with_cors.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"HttpApiFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"HttpApiFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"HttpApiFunctionImplicitApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessHttpApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"ServerlessHttpApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "HttpApiFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "HttpApiFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "HttpApiFunctionImplicitApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessHttpApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "ServerlessHttpApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } +] diff --git a/integration/resources/expected/combination/http_api_with_custom_domains_regional.json b/integration/resources/expected/combination/http_api_with_custom_domains_regional.json index 7c7db8ba4..c069daf32 100644 --- a/integration/resources/expected/combination/http_api_with_custom_domains_regional.json +++ b/integration/resources/expected/combination/http_api_with_custom_domains_regional.json @@ -1,12 +1,42 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApipostApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApigetApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"RecordSetGroupddfc299be2", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }, - { "LogicalResourceId":"ApiGatewayDomainNameV2e7a0af471b", "ResourceType":"AWS::ApiGatewayV2::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApipostApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApigetApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "RecordSetGroupddfc299be2", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + }, + { + "LogicalResourceId": "ApiGatewayDomainNameV2e7a0af471b", + "ResourceType": "AWS::ApiGatewayV2::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/http_api_with_custom_domains_regional_feature_toggle.json b/integration/resources/expected/combination/http_api_with_custom_domains_regional_feature_toggle.json index 9808fb950..79cd34915 100644 --- a/integration/resources/expected/combination/http_api_with_custom_domains_regional_feature_toggle.json +++ b/integration/resources/expected/combination/http_api_with_custom_domains_regional_feature_toggle.json @@ -1,12 +1,42 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApipostApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApigetApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"RecordSetGroupd17dced08c", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }, - { "LogicalResourceId":"ApiGatewayDomainNameV26198c55d75", "ResourceType":"AWS::ApiGatewayV2::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } - ] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApipostApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApigetApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "RecordSetGroupd17dced08c", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + }, + { + "LogicalResourceId": "ApiGatewayDomainNameV26198c55d75", + "ResourceType": "AWS::ApiGatewayV2::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification.json b/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification.json index cedc71649..a2cfab55a 100644 --- a/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification.json +++ b/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification.json @@ -1,12 +1,42 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApipostApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApigetApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"RecordSetGroupddfc299be2", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }, - { "LogicalResourceId":"ApiGatewayDomainNameV2804ee5e222", "ResourceType":"AWS::ApiGatewayV2::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApipostApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApigetApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "RecordSetGroupddfc299be2", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + }, + { + "LogicalResourceId": "ApiGatewayDomainNameV2804ee5e222", + "ResourceType": "AWS::ApiGatewayV2::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification_feature_toggle.json b/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification_feature_toggle.json index 3e37f7b6a..790f04e46 100644 --- a/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification_feature_toggle.json +++ b/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification_feature_toggle.json @@ -1,12 +1,42 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApipostApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApigetApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"RecordSetGroupd17dced08c", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }, - { "LogicalResourceId":"ApiGatewayDomainNameV2483cac8ea6", "ResourceType":"AWS::ApiGatewayV2::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } - ] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApipostApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApigetApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "RecordSetGroupd17dced08c", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + }, + { + "LogicalResourceId": "ApiGatewayDomainNameV2483cac8ea6", + "ResourceType": "AWS::ApiGatewayV2::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_false.json b/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_false.json index a56523556..def500717 100644 --- a/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_false.json +++ b/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_false.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_true.json b/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_true.json index a56523556..def500717 100644 --- a/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_true.json +++ b/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_true.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/implicit_api_with_settings.json b/integration/resources/expected/combination/implicit_api_with_settings.json index 0893a580e..a4a5ea763 100644 --- a/integration/resources/expected/combination/implicit_api_with_settings.json +++ b/integration/resources/expected/combination/implicit_api_with_settings.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/intrinsics_code_definition_uri.json b/integration/resources/expected/combination/intrinsics_code_definition_uri.json index 56d4435fc..b1a098656 100644 --- a/integration/resources/expected/combination/intrinsics_code_definition_uri.json +++ b/integration/resources/expected/combination/intrinsics_code_definition_uri.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiFancyNameStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiFancyNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/intrinsics_serverless_api.json b/integration/resources/expected/combination/intrinsics_serverless_api.json index 982a54335..e816637d5 100644 --- a/integration/resources/expected/combination/intrinsics_serverless_api.json +++ b/integration/resources/expected/combination/intrinsics_serverless_api.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionPostApiPermissionStage", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermissionStage", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionPostApiPermissionStage", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermissionStage", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/intrinsics_serverless_function.json b/integration/resources/expected/combination/intrinsics_serverless_function.json index ef8334560..f443a2c8d 100644 --- a/integration/resources/expected/combination/intrinsics_serverless_function.json +++ b/integration/resources/expected/combination/intrinsics_serverless_function.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyNewRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MySecurityGroup", "ResourceType":"AWS::EC2::SecurityGroup" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyNewRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MySecurityGroup", + "ResourceType": "AWS::EC2::SecurityGroup" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_api.json b/integration/resources/expected/combination/state_machine_with_api.json index 05f14d153..6317543d7 100644 --- a/integration/resources/expected/combination/state_machine_with_api.json +++ b/integration/resources/expected/combination/state_machine_with_api.json @@ -1,12 +1,42 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"ExistingRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ExistingRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ExistingRestApiDevStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyStateMachinePostApiRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineGetApiRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "ExistingRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ExistingRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ExistingRestApiDevStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyStateMachinePostApiRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineGetApiRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_cwe.json b/integration/resources/expected/combination/state_machine_with_cwe.json index ee21302f5..6f07bde56 100644 --- a/integration/resources/expected/combination/state_machine_with_cwe.json +++ b/integration/resources/expected/combination/state_machine_with_cwe.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyStateMachineCWEventRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyStateMachineCWEventRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_cwe_dlq_generated.json b/integration/resources/expected/combination/state_machine_with_cwe_dlq_generated.json index a8b630642..06151425c 100644 --- a/integration/resources/expected/combination/state_machine_with_cwe_dlq_generated.json +++ b/integration/resources/expected/combination/state_machine_with_cwe_dlq_generated.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyStateMachineCWEventRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWEventQueue", "ResourceType":"AWS::SQS::Queue" }, - { "LogicalResourceId":"MyStateMachineCWEventQueuePolicy", "ResourceType":"AWS::SQS::QueuePolicy" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyStateMachineCWEventRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWEventQueue", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MyStateMachineCWEventQueuePolicy", + "ResourceType": "AWS::SQS::QueuePolicy" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_cwe_with_dlq_and_retry_policy.json b/integration/resources/expected/combination/state_machine_with_cwe_with_dlq_and_retry_policy.json index 692dad06c..8b2ba10ae 100644 --- a/integration/resources/expected/combination/state_machine_with_cwe_with_dlq_and_retry_policy.json +++ b/integration/resources/expected/combination/state_machine_with_cwe_with_dlq_and_retry_policy.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyStateMachineCWEventRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyDeadLetterQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyStateMachineCWEventRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyDeadLetterQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_policy_templates.json b/integration/resources/expected/combination/state_machine_with_policy_templates.json index 9571f1a59..165c31d85 100644 --- a/integration/resources/expected/combination/state_machine_with_policy_templates.json +++ b/integration/resources/expected/combination/state_machine_with_policy_templates.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_schedule.json b/integration/resources/expected/combination/state_machine_with_schedule.json index 38e01119b..63814349d 100644 --- a/integration/resources/expected/combination/state_machine_with_schedule.json +++ b/integration/resources/expected/combination/state_machine_with_schedule.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWSchedule", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyStateMachineCWScheduleRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWSchedule", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyStateMachineCWScheduleRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_schedule_dlq_and_retry_policy.json b/integration/resources/expected/combination/state_machine_with_schedule_dlq_and_retry_policy.json index 94b05653d..4ef556dad 100644 --- a/integration/resources/expected/combination/state_machine_with_schedule_dlq_and_retry_policy.json +++ b/integration/resources/expected/combination/state_machine_with_schedule_dlq_and_retry_policy.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWSchedule", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyStateMachineCWScheduleRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyDeadLetterQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWSchedule", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyStateMachineCWScheduleRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyDeadLetterQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_schedule_dlq_generated.json b/integration/resources/expected/combination/state_machine_with_schedule_dlq_generated.json index 86883f534..d2b8a2afc 100644 --- a/integration/resources/expected/combination/state_machine_with_schedule_dlq_generated.json +++ b/integration/resources/expected/combination/state_machine_with_schedule_dlq_generated.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWSchedule", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyStateMachineCWScheduleRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyDlq", "ResourceType":"AWS::SQS::Queue" }, - { "LogicalResourceId":"MyStateMachineCWScheduleQueuePolicy", "ResourceType":"AWS::SQS::QueuePolicy" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWSchedule", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyStateMachineCWScheduleRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyDlq", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MyStateMachineCWScheduleQueuePolicy", + "ResourceType": "AWS::SQS::QueuePolicy" + } +] diff --git a/integration/resources/expected/single/basic_api.json b/integration/resources/expected/single/basic_api.json index d45cb8ce3..543e360fc 100644 --- a/integration/resources/expected/single/basic_api.json +++ b/integration/resources/expected/single/basic_api.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyNewStageNameStage", "ResourceType":"AWS::ApiGateway::Stage" } + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyNewStageNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + } ] diff --git a/integration/resources/expected/single/basic_api_inline_openapi.json b/integration/resources/expected/single/basic_api_inline_openapi.json index d45cb8ce3..543e360fc 100644 --- a/integration/resources/expected/single/basic_api_inline_openapi.json +++ b/integration/resources/expected/single/basic_api_inline_openapi.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyNewStageNameStage", "ResourceType":"AWS::ApiGateway::Stage" } + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyNewStageNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + } ] diff --git a/integration/resources/expected/single/basic_api_inline_swagger.json b/integration/resources/expected/single/basic_api_inline_swagger.json index d45cb8ce3..543e360fc 100644 --- a/integration/resources/expected/single/basic_api_inline_swagger.json +++ b/integration/resources/expected/single/basic_api_inline_swagger.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyNewStageNameStage", "ResourceType":"AWS::ApiGateway::Stage" } + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyNewStageNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + } ] diff --git a/integration/resources/expected/single/basic_api_inline_with_cache.json b/integration/resources/expected/single/basic_api_inline_with_cache.json index d45cb8ce3..543e360fc 100644 --- a/integration/resources/expected/single/basic_api_inline_with_cache.json +++ b/integration/resources/expected/single/basic_api_inline_with_cache.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyNewStageNameStage", "ResourceType":"AWS::ApiGateway::Stage" } + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyNewStageNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + } ] diff --git a/integration/resources/expected/single/basic_api_inline_with_tags.json b/integration/resources/expected/single/basic_api_inline_with_tags.json index 84d8e643f..07cadc936 100644 --- a/integration/resources/expected/single/basic_api_inline_with_tags.json +++ b/integration/resources/expected/single/basic_api_inline_with_tags.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiStage", "ResourceType":"AWS::ApiGateway::Stage" } + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiStage", + "ResourceType": "AWS::ApiGateway::Stage" + } ] diff --git a/integration/resources/expected/single/basic_api_with_mode.json b/integration/resources/expected/single/basic_api_with_mode.json index 15c83189e..52316975a 100644 --- a/integration/resources/expected/single/basic_api_with_mode.json +++ b/integration/resources/expected/single/basic_api_with_mode.json @@ -1,11 +1,38 @@ [ - {"LogicalResourceId": "MyApi", "ResourceType": "AWS::ApiGateway::RestApi"}, - {"LogicalResourceId": "MyApiDeployment", "ResourceType": "AWS::ApiGateway::Deployment"}, - {"LogicalResourceId": "MyApiMyNewStageNameStage", "ResourceType": "AWS::ApiGateway::Stage"}, - {"LogicalResourceId": "TestFunction", "ResourceType": "AWS::Lambda::Function"}, - {"LogicalResourceId": "TestFunctionAliaslive", "ResourceType": "AWS::Lambda::Alias"}, - {"LogicalResourceId": "TestFunctionGetPermissionMyNewStageName", "ResourceType": "AWS::Lambda::Permission"}, - {"LogicalResourceId": "TestFunctionPutPermissionMyNewStageName", "ResourceType": "AWS::Lambda::Permission"}, - {"LogicalResourceId": "TestFunctionRole", "ResourceType": "AWS::IAM::Role"}, - {"LogicalResourceId": "TestFunctionVersion", "ResourceType": "AWS::Lambda::Version"} - ] + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyNewStageNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "TestFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "TestFunctionAliaslive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "TestFunctionGetPermissionMyNewStageName", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "TestFunctionPutPermissionMyNewStageName", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "TestFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "TestFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + } +] diff --git a/integration/resources/expected/single/basic_api_with_mode_update.json b/integration/resources/expected/single/basic_api_with_mode_update.json index cc143fb24..d19a9c421 100644 --- a/integration/resources/expected/single/basic_api_with_mode_update.json +++ b/integration/resources/expected/single/basic_api_with_mode_update.json @@ -1,10 +1,34 @@ [ - {"LogicalResourceId": "MyApi", "ResourceType": "AWS::ApiGateway::RestApi"}, - {"LogicalResourceId": "MyApiDeployment", "ResourceType": "AWS::ApiGateway::Deployment"}, - {"LogicalResourceId": "MyApiMyNewStageNameStage", "ResourceType": "AWS::ApiGateway::Stage"}, - {"LogicalResourceId": "TestFunction", "ResourceType": "AWS::Lambda::Function"}, - {"LogicalResourceId": "TestFunctionAliaslive", "ResourceType": "AWS::Lambda::Alias"}, - {"LogicalResourceId": "TestFunctionPutPermissionMyNewStageName", "ResourceType": "AWS::Lambda::Permission"}, - {"LogicalResourceId": "TestFunctionRole", "ResourceType": "AWS::IAM::Role"}, - {"LogicalResourceId": "TestFunctionVersion", "ResourceType": "AWS::Lambda::Version"} - ] + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyNewStageNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "TestFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "TestFunctionAliaslive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "TestFunctionPutPermissionMyNewStageName", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "TestFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "TestFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + } +] diff --git a/integration/resources/expected/single/basic_api_with_tags.json b/integration/resources/expected/single/basic_api_with_tags.json index fde444738..3f339273e 100644 --- a/integration/resources/expected/single/basic_api_with_tags.json +++ b/integration/resources/expected/single/basic_api_with_tags.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiStage00dadc1ecc", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiStage00dadc1ecc", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/single/basic_application_s3_location.json b/integration/resources/expected/single/basic_application_s3_location.json index a033c90b7..ee7e59b89 100644 --- a/integration/resources/expected/single/basic_application_s3_location.json +++ b/integration/resources/expected/single/basic_application_s3_location.json @@ -1,3 +1,6 @@ [ - { "LogicalResourceId":"MyNestedApp", "ResourceType":"AWS::CloudFormation::Stack" } + { + "LogicalResourceId": "MyNestedApp", + "ResourceType": "AWS::CloudFormation::Stack" + } ] diff --git a/integration/resources/expected/single/basic_application_sar_location.json b/integration/resources/expected/single/basic_application_sar_location.json index a033c90b7..ee7e59b89 100644 --- a/integration/resources/expected/single/basic_application_sar_location.json +++ b/integration/resources/expected/single/basic_application_sar_location.json @@ -1,3 +1,6 @@ [ - { "LogicalResourceId":"MyNestedApp", "ResourceType":"AWS::CloudFormation::Stack" } + { + "LogicalResourceId": "MyNestedApp", + "ResourceType": "AWS::CloudFormation::Stack" + } ] diff --git a/integration/resources/expected/single/basic_application_sar_location_with_intrinsics.json b/integration/resources/expected/single/basic_application_sar_location_with_intrinsics.json index 884f93d12..421b20078 100644 --- a/integration/resources/expected/single/basic_application_sar_location_with_intrinsics.json +++ b/integration/resources/expected/single/basic_application_sar_location_with_intrinsics.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyNestedApp", "ResourceType":"AWS::CloudFormation::Stack" }, - { "LogicalResourceId":"MySns", "ResourceType":"AWS::SNS::Topic" } + { + "LogicalResourceId": "MyNestedApp", + "ResourceType": "AWS::CloudFormation::Stack" + }, + { + "LogicalResourceId": "MySns", + "ResourceType": "AWS::SNS::Topic" + } ] diff --git a/integration/resources/expected/single/basic_function.json b/integration/resources/expected/single/basic_function.json index 2cb129f54..d4dfecb35 100644 --- a/integration/resources/expected/single/basic_function.json +++ b/integration/resources/expected/single/basic_function.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } ] diff --git a/integration/resources/expected/single/basic_function_event_destinations.json b/integration/resources/expected/single/basic_function_event_destinations.json index 3588c9d13..390eaafbf 100644 --- a/integration/resources/expected/single/basic_function_event_destinations.json +++ b/integration/resources/expected/single/basic_function_event_destinations.json @@ -1,14 +1,50 @@ [ - { "LogicalResourceId":"MyTestFunction2", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyTestFunction2EventInvokeConfigOnSuccessTopic", "ResourceType":"AWS::SNS::Topic" }, - { "LogicalResourceId":"MyTestFunctionRole", "ResourceType":"AWS::IAM::Role"}, - { "LogicalResourceId":"MyTestFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyTestFunction2Aliaslive", "ResourceType":"AWS::Lambda::Alias"}, - { "LogicalResourceId":"MyTestFunctionEventInvokeConfigOnSuccessQueue", "ResourceType":"AWS::SQS::Queue"}, - { "LogicalResourceId":"MyTestFunction2Role", "ResourceType":"AWS::IAM::Role"}, - { "LogicalResourceId":"DestinationLambda", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyTestFunction2EventInvokeConfig", "ResourceType":"AWS::Lambda::EventInvokeConfig"}, - { "LogicalResourceId":"MyTestFunction2Version", "ResourceType":"AWS::Lambda::Version"}, - { "LogicalResourceId":"MyTestFunctionEventInvokeConfig", "ResourceType":"AWS::Lambda::EventInvokeConfig"}, - { "LogicalResourceId":"DestinationLambdaRole", "ResourceType":"AWS::IAM::Role"} -] \ No newline at end of file + { + "LogicalResourceId": "MyTestFunction2", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyTestFunction2EventInvokeConfigOnSuccessTopic", + "ResourceType": "AWS::SNS::Topic" + }, + { + "LogicalResourceId": "MyTestFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyTestFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyTestFunction2Aliaslive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyTestFunctionEventInvokeConfigOnSuccessQueue", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MyTestFunction2Role", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "DestinationLambda", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyTestFunction2EventInvokeConfig", + "ResourceType": "AWS::Lambda::EventInvokeConfig" + }, + { + "LogicalResourceId": "MyTestFunction2Version", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "MyTestFunctionEventInvokeConfig", + "ResourceType": "AWS::Lambda::EventInvokeConfig" + }, + { + "LogicalResourceId": "DestinationLambdaRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/single/basic_function_no_envvar.json b/integration/resources/expected/single/basic_function_no_envvar.json index 98d62e4bb..d4dfecb35 100644 --- a/integration/resources/expected/single/basic_function_no_envvar.json +++ b/integration/resources/expected/single/basic_function_no_envvar.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/single/basic_function_openapi.json b/integration/resources/expected/single/basic_function_openapi.json index 98d62e4bb..d4dfecb35 100644 --- a/integration/resources/expected/single/basic_function_openapi.json +++ b/integration/resources/expected/single/basic_function_openapi.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/single/basic_function_with_arm_architecture.json b/integration/resources/expected/single/basic_function_with_arm_architecture.json index 3e8d999df..d4dfecb35 100644 --- a/integration/resources/expected/single/basic_function_with_arm_architecture.json +++ b/integration/resources/expected/single/basic_function_with_arm_architecture.json @@ -7,4 +7,4 @@ "LogicalResourceId": "MyLambdaFunctionRole", "ResourceType": "AWS::IAM::Role" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/single/basic_function_with_function_url_config.json b/integration/resources/expected/single/basic_function_with_function_url_config.json index 1299957b2..59ce31d97 100644 --- a/integration/resources/expected/single/basic_function_with_function_url_config.json +++ b/integration/resources/expected/single/basic_function_with_function_url_config.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyLambdaFunctionUrlPublicPermissions", "ResourceType": "AWS::Lambda::Permission" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/single/basic_function_with_function_url_with_autopuplishalias.json b/integration/resources/expected/single/basic_function_with_function_url_with_autopuplishalias.json index 5696926f3..dfc906927 100644 --- a/integration/resources/expected/single/basic_function_with_function_url_with_autopuplishalias.json +++ b/integration/resources/expected/single/basic_function_with_function_url_with_autopuplishalias.json @@ -23,4 +23,4 @@ "LogicalResourceId": "MyLambdaFunctionUrlPublicPermissions", "ResourceType": "AWS::Lambda::Permission" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/single/basic_function_with_kmskeyarn.json b/integration/resources/expected/single/basic_function_with_kmskeyarn.json index 5cba0276b..dadc635ad 100644 --- a/integration/resources/expected/single/basic_function_with_kmskeyarn.json +++ b/integration/resources/expected/single/basic_function_with_kmskeyarn.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"BasicFunctionWithKmsKeyArn", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"BasicFunctionWithKmsKeyArnRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyKey", "ResourceType":"AWS::KMS::Key" } + { + "LogicalResourceId": "BasicFunctionWithKmsKeyArn", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "BasicFunctionWithKmsKeyArnRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyKey", + "ResourceType": "AWS::KMS::Key" + } ] diff --git a/integration/resources/expected/single/basic_function_with_sns_dlq.json b/integration/resources/expected/single/basic_function_with_sns_dlq.json index 3ded5dd12..004b61c71 100644 --- a/integration/resources/expected/single/basic_function_with_sns_dlq.json +++ b/integration/resources/expected/single/basic_function_with_sns_dlq.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyTopic", "ResourceType":"AWS::SNS::Topic" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyTopic", + "ResourceType": "AWS::SNS::Topic" + } +] diff --git a/integration/resources/expected/single/basic_function_with_sqs_dlq.json b/integration/resources/expected/single/basic_function_with_sqs_dlq.json index a29c8734b..fa491013e 100644 --- a/integration/resources/expected/single/basic_function_with_sqs_dlq.json +++ b/integration/resources/expected/single/basic_function_with_sqs_dlq.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/single/basic_function_with_tags.json b/integration/resources/expected/single/basic_function_with_tags.json index 4e83eaf6b..d4dfecb35 100644 --- a/integration/resources/expected/single/basic_function_with_tags.json +++ b/integration/resources/expected/single/basic_function_with_tags.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } ] diff --git a/integration/resources/expected/single/basic_function_with_tracing.json b/integration/resources/expected/single/basic_function_with_tracing.json index e47b43ddd..bdf68de49 100644 --- a/integration/resources/expected/single/basic_function_with_tracing.json +++ b/integration/resources/expected/single/basic_function_with_tracing.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"ActiveTracingFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"ActiveTracingFunctionRole", "ResourceType":"AWS::IAM::Role"}, - { "LogicalResourceId":"PassThroughTracingFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"PassThroughTracingFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "ActiveTracingFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "ActiveTracingFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "PassThroughTracingFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "PassThroughTracingFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/single/basic_function_with_x86_architecture.json b/integration/resources/expected/single/basic_function_with_x86_architecture.json index 3e8d999df..d4dfecb35 100644 --- a/integration/resources/expected/single/basic_function_with_x86_architecture.json +++ b/integration/resources/expected/single/basic_function_with_x86_architecture.json @@ -7,4 +7,4 @@ "LogicalResourceId": "MyLambdaFunctionRole", "ResourceType": "AWS::IAM::Role" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/single/basic_http_api.json b/integration/resources/expected/single/basic_http_api.json index 7fac895cb..5e14fb5b9 100644 --- a/integration/resources/expected/single/basic_http_api.json +++ b/integration/resources/expected/single/basic_http_api.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api"}, - { "LogicalResourceId":"MyApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } +] diff --git a/integration/resources/expected/single/basic_layer.json b/integration/resources/expected/single/basic_layer.json index beba3153c..8b12e137e 100644 --- a/integration/resources/expected/single/basic_layer.json +++ b/integration/resources/expected/single/basic_layer.json @@ -1,3 +1,6 @@ [ - { "LogicalResourceId":"MyLayerVersion", "ResourceType":"AWS::Lambda::LayerVersion"} -] \ No newline at end of file + { + "LogicalResourceId": "MyLayerVersion", + "ResourceType": "AWS::Lambda::LayerVersion" + } +] diff --git a/integration/resources/expected/single/basic_layer_with_compatible_architecture.json b/integration/resources/expected/single/basic_layer_with_compatible_architecture.json index beba3153c..8b12e137e 100644 --- a/integration/resources/expected/single/basic_layer_with_compatible_architecture.json +++ b/integration/resources/expected/single/basic_layer_with_compatible_architecture.json @@ -1,3 +1,6 @@ [ - { "LogicalResourceId":"MyLayerVersion", "ResourceType":"AWS::Lambda::LayerVersion"} -] \ No newline at end of file + { + "LogicalResourceId": "MyLayerVersion", + "ResourceType": "AWS::Lambda::LayerVersion" + } +] diff --git a/integration/resources/expected/single/basic_layer_with_parameters.json b/integration/resources/expected/single/basic_layer_with_parameters.json index beba3153c..8b12e137e 100644 --- a/integration/resources/expected/single/basic_layer_with_parameters.json +++ b/integration/resources/expected/single/basic_layer_with_parameters.json @@ -1,3 +1,6 @@ [ - { "LogicalResourceId":"MyLayerVersion", "ResourceType":"AWS::Lambda::LayerVersion"} -] \ No newline at end of file + { + "LogicalResourceId": "MyLayerVersion", + "ResourceType": "AWS::Lambda::LayerVersion" + } +] diff --git a/integration/resources/expected/single/basic_state_machine_inline_definition.json b/integration/resources/expected/single/basic_state_machine_inline_definition.json index 4d778a7e4..3f80c2781 100644 --- a/integration/resources/expected/single/basic_state_machine_inline_definition.json +++ b/integration/resources/expected/single/basic_state_machine_inline_definition.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyBasicStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine"}, - { "LogicalResourceId":"MyBasicStateMachineRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyBasicStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyBasicStateMachineRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/single/basic_state_machine_with_tags.json b/integration/resources/expected/single/basic_state_machine_with_tags.json index 976394f6b..b7bf8a795 100644 --- a/integration/resources/expected/single/basic_state_machine_with_tags.json +++ b/integration/resources/expected/single/basic_state_machine_with_tags.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine"}, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" } + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + } ] diff --git a/integration/resources/expected/single/function_alias_with_http_api_events.json b/integration/resources/expected/single/function_alias_with_http_api_events.json index 8001cf476..7689d6013 100644 --- a/integration/resources/expected/single/function_alias_with_http_api_events.json +++ b/integration/resources/expected/single/function_alias_with_http_api_events.json @@ -1,10 +1,34 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionAliaslive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"MyLambdaFunctionFooEventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionBarEventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyHttpApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"MyHttpApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliaslive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "MyLambdaFunctionFooEventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionBarEventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyHttpApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyHttpApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } ] diff --git a/integration/resources/expected/single/function_with_deployment_preference_alarms_intrinsic_if.json b/integration/resources/expected/single/function_with_deployment_preference_alarms_intrinsic_if.json index c71bcec27..e986be9e3 100644 --- a/integration/resources/expected/single/function_with_deployment_preference_alarms_intrinsic_if.json +++ b/integration/resources/expected/single/function_with_deployment_preference_alarms_intrinsic_if.json @@ -27,4 +27,4 @@ "LogicalResourceId": "MyLambdaFunctionAliaslive", "ResourceType": "AWS::Lambda::Alias" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/single/function_with_ephemeral_storage.json b/integration/resources/expected/single/function_with_ephemeral_storage.json index 5cc61a85c..d4dfecb35 100644 --- a/integration/resources/expected/single/function_with_ephemeral_storage.json +++ b/integration/resources/expected/single/function_with_ephemeral_storage.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } - ] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/single/function_with_http_api_events.json b/integration/resources/expected/single/function_with_http_api_events.json index 14e65d310..cc7e3cc24 100644 --- a/integration/resources/expected/single/function_with_http_api_events.json +++ b/integration/resources/expected/single/function_with_http_api_events.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionFooEventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyHttpApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"MyHttpApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionFooEventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyHttpApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyHttpApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } ] diff --git a/integration/resources/expected/single/state_machine_with_api.json b/integration/resources/expected/single/state_machine_with_api.json index 98fd6fb8b..dd1a75792 100644 --- a/integration/resources/expected/single/state_machine_with_api.json +++ b/integration/resources/expected/single/state_machine_with_api.json @@ -1,10 +1,34 @@ [ - { "LogicalResourceId": "HelloWorldFunction", "ResourceType": "AWS::Lambda::Function" }, - { "LogicalResourceId": "HelloWorldFunctionRole", "ResourceType": "AWS::IAM::Role" }, - { "LogicalResourceId": "MyApi", "ResourceType": "AWS::ApiGateway::RestApi" }, - { "LogicalResourceId": "MyApiDeployment", "ResourceType": "AWS::ApiGateway::Deployment" }, - { "LogicalResourceId": "MyApiProdStage", "ResourceType": "AWS::ApiGateway::Stage" }, - { "LogicalResourceId": "Post", "ResourceType": "AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId": "PostPostEchoRole", "ResourceType": "AWS::IAM::Role" }, - { "LogicalResourceId": "PostRole", "ResourceType": "AWS::IAM::Role" } + { + "LogicalResourceId": "HelloWorldFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "HelloWorldFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "Post", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "PostPostEchoRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "PostRole", + "ResourceType": "AWS::IAM::Role" + } ] diff --git a/integration/resources/templates/combination/all_policy_templates.yaml b/integration/resources/templates/combination/all_policy_templates.yaml index a781aaa8e..e571be561 100644 --- a/integration/resources/templates/combination/all_policy_templates.yaml +++ b/integration/resources/templates/combination/all_policy_templates.yaml @@ -4,206 +4,208 @@ Resources: MyFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: hello.handler Runtime: python3.8 Policies: - - SQSPollerPolicy: - QueueName: name + - SQSPollerPolicy: + QueueName: name - - LambdaInvokePolicy: - FunctionName: name + - LambdaInvokePolicy: + FunctionName: name - - CloudWatchPutMetricPolicy: {} + - CloudWatchPutMetricPolicy: {} - - EC2DescribePolicy: {} + - EC2DescribePolicy: {} - - DynamoDBCrudPolicy: - TableName: name + - DynamoDBCrudPolicy: + TableName: name - - DynamoDBReadPolicy: - TableName: name + - DynamoDBReadPolicy: + TableName: name - - SESSendBouncePolicy: - IdentityName: name + - SESSendBouncePolicy: + IdentityName: name - - ElasticsearchHttpPostPolicy: - DomainName: name + - ElasticsearchHttpPostPolicy: + DomainName: name - - S3ReadPolicy: - BucketName: name + - S3ReadPolicy: + BucketName: name - - S3CrudPolicy: - BucketName: name + - S3CrudPolicy: + BucketName: name - - AMIDescribePolicy: {} + - AMIDescribePolicy: {} - - CloudFormationDescribeStacksPolicy: {} + - CloudFormationDescribeStacksPolicy: {} - - RekognitionDetectOnlyPolicy: {} + - RekognitionDetectOnlyPolicy: {} - - RekognitionNoDataAccessPolicy: - CollectionId: id + - RekognitionNoDataAccessPolicy: + CollectionId: id - - RekognitionReadPolicy: - CollectionId: id + - RekognitionReadPolicy: + CollectionId: id - - RekognitionWriteOnlyAccessPolicy: - CollectionId: id + - RekognitionWriteOnlyAccessPolicy: + CollectionId: id - - SQSSendMessagePolicy: - QueueName: name + - SQSSendMessagePolicy: + QueueName: name - - SNSPublishMessagePolicy: - TopicName: name + - SNSPublishMessagePolicy: + TopicName: name - - VPCAccessPolicy: {} + - VPCAccessPolicy: {} - - DynamoDBStreamReadPolicy: - TableName: name - StreamName: name + - DynamoDBStreamReadPolicy: + TableName: name + StreamName: name - - KinesisStreamReadPolicy: - StreamName: name + - KinesisStreamReadPolicy: + StreamName: name - - SESCrudPolicy: - IdentityName: name + - SESCrudPolicy: + IdentityName: name - - SNSCrudPolicy: - TopicName: name + - SNSCrudPolicy: + TopicName: name - - KinesisCrudPolicy: - StreamName: name + - KinesisCrudPolicy: + StreamName: name - - KMSDecryptPolicy: - KeyId: keyId + - KMSDecryptPolicy: + KeyId: keyId - - PollyFullAccessPolicy: - LexiconName: name + - PollyFullAccessPolicy: + LexiconName: name - - S3FullAccessPolicy: - BucketName: name + - S3FullAccessPolicy: + BucketName: name - - CodePipelineLambdaExecutionPolicy: {} + - CodePipelineLambdaExecutionPolicy: {} - - ServerlessRepoReadWriteAccessPolicy: {} + - ServerlessRepoReadWriteAccessPolicy: {} - - EC2CopyImagePolicy: - ImageId: id + - EC2CopyImagePolicy: + ImageId: id - - CodePipelineReadOnlyPolicy: - PipelineName: pipeline + - CodePipelineReadOnlyPolicy: + PipelineName: pipeline - - CloudWatchDashboardPolicy: {} + - CloudWatchDashboardPolicy: {} - - RekognitionFacesPolicy: {} + - RekognitionFacesPolicy: {} - - RekognitionLabelsPolicy: {} + - RekognitionLabelsPolicy: {} - - DynamoDBBackupFullAccessPolicy: - TableName: table + - DynamoDBBackupFullAccessPolicy: + TableName: table - - DynamoDBRestoreFromBackupPolicy: - TableName: table + - DynamoDBRestoreFromBackupPolicy: + TableName: table - - ComprehendBasicAccessPolicy: {} + - ComprehendBasicAccessPolicy: {} - - AWSSecretsManagerGetSecretValuePolicy: - SecretArn: - Fn::Sub: arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:MyTestDatabaseSecret-a1b2c3 + - AWSSecretsManagerGetSecretValuePolicy: + SecretArn: + Fn::Sub: arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:MyTestDatabaseSecret-a1b2c3 - - AWSSecretsManagerRotationPolicy: - FunctionName: function + - AWSSecretsManagerRotationPolicy: + FunctionName: function MyFunction2: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: hello.handler Runtime: python3.8 Policies: - - SESEmailTemplateCrudPolicy: {} + - SESEmailTemplateCrudPolicy: {} - - SSMParameterReadPolicy: - ParameterName: name + - SSMParameterReadPolicy: + ParameterName: name - - MobileAnalyticsWriteOnlyAccessPolicy: {} + - MobileAnalyticsWriteOnlyAccessPolicy: {} - - PinpointEndpointAccessPolicy: - PinpointApplicationId: id + - PinpointEndpointAccessPolicy: + PinpointApplicationId: id - - FirehoseWritePolicy: - DeliveryStreamName: deliveryStream + - FirehoseWritePolicy: + DeliveryStreamName: deliveryStream - - FirehoseCrudPolicy: - DeliveryStreamName: deliveryStream + - FirehoseCrudPolicy: + DeliveryStreamName: deliveryStream - - EKSDescribePolicy: {} + - EKSDescribePolicy: {} - - CostExplorerReadOnlyPolicy: {} + - CostExplorerReadOnlyPolicy: {} - - OrganizationsListAccountsPolicy: {} + - OrganizationsListAccountsPolicy: {} - - DynamoDBReconfigurePolicy: - TableName: table + - DynamoDBReconfigurePolicy: + TableName: table - - SESBulkTemplatedCrudPolicy: - IdentityName: name + - SESBulkTemplatedCrudPolicy: + IdentityName: name - - FilterLogEventsPolicy: - LogGroupName: name + - FilterLogEventsPolicy: + LogGroupName: name - - StepFunctionsExecutionPolicy: - StateMachineName: name + - StepFunctionsExecutionPolicy: + StateMachineName: name - - CodeCommitCrudPolicy: - RepositoryName: name + - CodeCommitCrudPolicy: + RepositoryName: name - - CodeCommitReadPolicy: - RepositoryName: name - - - TextractPolicy: {} + - CodeCommitReadPolicy: + RepositoryName: name - - TextractDetectAnalyzePolicy: {} + - TextractPolicy: {} - - TextractGetResultPolicy: {} + - TextractDetectAnalyzePolicy: {} - - DynamoDBWritePolicy: - TableName: name + - TextractGetResultPolicy: {} - - S3WritePolicy: - BucketName: name + - DynamoDBWritePolicy: + TableName: name - - EFSWriteAccessPolicy: - AccessPoint: name - FileSystem: name + - S3WritePolicy: + BucketName: name + + - EFSWriteAccessPolicy: + AccessPoint: name + FileSystem: name MyFunction3: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: hello.handler Runtime: python3.8 Policies: - - ElasticMapReduceModifyInstanceFleetPolicy: - ClusterId: name - - ElasticMapReduceSetTerminationProtectionPolicy: - ClusterId: name - - ElasticMapReduceModifyInstanceGroupsPolicy: - ClusterId: name - - ElasticMapReduceCancelStepsPolicy: - ClusterId: name - - ElasticMapReduceTerminateJobFlowsPolicy: - ClusterId: name - - ElasticMapReduceAddJobFlowStepsPolicy: - ClusterId: name - - SageMakerCreateEndpointPolicy: - EndpointName: name - - SageMakerCreateEndpointConfigPolicy: - EndpointConfigName: name - - EcsRunTaskPolicy: - TaskDefinition: name + - ElasticMapReduceModifyInstanceFleetPolicy: + ClusterId: name + - ElasticMapReduceSetTerminationProtectionPolicy: + ClusterId: name + - ElasticMapReduceModifyInstanceGroupsPolicy: + ClusterId: name + - ElasticMapReduceCancelStepsPolicy: + ClusterId: name + - ElasticMapReduceTerminateJobFlowsPolicy: + ClusterId: name + - ElasticMapReduceAddJobFlowStepsPolicy: + ClusterId: name + - SageMakerCreateEndpointPolicy: + EndpointName: name + - SageMakerCreateEndpointConfigPolicy: + EndpointConfigName: name + - EcsRunTaskPolicy: + TaskDefinition: name +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_authorizer_apikey.yaml b/integration/resources/templates/combination/api_with_authorizer_apikey.yaml index 2a722e81a..cae4da647 100644 --- a/integration/resources/templates/combination/api_with_authorizer_apikey.yaml +++ b/integration/resources/templates/combination/api_with_authorizer_apikey.yaml @@ -40,7 +40,7 @@ Resources: Auth: Authorizer: MyLambdaTokenAuth ApiKeyRequired: true - + MyLambdaAuthFunction: Type: AWS::Serverless::Function Properties: @@ -70,26 +70,26 @@ Resources: MyFirstApiKey: Type: AWS::ApiGateway::ApiKey DependsOn: - - MyUsagePlan + - MyUsagePlan Properties: Enabled: true Value: at_least_20_characters StageKeys: - - RestApiId: - Ref: MyApi - StageName: - Ref: MyApi.Stage + - RestApiId: + Ref: MyApi + StageName: + Ref: MyApi.Stage MyUsagePlan: Type: AWS::ApiGateway::UsagePlan DependsOn: - - MyApi + - MyApi Properties: ApiStages: - - ApiId: - Ref: MyApi - Stage: - Ref: MyApi.Stage + - ApiId: + Ref: MyApi + Stage: + Ref: MyApi.Stage MyUsagePlanKey: Type: AWS::ApiGateway::UsagePlanKey @@ -101,16 +101,18 @@ Resources: KeyType: API_KEY Outputs: - ApiKeyId: - Description: "API Key ID" - Value: - Fn::GetAtt: MyFirstApiKey.APIKeyId - ApiUrl: - Description: "API endpoint URL for Prod environment" - Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' + ApiKeyId: + Description: API Key ID + Value: + Fn::GetAtt: MyFirstApiKey.APIKeyId + ApiUrl: + Description: API endpoint URL for Prod environment + Value: + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ - AuthorizerFunctionArn: - Description: "Authorizer Function Arn" - Value: - Fn::GetAtt: MyLambdaAuthFunction.Arn + AuthorizerFunctionArn: + Description: Authorizer Function Arn + Value: + Fn::GetAtt: MyLambdaAuthFunction.Arn +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_authorizers_invokefunction_set_none.yaml b/integration/resources/templates/combination/api_with_authorizers_invokefunction_set_none.yaml index cb54d2fc7..e647cabe0 100644 --- a/integration/resources/templates/combination/api_with_authorizers_invokefunction_set_none.yaml +++ b/integration/resources/templates/combination/api_with_authorizers_invokefunction_set_none.yaml @@ -62,7 +62,7 @@ Resources: MyApiWithNoAuth: Type: Api Properties: - RestApiId: + RestApiId: Ref: MyApiWithAwsIamAuthNoCallerCredentials Path: /api/without-auth Method: get @@ -70,7 +70,9 @@ Resources: Authorizer: NONE Outputs: - ApiUrl: - Description: "API endpoint URL for Prod environment" - Value: - Fn::Sub: 'https://${MyApiWithAwsIamAuthNoCallerCredentials}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + ApiUrl: + Description: API endpoint URL for Prod environment + Value: + Fn::Sub: https://${MyApiWithAwsIamAuthNoCallerCredentials}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_authorizers_max.yaml b/integration/resources/templates/combination/api_with_authorizers_max.yaml index bffffa2d9..259935450 100644 --- a/integration/resources/templates/combination/api_with_authorizers_max.yaml +++ b/integration/resources/templates/combination/api_with_authorizers_max.yaml @@ -8,8 +8,8 @@ Resources: Authorizers: MyCognitoAuthorizer: UserPoolArn: - - Fn::GetAtt: MyCognitoUserPool.Arn - - Fn::GetAtt: MyCognitoUserPoolTwo.Arn + - Fn::GetAtt: MyCognitoUserPool.Arn + - Fn::GetAtt: MyCognitoUserPoolTwo.Arn Identity: Header: MyAuthorizationHeader ValidationExpression: myauthvalidationexpression @@ -33,10 +33,10 @@ Resources: Fn::GetAtt: LambdaAuthInvokeRole.Arn Identity: Headers: - - authorizationHeader + - authorizationHeader QueryStrings: - - authorization - - authorizationQueryString1 + - authorization + - authorizationQueryString1 ReauthorizeEvery: 0 MyFunction: @@ -96,7 +96,7 @@ Resources: Auth: Authorizer: AWS_IAM InvokeRole: CALLER_CREDENTIALS - + MyLambdaAuthFunction: Type: AWS::Serverless::Function Properties: @@ -160,7 +160,7 @@ Resources: Type: AWS::Cognito::UserPool Properties: UserPoolName: MyCognitoUserPoolTwo - + MyCognitoUserPoolClient: Type: AWS::Cognito::UserPoolClient Properties: @@ -170,27 +170,29 @@ Resources: GenerateSecret: false Outputs: - ApiUrl: - Description: "API endpoint URL for Prod environment" - Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' + ApiUrl: + Description: API endpoint URL for Prod environment + Value: + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ - AuthorizerFunctionArn: - Description: "Authorizer Function Arn" - Value: - Fn::GetAtt: MyLambdaAuthFunction.Arn + AuthorizerFunctionArn: + Description: Authorizer Function Arn + Value: + Fn::GetAtt: MyLambdaAuthFunction.Arn - CognitoUserPoolArn: - Description: "Cognito User Pool Arn" - Value: - Fn::GetAtt: MyCognitoUserPool.Arn + CognitoUserPoolArn: + Description: Cognito User Pool Arn + Value: + Fn::GetAtt: MyCognitoUserPool.Arn - CognitoUserPoolTwoArn: - Description: "Cognito User Pool Arn" - Value: - Fn::GetAtt: MyCognitoUserPoolTwo.Arn + CognitoUserPoolTwoArn: + Description: Cognito User Pool Arn + Value: + Fn::GetAtt: MyCognitoUserPoolTwo.Arn - LambdaAuthInvokeRoleArn: - Description: "Authorizer Function Arn" - Value: - Fn::GetAtt: LambdaAuthInvokeRole.Arn \ No newline at end of file + LambdaAuthInvokeRoleArn: + Description: Authorizer Function Arn + Value: + Fn::GetAtt: LambdaAuthInvokeRole.Arn +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_authorizers_max_openapi.yaml b/integration/resources/templates/combination/api_with_authorizers_max_openapi.yaml index 1fd19ed3b..9eac3005f 100644 --- a/integration/resources/templates/combination/api_with_authorizers_max_openapi.yaml +++ b/integration/resources/templates/combination/api_with_authorizers_max_openapi.yaml @@ -11,8 +11,8 @@ Resources: Authorizers: MyCognitoAuthorizer: UserPoolArn: - - Fn::GetAtt: MyCognitoUserPool.Arn - - Fn::GetAtt: MyCognitoUserPoolTwo.Arn + - Fn::GetAtt: MyCognitoUserPool.Arn + - Fn::GetAtt: MyCognitoUserPoolTwo.Arn Identity: Header: MyAuthorizationHeader ValidationExpression: myauthvalidationexpression @@ -36,10 +36,10 @@ Resources: Fn::GetAtt: LambdaAuthInvokeRole.Arn Identity: Headers: - - authorizationHeader + - authorizationHeader QueryStrings: - - authorization - - authorizationQueryString1 + - authorization + - authorizationQueryString1 ReauthorizeEvery: 0 MyFunction: @@ -172,7 +172,7 @@ Resources: Type: AWS::Cognito::UserPool Properties: UserPoolName: MyCognitoUserPoolTwo - + MyCognitoUserPoolClient: Type: AWS::Cognito::UserPoolClient Properties: @@ -184,25 +184,25 @@ Resources: MyFirstApiKey: Type: AWS::ApiGateway::ApiKey DependsOn: - - MyUsagePlan + - MyUsagePlan Properties: Enabled: true StageKeys: - - RestApiId: - Ref: MyApi - StageName: - Ref: MyApi.Stage + - RestApiId: + Ref: MyApi + StageName: + Ref: MyApi.Stage MyUsagePlan: Type: AWS::ApiGateway::UsagePlan DependsOn: - - MyApi + - MyApi Properties: ApiStages: - - ApiId: - Ref: MyApi - Stage: - Ref: MyApi.Stage + - ApiId: + Ref: MyApi + Stage: + Ref: MyApi.Stage MyUsagePlanKey: Type: AWS::ApiGateway::UsagePlanKey @@ -214,32 +214,34 @@ Resources: KeyType: API_KEY Outputs: - ApiUrl: - Description: "API endpoint URL for Prod environment" - Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' - - AuthorizerFunctionArn: - Description: "Authorizer Function Arn" - Value: - Fn::GetAtt: MyLambdaAuthFunction.Arn - - CognitoUserPoolArn: - Description: "Cognito User Pool Arn" - Value: - Fn::GetAtt: MyCognitoUserPool.Arn - - CognitoUserPoolTwoArn: - Description: "Cognito User Pool Arn" - Value: - Fn::GetAtt: MyCognitoUserPoolTwo.Arn - - LambdaAuthInvokeRoleArn: - Description: "Authorizer Function Arn" - Value: - Fn::GetAtt: LambdaAuthInvokeRole.Arn - - ApiKeyId: - Description: "ID of the API Key" - Value: - Ref: MyFirstApiKey + ApiUrl: + Description: API endpoint URL for Prod environment + Value: + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ + + AuthorizerFunctionArn: + Description: Authorizer Function Arn + Value: + Fn::GetAtt: MyLambdaAuthFunction.Arn + + CognitoUserPoolArn: + Description: Cognito User Pool Arn + Value: + Fn::GetAtt: MyCognitoUserPool.Arn + + CognitoUserPoolTwoArn: + Description: Cognito User Pool Arn + Value: + Fn::GetAtt: MyCognitoUserPoolTwo.Arn + + LambdaAuthInvokeRoleArn: + Description: Authorizer Function Arn + Value: + Fn::GetAtt: LambdaAuthInvokeRole.Arn + + ApiKeyId: + Description: ID of the API Key + Value: + Ref: MyFirstApiKey +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_authorizers_min.yaml b/integration/resources/templates/combination/api_with_authorizers_min.yaml index 008b7781f..2960b7aec 100644 --- a/integration/resources/templates/combination/api_with_authorizers_min.yaml +++ b/integration/resources/templates/combination/api_with_authorizers_min.yaml @@ -17,7 +17,7 @@ Resources: Fn::GetAtt: MyLambdaAuthFunction.Arn Identity: QueryStrings: - - authorization + - authorization MyFunction: Type: AWS::Serverless::Function @@ -75,7 +75,7 @@ Resources: Path: /iam Auth: Authorizer: AWS_IAM - + MyLambdaAuthFunction: Type: AWS::Serverless::Function Properties: @@ -104,7 +104,7 @@ Resources: Type: AWS::Cognito::UserPool Properties: UserPoolName: MyCognitoUserPool - + MyCognitoUserPoolClient: Type: AWS::Cognito::UserPoolClient Properties: @@ -114,17 +114,19 @@ Resources: GenerateSecret: false Outputs: - ApiUrl: - Description: "API endpoint URL for Prod environment" - Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' + ApiUrl: + Description: API endpoint URL for Prod environment + Value: + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ - AuthorizerFunctionArn: - Description: "Authorizer Function Arn" - Value: - Fn::GetAtt: MyLambdaAuthFunction.Arn + AuthorizerFunctionArn: + Description: Authorizer Function Arn + Value: + Fn::GetAtt: MyLambdaAuthFunction.Arn - CognitoUserPoolArn: - Description: "Cognito User Pool Arn" - Value: - Fn::GetAtt: MyCognitoUserPool.Arn \ No newline at end of file + CognitoUserPoolArn: + Description: Cognito User Pool Arn + Value: + Fn::GetAtt: MyCognitoUserPool.Arn +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_binary_media_types.yaml b/integration/resources/templates/combination/api_with_binary_media_types.yaml index 604196133..281133a48 100644 --- a/integration/resources/templates/combination/api_with_binary_media_types.yaml +++ b/integration/resources/templates/combination/api_with_binary_media_types.yaml @@ -16,7 +16,9 @@ Resources: StageName: Prod DefinitionUri: ${definitionuri} BinaryMediaTypes: - - image~1jpg - - {"Fn::Join": ["~1", ["image", "png"]]} - - {"Ref": "ImageType"} + - image~1jpg + - {Fn::Join: [~1, [image, png]]} + - {Ref: ImageType} +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body.yaml b/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body.yaml index 60597624b..b9131b457 100644 --- a/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body.yaml +++ b/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body.yaml @@ -13,9 +13,9 @@ Globals: # Send/receive binary data through the APIs BinaryMediaTypes: # These are equivalent to image/gif and image/png when deployed - - image~1jpg - - image~1gif - - image~1png + - image~1jpg + - image~1gif + - image~1png Resources: MyApi: @@ -24,23 +24,25 @@ Resources: StageName: Prod DefinitionBody: # Simple HTTP Proxy API - swagger: "2.0" + swagger: '2.0' info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body_openapi.yaml b/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body_openapi.yaml index 2bdba578e..530cfe993 100644 --- a/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body_openapi.yaml +++ b/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body_openapi.yaml @@ -15,10 +15,10 @@ Globals: # Send/receive binary data through the APIs BinaryMediaTypes: # These are equivalent to image/gif and image/png when deployed - - image~1jpg - - image~1gif - - image~1png - - application~1octet-stream + - image~1jpg + - image~1gif + - image~1png + - application~1octet-stream OpenApiVersion: 3.0.1 Resources: @@ -28,15 +28,15 @@ Resources: StageName: Prod DefinitionBody: # Simple HTTP Proxy API - openapi: "3.0.1" + openapi: 3.0.1 info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api" - basePath: "/none" + version: '2016-09-23T22:23:23Z' + title: Simple Api + basePath: /none schemes: - - "https" + - https paths: - "/none": + /none: get: x-amazon-apigateway-integration: httpMethod: POST @@ -68,10 +68,12 @@ Resources: Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ MyLambda: Description: MyLambda Function ARN Value: Fn::GetAtt: MyLambda.Arn +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_cors.yaml b/integration/resources/templates/combination/api_with_cors.yaml index 9be2c0d6e..42c8c0861 100644 --- a/integration/resources/templates/combination/api_with_cors.yaml +++ b/integration/resources/templates/combination/api_with_cors.yaml @@ -1,21 +1,21 @@ Conditions: IsChina: Fn::Or: - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-north-1" - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-northwest-1" + - Fn::Equals: + - Ref: AWS::Region + - cn-north-1 + - Fn::Equals: + - Ref: AWS::Region + - cn-northwest-1 Globals: Api: EndpointConfiguration: REGIONAL Cors: - AllowMethods: "'methods'" - AllowHeaders: "'headers'" - AllowOrigin: "'origins'" - MaxAge: "'600'" + AllowMethods: "'methods'" + AllowHeaders: "'headers'" + AllowOrigin: "'origins'" + MaxAge: "'600'" Resources: MyLambdaFunction: @@ -43,4 +43,6 @@ Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_cors_only_headers.yaml b/integration/resources/templates/combination/api_with_cors_only_headers.yaml index 1b0bb8887..0f159e524 100644 --- a/integration/resources/templates/combination/api_with_cors_only_headers.yaml +++ b/integration/resources/templates/combination/api_with_cors_only_headers.yaml @@ -1,23 +1,23 @@ Conditions: IsChina: Fn::Or: - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-north-1" - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-northwest-1" + - Fn::Equals: + - Ref: AWS::Region + - cn-north-1 + - Fn::Equals: + - Ref: AWS::Region + - cn-northwest-1 Parameters: CorsParam: Type: String - Default: "headers" + Default: headers Globals: Api: EndpointConfiguration: REGIONAL Cors: - AllowHeaders: {"Fn::Sub": "'${CorsParam}'"} + AllowHeaders: {Fn::Sub: "'${CorsParam}'"} Resources: MyLambdaFunction: @@ -45,4 +45,6 @@ Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_cors_only_max_age.yaml b/integration/resources/templates/combination/api_with_cors_only_max_age.yaml index 5bba7a077..a4c3329f1 100644 --- a/integration/resources/templates/combination/api_with_cors_only_max_age.yaml +++ b/integration/resources/templates/combination/api_with_cors_only_max_age.yaml @@ -1,23 +1,23 @@ Conditions: IsChina: Fn::Or: - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-north-1" - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-northwest-1" + - Fn::Equals: + - Ref: AWS::Region + - cn-north-1 + - Fn::Equals: + - Ref: AWS::Region + - cn-northwest-1 Parameters: CorsParam: Type: String - Default: "600" + Default: '600' Globals: Api: EndpointConfiguration: REGIONAL Cors: - MaxAge: {"Fn::Sub": "'${CorsParam}'"} + MaxAge: {Fn::Sub: "'${CorsParam}'"} Resources: MyLambdaFunction: @@ -45,4 +45,6 @@ Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_cors_only_methods.yaml b/integration/resources/templates/combination/api_with_cors_only_methods.yaml index 4d5e9b286..82a806beb 100644 --- a/integration/resources/templates/combination/api_with_cors_only_methods.yaml +++ b/integration/resources/templates/combination/api_with_cors_only_methods.yaml @@ -1,23 +1,23 @@ Conditions: IsChina: Fn::Or: - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-north-1" - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-northwest-1" + - Fn::Equals: + - Ref: AWS::Region + - cn-north-1 + - Fn::Equals: + - Ref: AWS::Region + - cn-northwest-1 Parameters: CorsParam: Type: String - Default: "methods" + Default: methods Globals: Api: EndpointConfiguration: REGIONAL Cors: - AllowMethods: {"Fn::Sub": "'${CorsParam}'"} + AllowMethods: {Fn::Sub: "'${CorsParam}'"} Resources: MyLambdaFunction: @@ -45,4 +45,6 @@ Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_cors_openapi.yaml b/integration/resources/templates/combination/api_with_cors_openapi.yaml index 9be2c0d6e..42c8c0861 100644 --- a/integration/resources/templates/combination/api_with_cors_openapi.yaml +++ b/integration/resources/templates/combination/api_with_cors_openapi.yaml @@ -1,21 +1,21 @@ Conditions: IsChina: Fn::Or: - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-north-1" - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-northwest-1" + - Fn::Equals: + - Ref: AWS::Region + - cn-north-1 + - Fn::Equals: + - Ref: AWS::Region + - cn-northwest-1 Globals: Api: EndpointConfiguration: REGIONAL Cors: - AllowMethods: "'methods'" - AllowHeaders: "'headers'" - AllowOrigin: "'origins'" - MaxAge: "'600'" + AllowMethods: "'methods'" + AllowHeaders: "'headers'" + AllowOrigin: "'origins'" + MaxAge: "'600'" Resources: MyLambdaFunction: @@ -43,4 +43,6 @@ Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_cors_shorthand.yaml b/integration/resources/templates/combination/api_with_cors_shorthand.yaml index f24588057..85741c298 100644 --- a/integration/resources/templates/combination/api_with_cors_shorthand.yaml +++ b/integration/resources/templates/combination/api_with_cors_shorthand.yaml @@ -1,22 +1,22 @@ Conditions: IsChina: Fn::Or: - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-north-1" - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-northwest-1" + - Fn::Equals: + - Ref: AWS::Region + - cn-north-1 + - Fn::Equals: + - Ref: AWS::Region + - cn-northwest-1 Parameters: OriginValue: Type: String - Default: "origins" + Default: origins Globals: Api: EndpointConfiguration: REGIONAL - Cors: {"Fn::Sub": "'${OriginValue}'"} + Cors: {Fn::Sub: "'${OriginValue}'"} Resources: MyLambdaFunction: @@ -44,4 +44,6 @@ Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_custom_domains_edge.yaml b/integration/resources/templates/combination/api_with_custom_domains_edge.yaml index 8072fc2da..62f321f77 100644 --- a/integration/resources/templates/combination/api_with_custom_domains_edge.yaml +++ b/integration/resources/templates/combination/api_with_custom_domains_edge.yaml @@ -41,8 +41,10 @@ Resources: Ref: MyEdgeDomainCert EndpointConfiguration: EDGE BasePath: - - /get + - /get Route53: HostedZoneId: Ref: HostedZoneId - IpV6: true \ No newline at end of file + IpV6: true +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_custom_domains_regional.yaml b/integration/resources/templates/combination/api_with_custom_domains_regional.yaml index 779deb0e8..089ce14f6 100644 --- a/integration/resources/templates/combination/api_with_custom_domains_regional.yaml +++ b/integration/resources/templates/combination/api_with_custom_domains_regional.yaml @@ -19,8 +19,8 @@ Globals: TruststoreVersion: 0 SecurityPolicy: TLS_1_2 BasePath: - - /get - - /post + - /get + - /post Route53: HostedZoneId: Ref: HostedZoneId @@ -49,4 +49,6 @@ Resources: Type: Api Properties: Method: Post - Path: /post \ No newline at end of file + Path: /post +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_custom_domains_regional_ownership_verification.yaml b/integration/resources/templates/combination/api_with_custom_domains_regional_ownership_verification.yaml index 1f73730a2..36bf45c84 100644 --- a/integration/resources/templates/combination/api_with_custom_domains_regional_ownership_verification.yaml +++ b/integration/resources/templates/combination/api_with_custom_domains_regional_ownership_verification.yaml @@ -21,8 +21,8 @@ Globals: TruststoreVersion: 0 SecurityPolicy: TLS_1_2 BasePath: - - /get - - /post + - /get + - /post Route53: HostedZoneId: Ref: HostedZoneId @@ -54,3 +54,5 @@ Resources: Properties: Method: Post Path: /post +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_disable_execute_api_endpoint.yaml b/integration/resources/templates/combination/api_with_disable_execute_api_endpoint.yaml index 7ef88110d..be5569e95 100644 --- a/integration/resources/templates/combination/api_with_disable_execute_api_endpoint.yaml +++ b/integration/resources/templates/combination/api_with_disable_execute_api_endpoint.yaml @@ -34,6 +34,8 @@ Resources: Path: / Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: 'https://${RestApiGateway}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${RestApiGateway}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_disable_execute_api_endpoint_openapi_3.yaml b/integration/resources/templates/combination/api_with_disable_execute_api_endpoint_openapi_3.yaml index 3759bc33b..bc0ddf831 100644 --- a/integration/resources/templates/combination/api_with_disable_execute_api_endpoint_openapi_3.yaml +++ b/integration/resources/templates/combination/api_with_disable_execute_api_endpoint_openapi_3.yaml @@ -35,6 +35,8 @@ Resources: Path: / Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: 'https://${RestApiGateway}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${RestApiGateway}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_endpoint_configuration.yaml b/integration/resources/templates/combination/api_with_endpoint_configuration.yaml index a4e5cb0ac..5741b31c3 100644 --- a/integration/resources/templates/combination/api_with_endpoint_configuration.yaml +++ b/integration/resources/templates/combination/api_with_endpoint_configuration.yaml @@ -14,8 +14,8 @@ Resources: Type: AWS::Serverless::Api Properties: StageName: Prod - EndpointConfiguration: { - "Ref": "Config" - } + EndpointConfiguration: {Ref: Config} DefinitionUri: ${definitionuri} +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_endpoint_configuration_dict.yaml b/integration/resources/templates/combination/api_with_endpoint_configuration_dict.yaml index 4866fa80e..9628eb0e1 100644 --- a/integration/resources/templates/combination/api_with_endpoint_configuration_dict.yaml +++ b/integration/resources/templates/combination/api_with_endpoint_configuration_dict.yaml @@ -15,3 +15,5 @@ Resources: Type: REGIONAL DefinitionUri: ${definitionuri} +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_fail_on_warnings.yaml b/integration/resources/templates/combination/api_with_fail_on_warnings.yaml index edc21684a..c8e90e218 100644 --- a/integration/resources/templates/combination/api_with_fail_on_warnings.yaml +++ b/integration/resources/templates/combination/api_with_fail_on_warnings.yaml @@ -28,7 +28,9 @@ Resources: Iam: Type: Api Properties: - RestApiId: + RestApiId: Ref: RestApiGateway Method: GET Path: / +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_gateway_responses.yaml b/integration/resources/templates/combination/api_with_gateway_responses.yaml index ed301f4d2..d81cfb10e 100644 --- a/integration/resources/templates/combination/api_with_gateway_responses.yaml +++ b/integration/resources/templates/combination/api_with_gateway_responses.yaml @@ -33,7 +33,9 @@ Resources: Authorizer: AWS_IAM Outputs: - ApiUrl: - Description: "API endpoint URL for Prod environment" - Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + ApiUrl: + Description: API endpoint URL for Prod environment + Value: + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_method_settings.yaml b/integration/resources/templates/combination/api_with_method_settings.yaml index 53e0e8b11..cb5756d40 100644 --- a/integration/resources/templates/combination/api_with_method_settings.yaml +++ b/integration/resources/templates/combination/api_with_method_settings.yaml @@ -4,10 +4,7 @@ Resources: Properties: StageName: Prod DefinitionUri: ${definitionuri} - MethodSettings: [{ - "LoggingLevel": "INFO", - "MetricsEnabled": True, - "DataTraceEnabled": True, - "ResourcePath": "/*", - "HttpMethod": "*" - }] + MethodSettings: [{LoggingLevel: INFO, MetricsEnabled: true, DataTraceEnabled: true, + ResourcePath: /*, HttpMethod: '*'}] +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_request_models.yaml b/integration/resources/templates/combination/api_with_request_models.yaml index c27530121..7dfb7d9bf 100644 --- a/integration/resources/templates/combination/api_with_request_models.yaml +++ b/integration/resources/templates/combination/api_with_request_models.yaml @@ -36,6 +36,8 @@ Resources: Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_request_models_openapi.yaml b/integration/resources/templates/combination/api_with_request_models_openapi.yaml index 4de7f9ee2..c40780c8f 100644 --- a/integration/resources/templates/combination/api_with_request_models_openapi.yaml +++ b/integration/resources/templates/combination/api_with_request_models_openapi.yaml @@ -37,6 +37,8 @@ Resources: Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_request_parameters_openapi.yaml b/integration/resources/templates/combination/api_with_request_parameters_openapi.yaml index 03113c307..cae4b4dd4 100644 --- a/integration/resources/templates/combination/api_with_request_parameters_openapi.yaml +++ b/integration/resources/templates/combination/api_with_request_parameters_openapi.yaml @@ -1,13 +1,13 @@ Globals: Api: - OpenApiVersion: '3.0.1' + OpenApiVersion: 3.0.1 CacheClusterEnabled: true CacheClusterSize: '0.5' MethodSettings: - - ResourcePath: /one - HttpMethod: "GET" - CachingEnabled: true - CacheTtlInSeconds: 15 + - ResourcePath: /one + HttpMethod: GET + CachingEnabled: true + CacheTtlInSeconds: 15 Resources: ApiParameterFunction: Type: AWS::Serverless::Function @@ -37,11 +37,13 @@ Resources: Path: /one Method: get RequestParameters: - - method.request.querystring.type: - Required: true - Caching: true + - method.request.querystring.type: + Required: true + Caching: true AnotherGetHtml: Type: Api Properties: Path: /two Method: get +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_resource_policies.yaml b/integration/resources/templates/combination/api_with_resource_policies.yaml index b260cd538..bd6cd27a4 100644 --- a/integration/resources/templates/combination/api_with_resource_policies.yaml +++ b/integration/resources/templates/combination/api_with_resource_policies.yaml @@ -1,23 +1,19 @@ Conditions: IsChina: Fn::Equals: - - Ref: "AWS::Partition" - - "aws-cn" + - Ref: AWS::Partition + - aws-cn Globals: Api: - OpenApiVersion: "3.0.1" + OpenApiVersion: 3.0.1 Auth: ResourcePolicy: - CustomStatements: [{ - "Effect": "Allow", - "Principal": "*", - "Action": "execute-api:Invoke", - "Resource": "execute-api:*/*/*" - }] - SourceVpcWhitelist: ['vpc-1234'] - SourceVpcBlacklist: ['vpce-5678'] - IpRangeWhitelist: ['1.2.3.4'] + CustomStatements: [{Effect: Allow, Principal: '*', Action: execute-api:Invoke, + Resource: execute-api:*/*/*}] + SourceVpcWhitelist: [vpc-1234] + SourceVpcBlacklist: [vpce-5678] + IpRangeWhitelist: [1.2.3.4] Resources: MyLambdaFunction: @@ -42,21 +38,23 @@ Resources: Outputs: Region: - Description: "Region" - Value: + Description: Region + Value: Ref: AWS::Region AccountId: - Description: "Account Id" - Value: + Description: Account Id + Value: Ref: AWS::AccountId - + Partition: - Description: "Partition" - Value: + Description: Partition + Value: Ref: AWS::Partition ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_resource_policies_aws_account.yaml b/integration/resources/templates/combination/api_with_resource_policies_aws_account.yaml index eb48af1dd..8f7483ec9 100644 --- a/integration/resources/templates/combination/api_with_resource_policies_aws_account.yaml +++ b/integration/resources/templates/combination/api_with_resource_policies_aws_account.yaml @@ -11,23 +11,25 @@ Resources: Properties: Auth: ResourcePolicy: - AwsAccountWhitelist: - - Ref: 'AWS::AccountId' + AwsAccountWhitelist: + - Ref: AWS::AccountId Method: get Path: /get Outputs: Region: - Description: "Region" - Value: + Description: Region + Value: Ref: AWS::Region AccountId: - Description: "Account Id" - Value: + Description: Account Id + Value: Ref: AWS::AccountId Partition: - Description: "Partition" - Value: - Ref: AWS::Partition \ No newline at end of file + Description: Partition + Value: + Ref: AWS::Partition +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_resource_refs.yaml b/integration/resources/templates/combination/api_with_resource_refs.yaml index 6d539f005..05010722f 100644 --- a/integration/resources/templates/combination/api_with_resource_refs.yaml +++ b/integration/resources/templates/combination/api_with_resource_refs.yaml @@ -20,3 +20,5 @@ Outputs: Value: Ref: MyApi.Deployment +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_usage_plan.yaml b/integration/resources/templates/combination/api_with_usage_plan.yaml index 6a2f1ca07..0447e9153 100644 --- a/integration/resources/templates/combination/api_with_usage_plan.yaml +++ b/integration/resources/templates/combination/api_with_usage_plan.yaml @@ -4,9 +4,9 @@ Parameters: Default: PER_API Globals: Api: - OpenApiVersion: "2.0" + OpenApiVersion: '2.0' Auth: - ApiKeyRequired: True + ApiKeyRequired: true UsagePlan: CreateUsagePlan: Ref: UsagePlanType @@ -25,26 +25,26 @@ Resources: StageName: Prod DefinitionBody: # Simple HTTP Proxy API - swagger: "2.0" + swagger: '2.0' info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api 1" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api 1 + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy MyApi2: Type: AWS::Serverless::Api @@ -56,26 +56,26 @@ Resources: CreateUsagePlan: SHARED DefinitionBody: # Simple HTTP Proxy API - openapi: "3.0.1" + openapi: 3.0.1 info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api 2" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api 2 + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy MyApi3: Type: AWS::Serverless::Api @@ -87,26 +87,26 @@ Resources: CreateUsagePlan: NONE DefinitionBody: # Simple HTTP Proxy API - openapi: "3.0.1" + openapi: 3.0.1 info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api 3" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api 3 + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy MyApi4: Type: AWS::Serverless::Api @@ -118,26 +118,26 @@ Resources: CreateUsagePlan: SHARED DefinitionBody: # Simple HTTP Proxy API - openapi: "3.0.1" + openapi: 3.0.1 info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api 4" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api 4 + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy Outputs: MyApiUsagePlan: @@ -152,4 +152,5 @@ Outputs: ServerlessApiKey: Value: Ref: ServerlessApiKey - \ No newline at end of file +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_bucket_to_function_write.yaml b/integration/resources/templates/combination/connector_bucket_to_function_write.yaml index b790f5b41..b8115fb71 100644 --- a/integration/resources/templates/combination/connector_bucket_to_function_write.yaml +++ b/integration/resources/templates/combination/connector_bucket_to_function_write.yaml @@ -36,8 +36,8 @@ Resources: BUCKET_NAME: !Ref TriggerBucket VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName InvokedFunction: Type: AWS::Serverless::Function @@ -57,8 +57,8 @@ Resources: Variables: VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSSendMessagePolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSSendMessagePolicy: + QueueName: !GetAtt VerificationQueue.QueueName TriggerBucket: @@ -69,8 +69,8 @@ Resources: BucketName: !Ref BucketName NotificationConfiguration: LambdaConfigurations: - - Event: 's3:ObjectCreated:*' - Function: !GetAtt InvokedFunction.Arn + - Event: s3:ObjectCreated:* + Function: !GetAtt InvokedFunction.Arn MyConnector: Type: AWS::Serverless::Connector @@ -81,7 +81,7 @@ Resources: Destination: Id: InvokedFunction Permissions: - - Write + - Write ConnectorNotTested: Type: AWS::Serverless::Connector @@ -91,5 +91,6 @@ Resources: Destination: Id: TriggerBucket Permissions: - - Write - \ No newline at end of file + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_event_rule_to_eb_custom_write.yaml b/integration/resources/templates/combination/connector_event_rule_to_eb_custom_write.yaml index f5c28fa4a..fd21b4edb 100644 --- a/integration/resources/templates/combination/connector_event_rule_to_eb_custom_write.yaml +++ b/integration/resources/templates/combination/connector_event_rule_to_eb_custom_write.yaml @@ -7,7 +7,7 @@ Resources: Timeout: 10 # in case eb has delay InlineCode: | const AWS = require('aws-sdk'); - + exports.handler = async (event) => { const eb = new AWS.EventBridge(); const response = await eb.putEvents({ @@ -35,10 +35,10 @@ Resources: EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' EVENT_BUS_NAME: default Policies: - - EventBridgePutEventsPolicy: - EventBusName: default - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - EventBridgePutEventsPolicy: + EventBusName: default + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName EventRule: Type: AWS::Events::Rule @@ -46,11 +46,11 @@ Resources: Description: !Sub 'EventRule-${AWS::StackName}' EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !GetAtt CustomEventBus.Arn - Id: "EBBus" - RoleArn: !GetAtt EBRole.Arn + - Arn: !GetAtt CustomEventBus.Arn + Id: EBBus + RoleArn: !GetAtt EBRole.Arn EBRole: Type: AWS::IAM::Role @@ -58,10 +58,10 @@ Resources: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - - Effect: Allow - Principal: - Service: events.amazonaws.com - Action: sts:AssumeRole + - Effect: Allow + Principal: + Service: events.amazonaws.com + Action: sts:AssumeRole MyConnector: Type: AWS::Serverless::Connector @@ -71,7 +71,7 @@ Resources: Destination: Id: CustomEventBus Permissions: - - Write + - Write CustomEventBus: Type: AWS::Events::EventBus @@ -85,10 +85,10 @@ Resources: EventBusName: !Ref CustomEventBus EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !GetAtt VerificationQueue.Arn - Id: "Verification" + - Arn: !GetAtt VerificationQueue.Arn + Id: Verification VerificationQueue: Type: AWS::SQS::Queue @@ -101,4 +101,6 @@ Resources: Destination: Id: VerificationQueue Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_event_rule_to_eb_default_write.yaml b/integration/resources/templates/combination/connector_event_rule_to_eb_default_write.yaml index 6c7afd27e..27f069694 100644 --- a/integration/resources/templates/combination/connector_event_rule_to_eb_default_write.yaml +++ b/integration/resources/templates/combination/connector_event_rule_to_eb_default_write.yaml @@ -35,10 +35,10 @@ Resources: EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' EVENT_BUS_NAME: !Ref CustomEventBus Policies: - - EventBridgePutEventsPolicy: - EventBusName: !Ref CustomEventBus - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - EventBridgePutEventsPolicy: + EventBusName: !Ref CustomEventBus + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName CustomEventBus: Type: AWS::Events::EventBus @@ -52,11 +52,11 @@ Resources: EventBusName: !Ref CustomEventBus EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !Sub arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/default - Id: "EBBus" - RoleArn: !GetAtt EBRole.Arn + - Arn: !Sub arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/default + Id: EBBus + RoleArn: !GetAtt EBRole.Arn EBRole: Type: AWS::IAM::Role @@ -64,10 +64,10 @@ Resources: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - - Effect: Allow - Principal: - Service: events.amazonaws.com - Action: sts:AssumeRole + - Effect: Allow + Principal: + Service: events.amazonaws.com + Action: sts:AssumeRole MyConnector: Type: AWS::Serverless::Connector @@ -78,7 +78,7 @@ Resources: Type: AWS::Events::EventBus Arn: !Sub arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/default Permissions: - - Write + - Write VerificationEventRule: Type: AWS::Events::Rule @@ -86,10 +86,10 @@ Resources: Description: !Sub 'EventRule-${AWS::StackName}-verification' EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !GetAtt VerificationQueue.Arn - Id: "SQSqueue" + - Arn: !GetAtt VerificationQueue.Arn + Id: SQSqueue VerificationQueue: Type: AWS::SQS::Queue @@ -102,4 +102,6 @@ Resources: Destination: Id: VerificationQueue Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_event_rule_to_lambda_write.yaml b/integration/resources/templates/combination/connector_event_rule_to_lambda_write.yaml index 9e1740731..ad5fa48da 100644 --- a/integration/resources/templates/combination/connector_event_rule_to_lambda_write.yaml +++ b/integration/resources/templates/combination/connector_event_rule_to_lambda_write.yaml @@ -7,7 +7,7 @@ Resources: Timeout: 10 # in case eb has delay InlineCode: | const AWS = require('aws-sdk'); - + exports.handler = async (event) => { const eb = new AWS.EventBridge(); const response = await eb.putEvents({ @@ -33,10 +33,10 @@ Resources: QUEUE_URL: !Ref VerificationQueue EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' Policies: - - EventBridgePutEventsPolicy: - EventBusName: default - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - EventBridgePutEventsPolicy: + EventBusName: default + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName EventRule: Type: AWS::Events::Rule @@ -44,10 +44,10 @@ Resources: Description: !Sub 'EventRule-${AWS::StackName}' EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !GetAtt Function.Arn - Id: "Target" + - Arn: !GetAtt Function.Arn + Id: Target Function: Type: AWS::Serverless::Function @@ -68,8 +68,8 @@ Resources: Variables: QUEUE_URL: !Ref VerificationQueue Policies: - - SQSSendMessagePolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSSendMessagePolicy: + QueueName: !GetAtt VerificationQueue.QueueName VerificationQueue: Type: AWS::SQS::Queue @@ -82,4 +82,6 @@ Resources: Destination: Id: Function Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_event_rule_to_sfn_write.yaml b/integration/resources/templates/combination/connector_event_rule_to_sfn_write.yaml index 4c2306fa9..2bfb0c6a3 100644 --- a/integration/resources/templates/combination/connector_event_rule_to_sfn_write.yaml +++ b/integration/resources/templates/combination/connector_event_rule_to_sfn_write.yaml @@ -7,7 +7,7 @@ Resources: Timeout: 10 # in case eb has delay InlineCode: | const AWS = require('aws-sdk'); - + exports.handler = async (event) => { const eb = new AWS.EventBridge(); const response = await eb.putEvents({ @@ -33,10 +33,10 @@ Resources: QUEUE_URL: !Ref VerificationQueue EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' Policies: - - EventBridgePutEventsPolicy: - EventBusName: default - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - EventBridgePutEventsPolicy: + EventBusName: default + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName EventRule: Type: AWS::Events::Rule @@ -44,11 +44,11 @@ Resources: Description: !Sub 'EventRule-${AWS::StackName}' EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !GetAtt StateMachine.Arn - Id: "Target" - RoleArn: !GetAtt EBRole.Arn + - Arn: !GetAtt StateMachine.Arn + Id: Target + RoleArn: !GetAtt EBRole.Arn EBRole: Type: AWS::IAM::Role @@ -56,10 +56,10 @@ Resources: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - - Effect: Allow - Principal: - Service: events.amazonaws.com - Action: sts:AssumeRole + - Effect: Allow + Principal: + Service: events.amazonaws.com + Action: sts:AssumeRole StateMachine: Type: AWS::Serverless::StateMachine @@ -74,10 +74,10 @@ Resources: Parameters: QueueUrl: !Ref VerificationQueue MessageBody: hello - End: True + End: true Policies: - - SQSSendMessagePolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSSendMessagePolicy: + QueueName: !GetAtt VerificationQueue.QueueName VerificationQueue: Type: AWS::SQS::Queue @@ -90,4 +90,6 @@ Resources: Destination: Id: StateMachine Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_event_rule_to_sns_write.yaml b/integration/resources/templates/combination/connector_event_rule_to_sns_write.yaml index 12fd5f6bf..386a9b10b 100644 --- a/integration/resources/templates/combination/connector_event_rule_to_sns_write.yaml +++ b/integration/resources/templates/combination/connector_event_rule_to_sns_write.yaml @@ -7,7 +7,7 @@ Resources: Timeout: 10 # in case eb has delay InlineCode: | const AWS = require('aws-sdk'); - + exports.handler = async (event) => { const eb = new AWS.EventBridge(); const response = await eb.putEvents({ @@ -33,10 +33,10 @@ Resources: QUEUE_URL: !Ref VerificationQueue EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' Policies: - - EventBridgePutEventsPolicy: - EventBusName: default - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - EventBridgePutEventsPolicy: + EventBusName: default + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName EventRule: Type: AWS::Events::Rule @@ -44,10 +44,10 @@ Resources: Description: !Sub 'EventRule-${AWS::StackName}' EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !Ref Topic - Id: "Target" + - Arn: !Ref Topic + Id: Target Topic: Type: AWS::SNS::Topic @@ -70,7 +70,7 @@ Resources: Destination: Id: Topic Permissions: - - Write + - Write ConnectorNotBeingTested: Type: AWS::Serverless::Connector @@ -80,4 +80,6 @@ Resources: Destination: Id: VerificationQueue Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_event_rule_to_sqs_write.yaml b/integration/resources/templates/combination/connector_event_rule_to_sqs_write.yaml index a1420a2a3..0f118988e 100644 --- a/integration/resources/templates/combination/connector_event_rule_to_sqs_write.yaml +++ b/integration/resources/templates/combination/connector_event_rule_to_sqs_write.yaml @@ -7,7 +7,7 @@ Resources: Timeout: 10 # in case eb has delay InlineCode: | const AWS = require('aws-sdk'); - + exports.handler = async (event) => { const eb = new AWS.EventBridge(); const response = await eb.putEvents({ @@ -33,10 +33,10 @@ Resources: QUEUE_URL: !Ref Queue EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' Policies: - - EventBridgePutEventsPolicy: - EventBusName: default - - SQSPollerPolicy: - QueueName: !GetAtt Queue.QueueName + - EventBridgePutEventsPolicy: + EventBusName: default + - SQSPollerPolicy: + QueueName: !GetAtt Queue.QueueName EventRule: Type: AWS::Events::Rule @@ -44,10 +44,10 @@ Resources: Description: !Sub 'EventRule-${AWS::StackName}' EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !GetAtt Queue.Arn - Id: "SQSqueue" + - Arn: !GetAtt Queue.Arn + Id: SQSqueue Queue: Type: AWS::SQS::Queue @@ -60,4 +60,6 @@ Resources: Destination: Id: Queue Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_function_to_bucket_read.yaml b/integration/resources/templates/combination/connector_function_to_bucket_read.yaml index 6f61b7cae..924d79669 100644 --- a/integration/resources/templates/combination/connector_function_to_bucket_read.yaml +++ b/integration/resources/templates/combination/connector_function_to_bucket_read.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -40,7 +40,9 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Bucket Permissions: - - Read \ No newline at end of file + - Read +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_function_to_bucket_write.yaml b/integration/resources/templates/combination/connector_function_to_bucket_write.yaml index 68749fd2b..ddf7d7691 100644 --- a/integration/resources/templates/combination/connector_function_to_bucket_write.yaml +++ b/integration/resources/templates/combination/connector_function_to_bucket_write.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -42,7 +42,9 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Bucket Permissions: - - Write \ No newline at end of file + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_function_to_eventbus_write.yaml b/integration/resources/templates/combination/connector_function_to_eventbus_write.yaml index a917e3c2f..cad10c8e0 100644 --- a/integration/resources/templates/combination/connector_function_to_eventbus_write.yaml +++ b/integration/resources/templates/combination/connector_function_to_eventbus_write.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -45,7 +45,7 @@ Resources: EventBus: Type: AWS::Events::EventBus - Properties: + Properties: Name: TestEventBus Connector: @@ -53,7 +53,9 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: EventBus Permissions: - - Write \ No newline at end of file + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_function_to_function.yaml b/integration/resources/templates/combination/connector_function_to_function.yaml index 14d7b8f28..affb9ce8f 100644 --- a/integration/resources/templates/combination/connector_function_to_function.yaml +++ b/integration/resources/templates/combination/connector_function_to_function.yaml @@ -4,24 +4,24 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole MyRole2: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -65,9 +65,11 @@ Resources: MyConnector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: TriggerFunction - Destination: + Destination: Id: MyFunction2 Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_function_to_queue_read.yaml b/integration/resources/templates/combination/connector_function_to_queue_read.yaml index 01fd436db..696e9c2fc 100644 --- a/integration/resources/templates/combination/connector_function_to_queue_read.yaml +++ b/integration/resources/templates/combination/connector_function_to_queue_read.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -39,7 +39,9 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Queue Permissions: - - Read \ No newline at end of file + - Read +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_function_to_queue_write.yaml b/integration/resources/templates/combination/connector_function_to_queue_write.yaml index c51c7f1db..1545b2ddd 100644 --- a/integration/resources/templates/combination/connector_function_to_queue_write.yaml +++ b/integration/resources/templates/combination/connector_function_to_queue_write.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -40,7 +40,9 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Queue Permissions: - - Write \ No newline at end of file + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_function_to_sfn_read.yaml b/integration/resources/templates/combination/connector_function_to_sfn_read.yaml index 06cb9319d..10e5e8c7b 100644 --- a/integration/resources/templates/combination/connector_function_to_sfn_read.yaml +++ b/integration/resources/templates/combination/connector_function_to_sfn_read.yaml @@ -21,8 +21,8 @@ Resources: Resource: !GetAtt StateMachineFunction.Arn End: true Policies: - - LambdaInvokePolicy: - FunctionName: !Ref StateMachineFunction + - LambdaInvokePolicy: + FunctionName: !Ref StateMachineFunction TriggerFunction: Type: AWS::Serverless::Function @@ -47,9 +47,11 @@ Resources: MyConnector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: TriggerFunction - Destination: + Destination: Id: StateMachine Permissions: - - Read \ No newline at end of file + - Read +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_function_to_sfn_write.yaml b/integration/resources/templates/combination/connector_function_to_sfn_write.yaml index 3b90f6265..61a0dab3c 100644 --- a/integration/resources/templates/combination/connector_function_to_sfn_write.yaml +++ b/integration/resources/templates/combination/connector_function_to_sfn_write.yaml @@ -21,8 +21,8 @@ Resources: Resource: !GetAtt StateMachineFunction.Arn End: true Policies: - - LambdaInvokePolicy: - FunctionName: !Ref StateMachineFunction + - LambdaInvokePolicy: + FunctionName: !Ref StateMachineFunction TriggerFunction: Type: AWS::Serverless::Function @@ -46,9 +46,11 @@ Resources: MyConnector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: TriggerFunction - Destination: + Destination: Id: StateMachine Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_function_to_table_read.yaml b/integration/resources/templates/combination/connector_function_to_table_read.yaml index f7050a7fb..e791d3bd8 100644 --- a/integration/resources/templates/combination/connector_function_to_table_read.yaml +++ b/integration/resources/templates/combination/connector_function_to_table_read.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -40,18 +40,20 @@ Resources: Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - - AttributeName: "Id" - AttributeType: "S" + - AttributeName: Id + AttributeType: S KeySchema: - - AttributeName: "Id" - KeyType: "HASH" + - AttributeName: Id + KeyType: HASH MyReadConnector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: TriggerFunction - Destination: + Destination: Id: MyTable Permissions: - - Read + - Read +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_function_to_table_write.yaml b/integration/resources/templates/combination/connector_function_to_table_write.yaml index fccdcfc52..d70faf54c 100644 --- a/integration/resources/templates/combination/connector_function_to_table_write.yaml +++ b/integration/resources/templates/combination/connector_function_to_table_write.yaml @@ -26,18 +26,20 @@ Resources: Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - - AttributeName: "Id" - AttributeType: "S" + - AttributeName: Id + AttributeType: S KeySchema: - - AttributeName: "Id" - KeyType: "HASH" + - AttributeName: Id + KeyType: HASH MyWriteConnector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: TriggerFunction - Destination: + Destination: Id: MyTable Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_function_to_topic_write.yaml b/integration/resources/templates/combination/connector_function_to_topic_write.yaml index 73e9ef9c8..43e2eb25f 100644 --- a/integration/resources/templates/combination/connector_function_to_topic_write.yaml +++ b/integration/resources/templates/combination/connector_function_to_topic_write.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -41,7 +41,9 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Topic Permissions: - - Write \ No newline at end of file + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_httpapi_to_function.yaml b/integration/resources/templates/combination/connector_httpapi_to_function.yaml index 813410733..8b53dea7a 100644 --- a/integration/resources/templates/combination/connector_httpapi_to_function.yaml +++ b/integration/resources/templates/combination/connector_httpapi_to_function.yaml @@ -4,24 +4,24 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole MyRole2: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -37,11 +37,11 @@ Resources: const req = https.get(process.env.API_URL, res => { var body = []; - + res.on('data', function(chunk) { body.push(chunk); }); - + res.on('end', function() { try { const message = JSON.parse(Buffer.concat(body).toString())['message']; @@ -97,7 +97,7 @@ Resources: Properties: ApiId: !Ref HttpApi StageName: prod - AutoDeploy: True + AutoDeploy: true Integration: Type: AWS::ApiGatewayV2::Integration @@ -124,4 +124,6 @@ Resources: Destination: Id: ConnectedFunction Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_restapi_to_function.yaml b/integration/resources/templates/combination/connector_restapi_to_function.yaml index 10a5da1aa..3bb55c5ce 100644 --- a/integration/resources/templates/combination/connector_restapi_to_function.yaml +++ b/integration/resources/templates/combination/connector_restapi_to_function.yaml @@ -4,24 +4,24 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole MyRole2: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -37,11 +37,11 @@ Resources: const req = https.get(process.env.API_URL, res => { var body = []; - + res.on('data', function(chunk) { body.push(chunk); }); - + res.on('end', function() { try { const message = JSON.parse(Buffer.concat(body).toString())['message']; @@ -94,15 +94,15 @@ Resources: # BJS and gov regions only support REGIONAL endpoints, # using REGIONAL for all regions for simplicity. Types: - - REGIONAL + - REGIONAL Path: Type: AWS::ApiGateway::Resource Properties: RestApiId: !Ref RestApi ParentId: !GetAtt - - RestApi - - RootResourceId + - RestApi + - RootResourceId PathPart: somepath Method: @@ -121,14 +121,14 @@ Resources: RestAPIDeployment: Type: AWS::ApiGateway::Deployment DependsOn: - - Method + - Method Properties: RestApiId: !Ref RestApi RestAPIGatewayStage: Type: AWS::ApiGateway::Stage DependsOn: - - Method + - Method Properties: DeploymentId: !Ref RestAPIDeployment RestApiId: !Ref RestApi @@ -142,4 +142,6 @@ Resources: Destination: Id: ConnectedFunction Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_sfn_to_bucket_read.yaml b/integration/resources/templates/combination/connector_sfn_to_bucket_read.yaml index 2f53b2854..fd9200e8f 100644 --- a/integration/resources/templates/combination/connector_sfn_to_bucket_read.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_bucket_read.yaml @@ -1,7 +1,7 @@ Resources: Bucket: Type: AWS::S3::Bucket - + TriggerStateMachine: Type: AWS::Serverless::StateMachine @@ -12,13 +12,13 @@ Resources: States: ListBucket: Type: Task - Parameters: + Parameters: Bucket: !Ref Bucket Resource: !Sub "arn:${AWS::Partition}:states:::aws-sdk:s3:listObjectsV2" End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingIsNotStateMachineFunction" + - LambdaInvokePolicy: + FunctionName: SomethingIsNotStateMachineFunction MyConnector: Type: AWS::Serverless::Connector @@ -28,4 +28,6 @@ Resources: Destination: Id: Bucket Permissions: - - Read \ No newline at end of file + - Read +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_sfn_to_bucket_write.yaml b/integration/resources/templates/combination/connector_sfn_to_bucket_write.yaml index 9fa0935c6..4fe0ba29c 100644 --- a/integration/resources/templates/combination/connector_sfn_to_bucket_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_bucket_write.yaml @@ -12,14 +12,14 @@ Resources: PutObject: Type: Task Parameters: - "Bucket": !Ref Bucket - "Body": {} - "Key": "MyData" + Bucket: !Ref Bucket + Body: {} + Key: MyData Resource: !Sub "arn:${AWS::Partition}:states:::aws-sdk:s3:putObject" End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingIsNotStateMachineFunction" + - LambdaInvokePolicy: + FunctionName: SomethingIsNotStateMachineFunction MyConnector: Type: AWS::Serverless::Connector @@ -29,4 +29,6 @@ Resources: Destination: Id: Bucket Permissions: - - Write \ No newline at end of file + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_sfn_to_eb_custom_write.yaml b/integration/resources/templates/combination/connector_sfn_to_eb_custom_write.yaml index 9a3617ec6..31098b3a2 100644 --- a/integration/resources/templates/combination/connector_sfn_to_eb_custom_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_eb_custom_write.yaml @@ -11,15 +11,15 @@ Resources: Resource: !Sub arn:${AWS::Partition}:states:::events:putEvents Parameters: Entries: - - Detail: - Message: Test - DetailType: Test - EventBusName: !Ref CustomEventBus - Source: !Sub "${AWS::StackName}-source" - End: True + - Detail: + Message: Test + DetailType: Test + EventBusName: !Ref CustomEventBus + Source: !Sub "${AWS::StackName}-source" + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter CustomEventBus: Type: AWS::Events::EventBus @@ -35,4 +35,6 @@ Resources: Type: AWS::Events::EventBus Arn: !GetAtt CustomEventBus.Arn Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_sfn_to_eb_default_write.yaml b/integration/resources/templates/combination/connector_sfn_to_eb_default_write.yaml index cb7d62b17..c1a72a6f2 100644 --- a/integration/resources/templates/combination/connector_sfn_to_eb_default_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_eb_default_write.yaml @@ -11,15 +11,15 @@ Resources: Resource: !Sub arn:${AWS::Partition}:states:::events:putEvents Parameters: Entries: - - Detail: - Message: Test - DetailType: Test - EventBusName: default - Source: !Sub "${AWS::StackName}-source" - End: True + - Detail: + Message: Test + DetailType: Test + EventBusName: default + Source: !Sub "${AWS::StackName}-source" + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter MyConnector: Type: AWS::Serverless::Connector @@ -30,4 +30,6 @@ Resources: Type: AWS::Events::EventBus Arn: !Sub arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/default Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_sfn_to_function_write.yaml b/integration/resources/templates/combination/connector_sfn_to_function_write.yaml index 8cfbbcbf0..e91344d8e 100644 --- a/integration/resources/templates/combination/connector_sfn_to_function_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_function_write.yaml @@ -11,10 +11,10 @@ Resources: Resource: !Sub arn:${AWS::Partition}:states:::lambda:invoke Parameters: FunctionName: !Ref MyFunction - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingIsNotStateMachineFunction" + - LambdaInvokePolicy: + FunctionName: SomethingIsNotStateMachineFunction MyFunction: Type: AWS::Serverless::Function @@ -34,4 +34,6 @@ Resources: Destination: Id: MyFunction Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_sfn_to_sfn_async.yaml b/integration/resources/templates/combination/connector_sfn_to_sfn_async.yaml index 67c27aecf..331a1c887 100644 --- a/integration/resources/templates/combination/connector_sfn_to_sfn_async.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_sfn_async.yaml @@ -11,10 +11,10 @@ Resources: Resource: !Sub arn:${AWS::Partition}:states:::states:startExecution Parameters: StateMachineArn: !Ref MyStateMachine - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter MyStateMachine: Type: AWS::Serverless::StateMachine @@ -26,8 +26,8 @@ Resources: Success: Type: Succeed Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter MyConnector: Type: AWS::Serverless::Connector @@ -37,5 +37,7 @@ Resources: Destination: Id: MyStateMachine Permissions: - - Read - - Write + - Read + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_sfn_to_sfn_sync.yaml b/integration/resources/templates/combination/connector_sfn_to_sfn_sync.yaml index e95261755..2952ca57f 100644 --- a/integration/resources/templates/combination/connector_sfn_to_sfn_sync.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_sfn_sync.yaml @@ -11,10 +11,10 @@ Resources: Resource: !Sub arn:${AWS::Partition}:states:::states:startExecution.sync:2 Parameters: StateMachineArn: !Ref MyStateMachine - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter MyStateMachine: Type: AWS::Serverless::StateMachine @@ -26,8 +26,8 @@ Resources: Success: Type: Succeed Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter MyConnector: Type: AWS::Serverless::Connector @@ -37,5 +37,7 @@ Resources: Destination: Id: MyStateMachine Permissions: - - Read - - Write + - Read + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_sfn_to_sns_write.yaml b/integration/resources/templates/combination/connector_sfn_to_sns_write.yaml index b9378c303..5ad20ed01 100644 --- a/integration/resources/templates/combination/connector_sfn_to_sns_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_sns_write.yaml @@ -12,10 +12,10 @@ Resources: Parameters: TopicArn: !Ref MyTopic Message: hello - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingIsNotStateMachineFunction" + - LambdaInvokePolicy: + FunctionName: SomethingIsNotStateMachineFunction MyTopic: Type: AWS::SNS::Topic @@ -28,4 +28,6 @@ Resources: Destination: Id: MyTopic Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_sfn_to_sqs_write.yaml b/integration/resources/templates/combination/connector_sfn_to_sqs_write.yaml index 8eba7d772..d1bcd003a 100644 --- a/integration/resources/templates/combination/connector_sfn_to_sqs_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_sqs_write.yaml @@ -12,10 +12,10 @@ Resources: Parameters: QueueUrl: !Ref MyQueue MessageBody: hello - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter MyQueue: Type: AWS::SQS::Queue @@ -28,4 +28,6 @@ Resources: Destination: Id: MyQueue Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_sfn_to_table_read.yaml b/integration/resources/templates/combination/connector_sfn_to_table_read.yaml index c4ed38e0e..dcc02c891 100644 --- a/integration/resources/templates/combination/connector_sfn_to_table_read.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_table_read.yaml @@ -14,21 +14,21 @@ Resources: Key: Id: S: some-value - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingIsNotStateMachineFunction" + - LambdaInvokePolicy: + FunctionName: SomethingIsNotStateMachineFunction MyTable: Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - - AttributeName: "Id" - AttributeType: "S" + - AttributeName: Id + AttributeType: S KeySchema: - - AttributeName: "Id" - KeyType: "HASH" + - AttributeName: Id + KeyType: HASH MyConnector: Type: AWS::Serverless::Connector @@ -38,4 +38,6 @@ Resources: Destination: Id: MyTable Permissions: - - Read + - Read +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_sfn_to_table_write.yaml b/integration/resources/templates/combination/connector_sfn_to_table_write.yaml index a2d5d31b2..baa459973 100644 --- a/integration/resources/templates/combination/connector_sfn_to_table_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_table_write.yaml @@ -14,21 +14,21 @@ Resources: Item: Id: S: some-value - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingIsNotStateMachineFunction" + - LambdaInvokePolicy: + FunctionName: SomethingIsNotStateMachineFunction MyTable: Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - - AttributeName: "Id" - AttributeType: "S" + - AttributeName: Id + AttributeType: S KeySchema: - - AttributeName: "Id" - KeyType: "HASH" + - AttributeName: Id + KeyType: HASH MyConnector: Type: AWS::Serverless::Connector @@ -38,4 +38,6 @@ Resources: Destination: Id: MyTable Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_sns_to_function_write.yaml b/integration/resources/templates/combination/connector_sns_to_function_write.yaml index caf403a9c..e7cdff573 100644 --- a/integration/resources/templates/combination/connector_sns_to_function_write.yaml +++ b/integration/resources/templates/combination/connector_sns_to_function_write.yaml @@ -3,8 +3,8 @@ Resources: Type: AWS::SNS::Topic Properties: Subscription: - - Endpoint: !GetAtt 'InvokedFunction.Arn' - Protocol: lambda + - Endpoint: !GetAtt 'InvokedFunction.Arn' + Protocol: lambda TriggerFunction: Type: AWS::Serverless::Function @@ -13,32 +13,32 @@ Resources: Handler: index.handler Timeout: 10 # in case eb has delay InlineCode: | - const AWS = require('aws-sdk'); - exports.handler = async (event) => { - var params = { - Message: 'Test Message', - TopicArn: process.env.TOPIC_ARN, - }; - var sns = new AWS.SNS(); - var sqs = new AWS.SQS(); - await sns.publish(params).promise(); - - const data = await sqs.receiveMessage({ - QueueUrl: process.env.VERIFICATION_QUEUE_URL, - WaitTimeSeconds: 5, - }).promise(); - if (data.Messages.length == 0) { - throw 'No messages in the queue!'; - } + const AWS = require('aws-sdk'); + exports.handler = async (event) => { + var params = { + Message: 'Test Message', + TopicArn: process.env.TOPIC_ARN, }; + var sns = new AWS.SNS(); + var sqs = new AWS.SQS(); + await sns.publish(params).promise(); + + const data = await sqs.receiveMessage({ + QueueUrl: process.env.VERIFICATION_QUEUE_URL, + WaitTimeSeconds: 5, + }).promise(); + if (data.Messages.length == 0) { + throw 'No messages in the queue!'; + } + }; Environment: Variables: TOPIC_ARN: !Ref Topic VERIFICATION_QUEUE_URL: !Ref VerificationQueue EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' Policies: - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName InvokedFunction: Type: AWS::Serverless::Function @@ -58,29 +58,31 @@ Resources: Variables: VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSSendMessagePolicy: - QueueName: !GetAtt VerificationQueue.QueueName - + - SQSSendMessagePolicy: + QueueName: !GetAtt VerificationQueue.QueueName + VerificationQueue: Type: AWS::SQS::Queue Connector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: Topic - Destination: + Destination: Id: InvokedFunction Permissions: - - Write + - Write ConnectorNotTested: Type: AWS::Serverless::Connector Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Topic Permissions: - - Write + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_sqs_to_function.yaml b/integration/resources/templates/combination/connector_sqs_to_function.yaml index 3db60e904..ccc19426f 100644 --- a/integration/resources/templates/combination/connector_sqs_to_function.yaml +++ b/integration/resources/templates/combination/connector_sqs_to_function.yaml @@ -31,10 +31,10 @@ Resources: QUEUE_URL: !Ref Queue VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName - - SQSSendMessagePolicy: - QueueName: !GetAtt Queue.QueueName + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName + - SQSSendMessagePolicy: + QueueName: !GetAtt Queue.QueueName InvokedFunction: Type: AWS::Serverless::Function @@ -54,17 +54,17 @@ Resources: Variables: VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSSendMessagePolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSSendMessagePolicy: + QueueName: !GetAtt VerificationQueue.QueueName SQSEventSourceMapping: Type: AWS::Lambda::EventSourceMapping Properties: FunctionName: !Ref InvokedFunction - EventSourceArn: + EventSourceArn: Fn::GetAtt: - - "Queue" - - "Arn" + - Queue + - Arn BatchSize: 10 VerificationQueue: @@ -73,10 +73,12 @@ Resources: Connector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: Queue - Destination: + Destination: Id: InvokedFunction Permissions: - - Read - - Write \ No newline at end of file + - Read + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_table_to_function_read.yaml b/integration/resources/templates/combination/connector_table_to_function_read.yaml index d0e435d54..dd1a3c1d6 100644 --- a/integration/resources/templates/combination/connector_table_to_function_read.yaml +++ b/integration/resources/templates/combination/connector_table_to_function_read.yaml @@ -37,8 +37,8 @@ Resources: TABLE_NAME: !Ref Table VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName InvokedFunction: Type: AWS::Serverless::Function @@ -58,8 +58,8 @@ Resources: Variables: VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSSendMessagePolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSSendMessagePolicy: + QueueName: !GetAtt VerificationQueue.QueueName VerificationQueue: Type: AWS::SQS::Queue @@ -69,18 +69,18 @@ Resources: Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - - AttributeName: "Id" - AttributeType: "S" + - AttributeName: Id + AttributeType: S KeySchema: - - AttributeName: "Id" - KeyType: "HASH" + - AttributeName: Id + KeyType: HASH StreamSpecification: StreamViewType: NEW_AND_OLD_IMAGES DynamoDBTableStream: Type: AWS::Lambda::EventSourceMapping Properties: - Enabled: True + Enabled: true EventSourceArn: !GetAtt Table.StreamArn FunctionName: !GetAtt InvokedFunction.Arn StartingPosition: TRIM_HORIZON @@ -88,19 +88,21 @@ Resources: Connector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: Table - Destination: + Destination: Id: InvokedFunction Permissions: - - Read + - Read ConnectorNotTested: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: TriggerFunction - Destination: + Destination: Id: Table Permissions: - - Write \ No newline at end of file + - Write +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/connector_topic_to_queue_write.yaml b/integration/resources/templates/combination/connector_topic_to_queue_write.yaml index 8cd430835..8a446600e 100644 --- a/integration/resources/templates/combination/connector_topic_to_queue_write.yaml +++ b/integration/resources/templates/combination/connector_topic_to_queue_write.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -46,11 +46,11 @@ Resources: Type: AWS::SNS::Topic Properties: Subscription: - - Endpoint: - Fn::GetAtt: - - "Queue" - - "Arn" - Protocol: "sqs" + - Endpoint: + Fn::GetAtt: + - Queue + - Arn + Protocol: sqs Queue: Type: AWS::SQS::Queue @@ -60,27 +60,29 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Topic Permissions: - - Write + - Write Connector2: Type: AWS::Serverless::Connector Properties: Source: Id: Topic - Destination: + Destination: Id: Queue Permissions: - - Write + - Write Connector3: Type: AWS::Serverless::Connector Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Queue Permissions: - - Read \ No newline at end of file + - Read +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/depends_on.yaml b/integration/resources/templates/combination/depends_on.yaml index a3dba05bf..036b9b939 100644 --- a/integration/resources/templates/combination/depends_on.yaml +++ b/integration/resources/templates/combination/depends_on.yaml @@ -6,46 +6,45 @@ Resources: # https://github.com/awslabs/serverless-application-model/issues/68#issuecomment-276495326 MyLambdaFunction: - Type: "AWS::Serverless::Function" + Type: AWS::Serverless::Function DependsOn: LambdaRolePolicy Properties: Role: - "Fn::GetAtt": LambdaRole.Arn + Fn::GetAtt: LambdaRole.Arn Handler: lambda_function.lambda_handler Runtime: python3.8 Timeout: 15 CodeUri: ${codeuri} LambdaRole: - Type: "AWS::IAM::Role" + Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: - Version: "2012-10-17" + Version: '2012-10-17' Statement: - - - Effect: "Allow" - Action: - - "sts:AssumeRole" - Principal: - Service: - - "lambda.amazonaws.com" + - Effect: Allow + Action: + - sts:AssumeRole + Principal: + Service: + - lambda.amazonaws.com LambdaRolePolicy: - Type: "AWS::IAM::Policy" + Type: AWS::IAM::Policy Properties: - PolicyName: "LambdaRolePolicy" + PolicyName: LambdaRolePolicy PolicyDocument: - Version: "2012-10-17" + Version: '2012-10-17' Statement: - - - Effect: "Allow" - Action: - - "logs:CreateLogGroup" - - "logs:CreateLogStream" - - "logs:PutLogEvents" - Resource: - - "*" + - Effect: Allow + Action: + - logs:CreateLogGroup + - logs:CreateLogStream + - logs:PutLogEvents + Resource: + - '*' Roles: - - - Ref: "LambdaRole" + - Ref: LambdaRole +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_alias.yaml b/integration/resources/templates/combination/function_with_alias.yaml index 194f6cd00..ab55c80f2 100644 --- a/integration/resources/templates/combination/function_with_alias.yaml +++ b/integration/resources/templates/combination/function_with_alias.yaml @@ -6,3 +6,5 @@ Resources: Runtime: nodejs14.x CodeUri: ${codeuri} AutoPublishAlias: Live +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_alias_and_event_sources.yaml b/integration/resources/templates/combination/function_with_alias_and_event_sources.yaml index 9be190114..aaefef483 100644 --- a/integration/resources/templates/combination/function_with_alias_and_event_sources.yaml +++ b/integration/resources/templates/combination/function_with_alias_and_event_sources.yaml @@ -4,7 +4,7 @@ Resources: MyAwesomeFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: index.handler @@ -16,7 +16,7 @@ Resources: CWSchedule: Type: Schedule Properties: - Schedule: 'rate(1 minute)' + Schedule: rate(1 minute) CWEvent: Type: CloudWatchEvent @@ -57,7 +57,7 @@ Resources: Type: Kinesis Properties: Stream: - Fn::GetAtt: ["Stream", "Arn"] + Fn::GetAtt: [Stream, Arn] BatchSize: 100 StartingPosition: TRIM_HORIZON @@ -65,7 +65,7 @@ Resources: Type: DynamoDB Properties: Stream: - Fn::GetAtt: ["MyTable", "StreamArn"] + Fn::GetAtt: [MyTable, StreamArn] BatchSize: 200 StartingPosition: LATEST @@ -78,7 +78,7 @@ Resources: ExistingRestApi: Type: AWS::Serverless::Api Properties: - StageName: "Dev" + StageName: Dev DefinitionUri: ${definitionuri} Stream: @@ -104,3 +104,5 @@ Resources: - KeyType: HASH AttributeName: id +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_alias_globals.yaml b/integration/resources/templates/combination/function_with_alias_globals.yaml index 04329304a..6bd2ec08a 100644 --- a/integration/resources/templates/combination/function_with_alias_globals.yaml +++ b/integration/resources/templates/combination/function_with_alias_globals.yaml @@ -19,3 +19,5 @@ Resources: Runtime: nodejs14.x CodeUri: ${codeuri} AutoPublishAlias: Live +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_alias_intrinsics.yaml b/integration/resources/templates/combination/function_with_alias_intrinsics.yaml index 7f3fc7baa..8d7344a96 100644 --- a/integration/resources/templates/combination/function_with_alias_intrinsics.yaml +++ b/integration/resources/templates/combination/function_with_alias_intrinsics.yaml @@ -1,18 +1,18 @@ Parameters: - Bucket: - Type: String - CodeKey: - Type: String - SwaggerKey: - Type: String - AliasName: - Type: String - Default: Live + Bucket: + Type: String + CodeKey: + Type: String + SwaggerKey: + Type: String + AliasName: + Type: String + Default: Live Globals: Function: AutoPublishAlias: - Ref: AliasName + Ref: AliasName Resources: MyLambdaFunction: @@ -23,7 +23,9 @@ Resources: CodeUri: # Just trying to create a complex intrinsic function where only a part of it can be resolved Bucket: - Fn::Join: ["", [{Ref: Bucket}]] + Fn::Join: ['', [Ref: Bucket]] Key: # Even though the entire Sub won't be resolved, translator will substitute ${Key} with value passed at runtime - Fn::Sub: "${CodeKey}" + Fn::Sub: ${CodeKey} +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_all_event_types.yaml b/integration/resources/templates/combination/function_with_all_event_types.yaml index ae6897e34..5148832b2 100644 --- a/integration/resources/templates/combination/function_with_all_event_types.yaml +++ b/integration/resources/templates/combination/function_with_all_event_types.yaml @@ -7,8 +7,8 @@ Parameters: Conditions: MyCondition: Fn::Equals: - - true - - true + - true + - true Resources: @@ -30,7 +30,7 @@ Resources: # All Event Types MyAwesomeFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: MyCondition Properties: InlineCode: | @@ -42,11 +42,11 @@ Resources: CWSchedule: Type: Schedule Properties: - Schedule: 'rate(1 minute)' + Schedule: rate(1 minute) Name: Ref: ScheduleName Description: test schedule - Enabled: False + Enabled: false CWEvent: Type: CloudWatchEvent @@ -126,17 +126,19 @@ Resources: ShardCount: 1 MyDynamoDB: - Type: 'AWS::DynamoDB::Table' + Type: AWS::DynamoDB::Table Condition: MyCondition Properties: AttributeDefinitions: - - AttributeName: id - AttributeType: S + - AttributeName: id + AttributeType: S KeySchema: - - AttributeName: id - KeyType: HASH + - AttributeName: id + KeyType: HASH ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 StreamSpecification: StreamViewType: NEW_IMAGE +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_all_event_types_condition_false.yaml b/integration/resources/templates/combination/function_with_all_event_types_condition_false.yaml index 10335a4ee..25b32ce5c 100644 --- a/integration/resources/templates/combination/function_with_all_event_types_condition_false.yaml +++ b/integration/resources/templates/combination/function_with_all_event_types_condition_false.yaml @@ -2,8 +2,8 @@ AWSTemplateFormatVersion: '2010-09-09' Conditions: MyCondition: Fn::Equals: - - true - - false + - true + - false Resources: @@ -25,7 +25,7 @@ Resources: # All Event Types MyAwesomeFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: MyCondition Properties: InlineCode: | @@ -37,7 +37,7 @@ Resources: CWSchedule: Type: Schedule Properties: - Schedule: 'rate(1 minute)' + Schedule: rate(1 minute) CWEvent: Type: CloudWatchEvent @@ -115,17 +115,19 @@ Resources: ShardCount: 1 MyDynamoDB: - Type: 'AWS::DynamoDB::Table' + Type: AWS::DynamoDB::Table Condition: MyCondition Properties: AttributeDefinitions: - - AttributeName: id - AttributeType: S + - AttributeName: id + AttributeType: S KeySchema: - - AttributeName: id - KeyType: HASH + - AttributeName: id + KeyType: HASH ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 StreamSpecification: - StreamViewType: NEW_IMAGE \ No newline at end of file + StreamViewType: NEW_IMAGE +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_api.yaml b/integration/resources/templates/combination/function_with_api.yaml index 8ad44c5a5..75c058922 100644 --- a/integration/resources/templates/combination/function_with_api.yaml +++ b/integration/resources/templates/combination/function_with_api.yaml @@ -4,7 +4,7 @@ Resources: ExistingRestApi: Type: AWS::Serverless::Api Properties: - StageName: "Dev" + StageName: Dev DefinitionUri: ${definitionuri} MyLambdaFunction: @@ -31,3 +31,5 @@ Resources: Method: post RestApiId: Ref: ExistingRestApi +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_application.yaml b/integration/resources/templates/combination/function_with_application.yaml index 4dd90743d..1661dac45 100644 --- a/integration/resources/templates/combination/function_with_application.yaml +++ b/integration/resources/templates/combination/function_with_application.yaml @@ -1,12 +1,12 @@ Conditions: TrueCondition: Fn::Equals: - - true - - true + - true + - true FalseCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunctionWithApplication: @@ -18,7 +18,7 @@ Resources: Environment: Variables: TABLE_NAME: - Fn::GetAtt: ["MyNestedApp", "Outputs.TableName"] + Fn::GetAtt: [MyNestedApp, Outputs.TableName] MyNestedApp: Type: AWS::Serverless::Application @@ -30,4 +30,6 @@ Resources: Type: AWS::Serverless::Application Condition: FalseCondition Properties: - Location: ${templateurl} \ No newline at end of file + Location: ${templateurl} +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_cloudwatch_log.yaml b/integration/resources/templates/combination/function_with_cloudwatch_log.yaml index 6ed04eaa3..71552e005 100644 --- a/integration/resources/templates/combination/function_with_cloudwatch_log.yaml +++ b/integration/resources/templates/combination/function_with_cloudwatch_log.yaml @@ -1,6 +1,6 @@ Resources: MyLambdaFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: nodejs14.x @@ -13,8 +13,10 @@ Resources: LogGroupName: Ref: CloudWatchLambdaLogsGroup FilterPattern: My filter pattern - + CloudWatchLambdaLogsGroup: Type: AWS::Logs::LogGroup Properties: - RetentionInDays: 7 \ No newline at end of file + RetentionInDays: 7 +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_custom_code_deploy.yaml b/integration/resources/templates/combination/function_with_custom_code_deploy.yaml index a3d24e118..b05ad644b 100644 --- a/integration/resources/templates/combination/function_with_custom_code_deploy.yaml +++ b/integration/resources/templates/combination/function_with_custom_code_deploy.yaml @@ -6,7 +6,7 @@ Parameters: Resources: MyLambdaFunction: DependsOn: CustomDeploymentConfig - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: index.handler @@ -18,7 +18,7 @@ Resources: Type: Ref: CustomDeploymentConfig Role: - Fn::GetAtt: [ DeploymentRole, Arn ] + Fn::GetAtt: [DeploymentRole, Arn] DeploymentRole: Type: AWS::IAM::Role @@ -34,21 +34,19 @@ Resources: - codedeploy.amazonaws.com Policies: - - - PolicyName: "root" - PolicyDocument: - Version: "2012-10-17" - Statement: - - - Effect: "Allow" - Resource: "*" - Action: - - "cloudwatch:DescribeAlarms" - - "lambda:UpdateAlias" - - "lambda:GetAlias" - - "lambda:InvokeFunction" - - "s3:Get*" - - "sns:Publish" + - PolicyName: root + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Resource: '*' + Action: + - cloudwatch:DescribeAlarms + - lambda:UpdateAlias + - lambda:GetAlias + - lambda:InvokeFunction + - s3:Get* + - sns:Publish CustomDeploymentConfig: Type: AWS::CodeDeploy::DeploymentConfig @@ -60,4 +58,6 @@ Resources: Type: TimeBasedLinear TimeBasedLinear: LinearInterval: 1 - LinearPercentage: 50 \ No newline at end of file + LinearPercentage: 50 +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_cwe_dlq_and_retry_policy.yaml b/integration/resources/templates/combination/function_with_cwe_dlq_and_retry_policy.yaml index 3941cd133..5f4b990b0 100644 --- a/integration/resources/templates/combination/function_with_cwe_dlq_and_retry_policy.yaml +++ b/integration/resources/templates/combination/function_with_cwe_dlq_and_retry_policy.yaml @@ -24,23 +24,25 @@ Resources: DeadLetterConfig: Arn: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" + - MyDeadLetterQueue + - Arn Outputs: MyLambdaArn: - Description: "Arn of the Lambda target" + Description: Arn of the Lambda target Value: Fn::GetAtt: - - "MyLambdaFunction" - - "Arn" + - MyLambdaFunction + - Arn MyEventName: - Description: "Name of the CloudWatchEvent rule created" + Description: Name of the CloudWatchEvent rule created Value: Ref: MyLambdaFunctionCWEvent MyDLQArn: - Description: "Arn of the dead-letter queue provided for the CWE rule target" + Description: Arn of the dead-letter queue provided for the CWE rule target Value: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" + - MyDeadLetterQueue + - Arn +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_cwe_dlq_generated.yaml b/integration/resources/templates/combination/function_with_cwe_dlq_generated.yaml index 2fe0ea53c..5b0ad1c1d 100644 --- a/integration/resources/templates/combination/function_with_cwe_dlq_generated.yaml +++ b/integration/resources/templates/combination/function_with_cwe_dlq_generated.yaml @@ -24,23 +24,25 @@ Resources: Outputs: MyLambdaArn: - Description: "Arn of the Lambda target" + Description: Arn of the Lambda target Value: Fn::GetAtt: - - "MyLambdaFunction" - - "Arn" + - MyLambdaFunction + - Arn MyEventName: - Description: "Name of the CWE rule created" + Description: Name of the CWE rule created Value: Ref: MyLambdaFunctionCWEvent MyDLQArn: - Description: "Arn of the dead-letter queue provided for the CWE rule target" + Description: Arn of the dead-letter queue provided for the CWE rule target Value: Fn::GetAtt: - - "MyDlq" - - "Arn" + - MyDlq + - Arn MyDLQUrl: - Description: "Url of the dead-letter queue provided for the CWE rule target" + Description: Url of the dead-letter queue provided for the CWE rule target Value: Ref: MyDlq +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_deployment_alarms_and_hooks.yaml b/integration/resources/templates/combination/function_with_deployment_alarms_and_hooks.yaml index ef127bb0f..32189a8bd 100644 --- a/integration/resources/templates/combination/function_with_deployment_alarms_and_hooks.yaml +++ b/integration/resources/templates/combination/function_with_deployment_alarms_and_hooks.yaml @@ -1,128 +1,128 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - - AutoPublishAlias: Live - - DeploymentPreference: - Role: - Fn::GetAtt: [ DeploymentRole, Arn ] - Type: Canary10Percent5Minutes - Alarms: - - {"Ref": "NewVersionErrorsAlarm"} - - {"Ref": "AliasErrorsAlarm"} - - {"Ref": "FunctionErrorsAlarm"} + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + + AutoPublishAlias: Live + + DeploymentPreference: + Role: + Fn::GetAtt: [DeploymentRole, Arn] + Type: Canary10Percent5Minutes + Alarms: + - {Ref: NewVersionErrorsAlarm} + - {Ref: AliasErrorsAlarm} + - {Ref: FunctionErrorsAlarm} # Hooks: # These hooks just hang so we're commenting them out for now or the deployment waits on them forever # PreTraffic: {"Ref": "PreTrafficFunction"} # PostTraffic: {"Ref": "PostTrafficFunction"} - DeploymentRole: - Type: AWS::IAM::Role - Properties: - AssumeRolePolicyDocument: - Version: '2012-10-17' - Statement: - - Action: - - sts:AssumeRole - Effect: Allow - Principal: - Service: - - codedeploy.amazonaws.com - - Policies: - - - PolicyName: "root" - PolicyDocument: - Version: "2012-10-17" - Statement: - - - Effect: "Allow" - Resource: "*" - Action: - - "cloudwatch:DescribeAlarms" - - "lambda:UpdateAlias" - - "lambda:GetAlias" - - "lambda:InvokeFunction" - - "s3:Get*" - - "sns:Publish" - - FunctionErrorsAlarm: - Type: AWS::CloudWatch::Alarm - Properties: - Namespace: AWS/Lambda - MetricName: Error - - Dimensions: - - Name: FunctionName - Value: - "Fn::GetAtt": ["MyLambdaFunction", "Arn"] - - Statistic: Maximum - Period: 60 - EvaluationPeriods: 5 - ComparisonOperator: GreaterThanOrEqualToThreshold - Threshold: 1.0 - - AliasErrorsAlarm: - Type: AWS::CloudWatch::Alarm - Properties: - Namespace: AWS/Lambda - MetricName: Error - - Dimensions: - - Name: FunctionName - Value: - "Fn::GetAtt": ["MyLambdaFunction", "Arn"] - - Name: Alias - Value: Live - - Statistic: Maximum - Period: 60 - EvaluationPeriods: 5 - ComparisonOperator: GreaterThanOrEqualToThreshold - Threshold: 1.0 + DeploymentRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Version: '2012-10-17' + Statement: + - Action: + - sts:AssumeRole + Effect: Allow + Principal: + Service: + - codedeploy.amazonaws.com + + Policies: + - PolicyName: root + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Resource: '*' + Action: + - cloudwatch:DescribeAlarms + - lambda:UpdateAlias + - lambda:GetAlias + - lambda:InvokeFunction + - s3:Get* + - sns:Publish + + FunctionErrorsAlarm: + Type: AWS::CloudWatch::Alarm + Properties: + Namespace: AWS/Lambda + MetricName: Error + + Dimensions: + - Name: FunctionName + Value: + Fn::GetAtt: [MyLambdaFunction, Arn] + + Statistic: Maximum + Period: 60 + EvaluationPeriods: 5 + ComparisonOperator: GreaterThanOrEqualToThreshold + Threshold: 1.0 + + AliasErrorsAlarm: + Type: AWS::CloudWatch::Alarm + Properties: + Namespace: AWS/Lambda + MetricName: Error + + Dimensions: + - Name: FunctionName + Value: + Fn::GetAtt: [MyLambdaFunction, Arn] + - Name: Alias + Value: Live + + Statistic: Maximum + Period: 60 + EvaluationPeriods: 5 + ComparisonOperator: GreaterThanOrEqualToThreshold + Threshold: 1.0 # Alarm pointing to the Errors metric on "latest" executed function version # When the deployment is happening, this alarm will point to the new version that ie being deployed - NewVersionErrorsAlarm: - Type: AWS::CloudWatch::Alarm - Properties: - Namespace: AWS/Lambda - MetricName: Error - - Dimensions: - - Name: FunctionName - Value: - "Fn::GetAtt": ["MyLambdaFunction", "Arn"] - - - Name: Alias - Value: Live - - - Name: ExecutedVersion - Value: - "Fn::GetAtt": ["MyLambdaFunction.Version", "Version"] - - Statistic: Maximum - Period: 60 - EvaluationPeriods: 5 - ComparisonOperator: GreaterThanOrEqualToThreshold - Threshold: 1.0 - - PreTrafficFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - - PostTrafficFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} \ No newline at end of file + NewVersionErrorsAlarm: + Type: AWS::CloudWatch::Alarm + Properties: + Namespace: AWS/Lambda + MetricName: Error + + Dimensions: + - Name: FunctionName + Value: + Fn::GetAtt: [MyLambdaFunction, Arn] + + - Name: Alias + Value: Live + + - Name: ExecutedVersion + Value: + Fn::GetAtt: [MyLambdaFunction.Version, Version] + + Statistic: Maximum + Period: 60 + EvaluationPeriods: 5 + ComparisonOperator: GreaterThanOrEqualToThreshold + Threshold: 1.0 + + PreTrafficFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + + PostTrafficFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_deployment_basic.yaml b/integration/resources/templates/combination/function_with_deployment_basic.yaml index b89c09ff3..4fc5f175b 100644 --- a/integration/resources/templates/combination/function_with_deployment_basic.yaml +++ b/integration/resources/templates/combination/function_with_deployment_basic.yaml @@ -1,7 +1,7 @@ # Just one function with a deployment preference Resources: MyLambdaFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: index.handler @@ -12,7 +12,7 @@ Resources: DeploymentPreference: Type: AllAtOnce Role: - Fn::GetAtt: [ DeploymentRole, Arn ] + Fn::GetAtt: [DeploymentRole, Arn] DeploymentRole: Type: AWS::IAM::Role @@ -28,18 +28,18 @@ Resources: - codedeploy.amazonaws.com Policies: - - - PolicyName: "root" - PolicyDocument: - Version: "2012-10-17" - Statement: - - - Effect: "Allow" - Resource: "*" - Action: - - "cloudwatch:DescribeAlarms" - - "lambda:UpdateAlias" - - "lambda:GetAlias" - - "lambda:InvokeFunction" - - "s3:Get*" - - "sns:Publish" + - PolicyName: root + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Resource: '*' + Action: + - cloudwatch:DescribeAlarms + - lambda:UpdateAlias + - lambda:GetAlias + - lambda:InvokeFunction + - s3:Get* + - sns:Publish +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_deployment_default_role_managed_policy.yaml b/integration/resources/templates/combination/function_with_deployment_default_role_managed_policy.yaml index 9d8e637c9..7f4bb115f 100644 --- a/integration/resources/templates/combination/function_with_deployment_default_role_managed_policy.yaml +++ b/integration/resources/templates/combination/function_with_deployment_default_role_managed_policy.yaml @@ -1,6 +1,6 @@ Resources: MyLambdaFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: index.handler @@ -8,3 +8,5 @@ Resources: AutoPublishAlias: Live DeploymentPreference: Type: Canary10Percent5Minutes +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_deployment_disabled.yaml b/integration/resources/templates/combination/function_with_deployment_disabled.yaml index 51bb3d188..237f4df12 100644 --- a/integration/resources/templates/combination/function_with_deployment_disabled.yaml +++ b/integration/resources/templates/combination/function_with_deployment_disabled.yaml @@ -8,7 +8,7 @@ Parameters: Type: String Enabled: Type: String - Default: False + Default: false Resources: MyLambdaFunction: @@ -23,7 +23,7 @@ Resources: DeploymentPreference: Type: AllAtOnce Role: - Fn::GetAtt: [ DeploymentRole, Arn ] + Fn::GetAtt: [DeploymentRole, Arn] Enabled: Ref: Enabled @@ -42,18 +42,18 @@ Resources: - codedeploy.amazonaws.com Policies: - - - PolicyName: "root" - PolicyDocument: - Version: "2012-10-17" - Statement: - - - Effect: "Allow" - Resource: "*" - Action: - - "cloudwatch:DescribeAlarms" - - "lambda:UpdateAlias" - - "lambda:GetAlias" - - "lambda:InvokeFunction" - - "s3:Get*" - - "sns:Publish" + - PolicyName: root + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Resource: '*' + Action: + - cloudwatch:DescribeAlarms + - lambda:UpdateAlias + - lambda:GetAlias + - lambda:InvokeFunction + - s3:Get* + - sns:Publish +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_deployment_globals.yaml b/integration/resources/templates/combination/function_with_deployment_globals.yaml index 03adf56ca..8b8c88e8d 100644 --- a/integration/resources/templates/combination/function_with_deployment_globals.yaml +++ b/integration/resources/templates/combination/function_with_deployment_globals.yaml @@ -8,11 +8,11 @@ Globals: Type: Ref: TypeParam Role: - Fn::GetAtt: [ DeploymentRole, Arn ] + Fn::GetAtt: [DeploymentRole, Arn] Resources: MyLambdaFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: index.handler @@ -33,18 +33,18 @@ Resources: - codedeploy.amazonaws.com Policies: - - - PolicyName: "root" - PolicyDocument: - Version: "2012-10-17" - Statement: - - - Effect: "Allow" - Resource: "*" - Action: - - "cloudwatch:DescribeAlarms" - - "lambda:UpdateAlias" - - "lambda:GetAlias" - - "lambda:InvokeFunction" - - "s3:Get*" - - "sns:Publish" + - PolicyName: root + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Resource: '*' + Action: + - cloudwatch:DescribeAlarms + - lambda:UpdateAlias + - lambda:GetAlias + - lambda:InvokeFunction + - s3:Get* + - sns:Publish +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_dynamodb.yaml b/integration/resources/templates/combination/function_with_dynamodb.yaml index 0a9b8d29b..460863bb6 100644 --- a/integration/resources/templates/combination/function_with_dynamodb.yaml +++ b/integration/resources/templates/combination/function_with_dynamodb.yaml @@ -19,24 +19,26 @@ Resources: StartingPosition: TRIM_HORIZON TumblingWindowInSeconds: 120 FunctionResponseTypes: - - ReportBatchItemFailures + - ReportBatchItemFailures MyTable: Type: AWS::DynamoDB::Table Properties: AttributeDefinitions: - - { AttributeName : id, AttributeType : S } + - {AttributeName: id, AttributeType: S} KeySchema: - - { "AttributeName" : "id", "KeyType" : "HASH"} + - {AttributeName: id, KeyType: HASH} ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" + ReadCapacityUnits: '5' + WriteCapacityUnits: '5' StreamSpecification: - StreamViewType: "NEW_IMAGE" + StreamViewType: NEW_IMAGE +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_file_system_config.yaml b/integration/resources/templates/combination/function_with_file_system_config.yaml index b03c84d6a..f98cd350b 100644 --- a/integration/resources/templates/combination/function_with_file_system_config.yaml +++ b/integration/resources/templates/combination/function_with_file_system_config.yaml @@ -18,8 +18,7 @@ Resources: SubnetId: Ref: PreCreatedSubnetOne SecurityGroups: - - - Fn::GetAtt: MySecurityGroup.GroupId + - Fn::GetAtt: MySecurityGroup.GroupId AccessPoint: Type: AWS::EFS::AccessPoint @@ -47,19 +46,19 @@ Resources: Timeout: 3 VpcConfig: SecurityGroupIds: - - - Fn::GetAtt: MySecurityGroup.GroupId + - Fn::GetAtt: MySecurityGroup.GroupId SubnetIds: - - - Ref: PreCreatedSubnetOne + - Ref: PreCreatedSubnetOne FileSystemConfigs: - - Arn: - Fn::GetAtt: AccessPoint.Arn - LocalMountPath: /mnt/EFS + - Arn: + Fn::GetAtt: AccessPoint.Arn + LocalMountPath: /mnt/EFS MySecurityGroup: - Type: "AWS::EC2::SecurityGroup" + Type: AWS::EC2::SecurityGroup Properties: - GroupDescription: "my test group" + GroupDescription: my test group VpcId: Ref: PreCreatedVpc +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_http_api.yaml b/integration/resources/templates/combination/function_with_http_api.yaml index f275e2969..5d14da915 100644 --- a/integration/resources/templates/combination/function_with_http_api.yaml +++ b/integration/resources/templates/combination/function_with_http_api.yaml @@ -12,7 +12,7 @@ Resources: GetApi: Type: HttpApi Properties: - ApiId: + ApiId: Ref: MyApi Method: GET Path: /some/path @@ -26,12 +26,14 @@ Resources: title: Ref: AWS::StackName paths: - "/some/path": {} - "/other": {} + /some/path: {} + /other: {} openapi: 3.0.1 Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: "https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/" \ No newline at end of file + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_http_api_default_path.yaml b/integration/resources/templates/combination/function_with_http_api_default_path.yaml index 5f8e903bc..cf636b4b0 100644 --- a/integration/resources/templates/combination/function_with_http_api_default_path.yaml +++ b/integration/resources/templates/combination/function_with_http_api_default_path.yaml @@ -28,12 +28,14 @@ Resources: paths: /$default: x-amazon-apigateway-any-method: - responses: { } + responses: {} isDefaultRoute: true openapi: 3.0.1 Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: "https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/" \ No newline at end of file + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_implicit_api_and_conditions.yaml b/integration/resources/templates/combination/function_with_implicit_api_and_conditions.yaml index 0f27dc92d..518af9659 100644 --- a/integration/resources/templates/combination/function_with_implicit_api_and_conditions.yaml +++ b/integration/resources/templates/combination/function_with_implicit_api_and_conditions.yaml @@ -3,52 +3,52 @@ Description: A template to test for implicit API condition handling. Conditions: MyCondition: Fn::Equals: - - true - - false + - true + - false Cond: Fn::Equals: - - true - - false + - true + - false Cond1: Fn::Equals: - - true - - false + - true + - false Cond2: Fn::Equals: - - true - - false + - true + - false Cond3: Fn::Equals: - - true - - false + - true + - false Cond4: Fn::Equals: - - true - - true + - true + - true Cond5: Fn::Equals: - - true - - false + - true + - false Cond6: Fn::Equals: - - true - - true + - true + - true Cond7: Fn::Equals: - - true - - false + - true + - false Cond8: Fn::Equals: - - true - - true + - true + - true Cond9: Fn::Equals: - - true - - false + - true + - false Resources: hello: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: MyCondition Properties: Handler: index.handler @@ -64,7 +64,7 @@ Resources: Path: /sub Method: get helloworld: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond Properties: Handler: index.handler @@ -80,7 +80,7 @@ Resources: Path: /sub Method: post helloworld1: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond1 Properties: Handler: index.handler @@ -96,7 +96,7 @@ Resources: Path: /sub1 Method: post helloworld2: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond2 Properties: Handler: index.handler @@ -112,7 +112,7 @@ Resources: Path: /sub2 Method: post helloworld3: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond3 Properties: Handler: index.handler @@ -128,7 +128,7 @@ Resources: Path: /sub3 Method: post helloworld4: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond4 Properties: Handler: index.handler @@ -144,7 +144,7 @@ Resources: Path: /sub4 Method: post helloworld5: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond5 Properties: Handler: index.handler @@ -160,7 +160,7 @@ Resources: Path: /sub5 Method: post helloworld6: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond6 Properties: Handler: index.handler @@ -176,7 +176,7 @@ Resources: Path: /sub6 Method: post helloworld7: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond7 Properties: Handler: index.handler @@ -192,7 +192,7 @@ Resources: Path: /sub7 Method: post helloworld8: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond8 Properties: Handler: index.handler @@ -208,7 +208,7 @@ Resources: Path: /sub8 Method: post helloworld9: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond9 Properties: Handler: index.handler @@ -222,4 +222,6 @@ Resources: Type: Api Properties: Path: /sub9 - Method: post \ No newline at end of file + Method: post +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_implicit_http_api.yaml b/integration/resources/templates/combination/function_with_implicit_http_api.yaml index 4b585a3c8..2008cb322 100644 --- a/integration/resources/templates/combination/function_with_implicit_http_api.yaml +++ b/integration/resources/templates/combination/function_with_implicit_http_api.yaml @@ -15,6 +15,8 @@ Resources: Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: "https://${ServerlessHttpApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/" \ No newline at end of file + Fn::Sub: https://${ServerlessHttpApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/ +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_kinesis.yaml b/integration/resources/templates/combination/function_with_kinesis.yaml index a62c3c722..c7596aa47 100644 --- a/integration/resources/templates/combination/function_with_kinesis.yaml +++ b/integration/resources/templates/combination/function_with_kinesis.yaml @@ -19,9 +19,11 @@ Resources: StartingPosition: LATEST TumblingWindowInSeconds: 120 FunctionResponseTypes: - - ReportBatchItemFailures + - ReportBatchItemFailures MyStream: Type: AWS::Kinesis::Stream Properties: ShardCount: 1 +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_kinesis_intrinsics.yaml b/integration/resources/templates/combination/function_with_kinesis_intrinsics.yaml index 002aafe16..e44c54f6d 100644 --- a/integration/resources/templates/combination/function_with_kinesis_intrinsics.yaml +++ b/integration/resources/templates/combination/function_with_kinesis_intrinsics.yaml @@ -18,12 +18,12 @@ Parameters: Conditions: TrueCondition: Fn::Equals: - - true - - true + - true + - true FalseCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunction: @@ -42,16 +42,16 @@ Resources: Ref: IntValue BisectBatchOnFunctionError: Fn::If: - - FalseCondition - - True - - False + - FalseCondition + - true + - false Enabled: Fn::If: - - TrueCondition - - True - - False + - TrueCondition + - true + - false FunctionResponseTypes: - - Ref: FunctionResponseTypesValue + - Ref: FunctionResponseTypesValue MaximumBatchingWindowInSeconds: Ref: One MaximumRecordAgeInSeconds: @@ -65,18 +65,20 @@ Resources: Stream: # Connect with the stream we have created in this template Fn::Join: - - '' - - - 'arn:' - - Ref: AWS::Partition - - ':kinesis:' - - Ref: AWS::Region - - ':' - - Ref: AWS::AccountId - - ':stream/' - - Ref: MyStream + - '' + - - 'arn:' + - Ref: AWS::Partition + - ':kinesis:' + - Ref: AWS::Region + - ':' + - Ref: AWS::AccountId + - :stream/ + - Ref: MyStream TumblingWindowInSeconds: Ref: IntValue MyStream: Type: AWS::Kinesis::Stream Properties: ShardCount: 1 +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_layer.yaml b/integration/resources/templates/combination/function_with_layer.yaml index 8ca4ea362..efbdd78db 100644 --- a/integration/resources/templates/combination/function_with_layer.yaml +++ b/integration/resources/templates/combination/function_with_layer.yaml @@ -1,12 +1,12 @@ Conditions: TrueCondition: Fn::Equals: - - true - - true + - true + - true FalseCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunctionWithLayer: @@ -16,8 +16,7 @@ Resources: Runtime: nodejs14.x CodeUri: ${codeuri} Layers: - - - Ref: MyLambdaLayer + - Ref: MyLambdaLayer MyLambdaLayer: Type: AWS::Serverless::LayerVersion @@ -35,5 +34,7 @@ Resources: Outputs: MyLambdaLayerArn: - Value: - Ref: MyLambdaLayer \ No newline at end of file + Value: + Ref: MyLambdaLayer +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_mq.yaml b/integration/resources/templates/combination/function_with_mq.yaml index bc5019fc0..6192a59ec 100644 --- a/integration/resources/templates/combination/function_with_mq.yaml +++ b/integration/resources/templates/combination/function_with_mq.yaml @@ -37,7 +37,7 @@ Resources: Properties: RouteTableId: Ref: RouteTable - DestinationCidrBlock: '0.0.0.0/0' + DestinationCidrBlock: 0.0.0.0/0 GatewayId: Ref: PreCreatedInternetGateway @@ -57,26 +57,26 @@ Resources: VpcId: Ref: PreCreatedVpc SecurityGroupIngress: - - IpProtocol: tcp - FromPort: 8162 - ToPort: 8162 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 61617 - ToPort: 61617 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 5671 - ToPort: 5671 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 61614 - ToPort: 61614 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 8883 - ToPort: 8883 - CidrIp: '0.0.0.0/0' + - IpProtocol: tcp + FromPort: 8162 + ToPort: 8162 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 61617 + ToPort: 61617 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 5671 + ToPort: 5671 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 61614 + ToPort: 61614 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 8883 + ToPort: 8883 + CidrIp: 0.0.0.0/0 MyLambdaExecutionRole: Type: AWS::IAM::Role @@ -84,37 +84,26 @@ Resources: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - - Action: ['sts:AssumeRole'] - Effect: Allow - Principal: - Service: [lambda.amazonaws.com] + - Action: [sts:AssumeRole] + Effect: Allow + Principal: + Service: [lambda.amazonaws.com] Policies: - - PolicyName: IntegrationTestExecution - PolicyDocument: - Statement: - - Action: [ 'ec2:CreateNetworkInterface', - 'ec2:CreateNetworkInterfacePermission', - 'ec2:DeleteNetworkInterface', - 'ec2:DeleteNetworkInterfacePermission', - 'ec2:DetachNetworkInterface', - 'ec2:DescribeSubnets', - 'ec2:DescribeNetworkInterfaces', - 'ec2:DescribeVpcs', - 'ec2:DescribeInternetGateways', - 'ec2:DescribeNetworkInterfacePermissions', - 'ec2:DescribeSecurityGroups', - 'ec2:DescribeRouteTables', - 'logs:CreateLogGroup', - 'logs:CreateLogStream', - 'logs:PutLogEvents', - 'kms:Decrypt', - 'mq:DescribeBroker', - 'secretsmanager:GetSecretValue'] - Effect: Allow - Resource: '*' - ManagedPolicyArns: ['arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'] + - PolicyName: IntegrationTestExecution + PolicyDocument: + Statement: + - Action: [ec2:CreateNetworkInterface, ec2:CreateNetworkInterfacePermission, + ec2:DeleteNetworkInterface, ec2:DeleteNetworkInterfacePermission, ec2:DetachNetworkInterface, + ec2:DescribeSubnets, ec2:DescribeNetworkInterfaces, ec2:DescribeVpcs, + ec2:DescribeInternetGateways, ec2:DescribeNetworkInterfacePermissions, + ec2:DescribeSecurityGroups, ec2:DescribeRouteTables, logs:CreateLogGroup, + logs:CreateLogStream, logs:PutLogEvents, kms:Decrypt, mq:DescribeBroker, + secretsmanager:GetSecretValue] + Effect: Allow + Resource: '*' + ManagedPolicyArns: [arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole] Tags: - - {Value: SAM, Key: 'lambda:createdBy'} + - {Value: SAM, Key: lambda:createdBy} MyMqBroker: Properties: @@ -130,17 +119,17 @@ Resources: PubliclyAccessible: true AutoMinorVersionUpgrade: false SecurityGroups: - - Ref: MQSecurityGroup + - Ref: MQSecurityGroup SubnetIds: - - Ref: PreCreatedSubnetOne + - Ref: PreCreatedSubnetOne Users: - - ConsoleAccess: true - Groups: - - admin - Username: - Ref: MQBrokerUser - Password: - Ref: MQBrokerPassword + - ConsoleAccess: true + Groups: + - admin + Username: + Ref: MQBrokerUser + Password: + Ref: MQBrokerPassword Type: AWS::AmazonMQ::Broker DependsOn: MyLambdaExecutionRole @@ -151,7 +140,7 @@ Resources: Handler: index.handler CodeUri: ${codeuri} Role: - Fn::GetAtt: [ MyLambdaExecutionRole, Arn ] + Fn::GetAtt: [MyLambdaExecutionRole, Arn] Events: MyMqEvent: Type: MQ @@ -159,11 +148,11 @@ Resources: Broker: Fn::GetAtt: MyMqBroker.Arn Queues: - - "TestQueue" + - TestQueue SourceAccessConfigurations: - - Type: BASIC_AUTH - URI: - Ref: MQBrokerUserSecret + - Type: BASIC_AUTH + URI: + Ref: MQBrokerUserSecret MQBrokerUserSecret: Type: AWS::SecretsManager::Secret @@ -172,4 +161,6 @@ Resources: Ref: MQBrokerUserSecretName SecretString: Fn::Sub: '{"username":"${MQBrokerUser}","password":"${MQBrokerPassword}"}' - Description: SecretsManager Secret for broker user and password \ No newline at end of file + Description: SecretsManager Secret for broker user and password +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_mq_using_autogen_role.yaml b/integration/resources/templates/combination/function_with_mq_using_autogen_role.yaml index 2f7d61948..9bdb452db 100644 --- a/integration/resources/templates/combination/function_with_mq_using_autogen_role.yaml +++ b/integration/resources/templates/combination/function_with_mq_using_autogen_role.yaml @@ -37,7 +37,7 @@ Resources: Properties: RouteTableId: Ref: RouteTable - DestinationCidrBlock: '0.0.0.0/0' + DestinationCidrBlock: 0.0.0.0/0 GatewayId: Ref: PreCreatedInternetGateway @@ -57,26 +57,26 @@ Resources: VpcId: Ref: PreCreatedVpc SecurityGroupIngress: - - IpProtocol: tcp - FromPort: 8162 - ToPort: 8162 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 61617 - ToPort: 61617 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 5671 - ToPort: 5671 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 61614 - ToPort: 61614 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 8883 - ToPort: 8883 - CidrIp: '0.0.0.0/0' + - IpProtocol: tcp + FromPort: 8162 + ToPort: 8162 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 61617 + ToPort: 61617 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 5671 + ToPort: 5671 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 61614 + ToPort: 61614 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 8883 + ToPort: 8883 + CidrIp: 0.0.0.0/0 MyMqBroker: Properties: @@ -92,17 +92,17 @@ Resources: PubliclyAccessible: true AutoMinorVersionUpgrade: false SecurityGroups: - - Ref: MQSecurityGroup + - Ref: MQSecurityGroup SubnetIds: - - Ref: PreCreatedSubnetTwo + - Ref: PreCreatedSubnetTwo Users: - - ConsoleAccess: true - Groups: - - admin - Username: - Ref: MQBrokerUser - Password: - Ref: MQBrokerPassword + - ConsoleAccess: true + Groups: + - admin + Username: + Ref: MQBrokerUser + Password: + Ref: MQBrokerPassword Type: AWS::AmazonMQ::Broker MyLambdaFunction: @@ -118,11 +118,11 @@ Resources: Broker: Fn::GetAtt: MyMqBroker.Arn Queues: - - "TestQueue" + - TestQueue SourceAccessConfigurations: - - Type: BASIC_AUTH - URI: - Ref: MQBrokerUserSecret + - Type: BASIC_AUTH + URI: + Ref: MQBrokerUserSecret MQBrokerUserSecret: Type: AWS::SecretsManager::Secret @@ -132,3 +132,5 @@ Resources: SecretString: Fn::Sub: '{"username":"${MQBrokerUser}","password":"${MQBrokerPassword}"}' Description: SecretsManager Secret for broker user and password +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_msk.yaml b/integration/resources/templates/combination/function_with_msk.yaml index c06aab4ea..3766bd2f7 100644 --- a/integration/resources/templates/combination/function_with_msk.yaml +++ b/integration/resources/templates/combination/function_with_msk.yaml @@ -13,38 +13,31 @@ Resources: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - - Action: ['sts:AssumeRole'] + - Action: [sts:AssumeRole] Effect: Allow Principal: Service: [lambda.amazonaws.com] Policies: - - PolicyName: IntegrationTestExecution - PolicyDocument: - Statement: - - Action: [ 'kafka:DescribeCluster', - 'kafka:GetBootstrapBrokers', - 'ec2:CreateNetworkInterface', - 'ec2:DescribeNetworkInterfaces', - 'ec2:DescribeVpcs', - 'ec2:DeleteNetworkInterface', - 'ec2:DescribeSubnets', - 'ec2:DescribeSecurityGroups', - 'logs:CreateLogGroup', - 'logs:CreateLogStream', - 'logs:PutLogEvents'] - Effect: Allow - Resource: '*' - ManagedPolicyArns: ['arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'] + - PolicyName: IntegrationTestExecution + PolicyDocument: + Statement: + - Action: [kafka:DescribeCluster, kafka:GetBootstrapBrokers, ec2:CreateNetworkInterface, + ec2:DescribeNetworkInterfaces, ec2:DescribeVpcs, ec2:DeleteNetworkInterface, + ec2:DescribeSubnets, ec2:DescribeSecurityGroups, logs:CreateLogGroup, + logs:CreateLogStream, logs:PutLogEvents] + Effect: Allow + Resource: '*' + ManagedPolicyArns: [arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole] Tags: - - {Value: SAM, Key: 'lambda:createdBy'} + - {Value: SAM, Key: lambda:createdBy} MyMskCluster: - Type: 'AWS::MSK::Cluster' + Type: AWS::MSK::Cluster Properties: BrokerNodeGroupInfo: ClientSubnets: - - Ref: PreCreatedSubnetOne - - Ref: PreCreatedSubnetTwo + - Ref: PreCreatedSubnetOne + - Ref: PreCreatedSubnetTwo InstanceType: kafka.t3.small StorageInfo: EBSStorageInfo: @@ -70,5 +63,7 @@ Resources: Stream: Ref: MyMskCluster Topics: - - "MyDummyTestTopic" + - MyDummyTestTopic +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_msk_using_managed_policy.yaml b/integration/resources/templates/combination/function_with_msk_using_managed_policy.yaml index 0be330b87..8c96e5d3a 100644 --- a/integration/resources/templates/combination/function_with_msk_using_managed_policy.yaml +++ b/integration/resources/templates/combination/function_with_msk_using_managed_policy.yaml @@ -8,12 +8,12 @@ Parameters: Resources: MyMskCluster: - Type: 'AWS::MSK::Cluster' + Type: AWS::MSK::Cluster Properties: BrokerNodeGroupInfo: ClientSubnets: - - Ref: PreCreatedSubnetOne - - Ref: PreCreatedSubnetTwo + - Ref: PreCreatedSubnetOne + - Ref: PreCreatedSubnetTwo InstanceType: kafka.t3.small StorageInfo: EBSStorageInfo: @@ -37,5 +37,7 @@ Resources: Stream: Ref: MyMskCluster Topics: - - "MyDummyTestTopic" + - MyDummyTestTopic +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_policy_templates.yaml b/integration/resources/templates/combination/function_with_policy_templates.yaml index 31bcc1a30..bc7b99e09 100644 --- a/integration/resources/templates/combination/function_with_policy_templates.yaml +++ b/integration/resources/templates/combination/function_with_policy_templates.yaml @@ -1,41 +1,43 @@ Parameters: FunctionNameParam: Type: String - Default: "somename" + Default: somename Conditions: TrueCondition: - Fn::Equals: ["true", "true"] + Fn::Equals: ['true', 'true'] Resources: MyFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: hello.handler Runtime: python3.8 Policies: - - SQSPollerPolicy: - QueueName: - Fn::GetAtt: ["MyQueue", "QueueName"] - - LambdaInvokePolicy: - FunctionName: - Ref: FunctionNameParam + - SQSPollerPolicy: + QueueName: + Fn::GetAtt: [MyQueue, QueueName] + - LambdaInvokePolicy: + FunctionName: + Ref: FunctionNameParam - - Fn::If: - - TrueCondition + - Fn::If: + - TrueCondition - - CloudWatchPutMetricPolicy: {} + - CloudWatchPutMetricPolicy: {} - - EC2DescribePolicy: {} + - EC2DescribePolicy: {} - - Fn::If: - - TrueCondition + - Fn::If: + - TrueCondition - - Ref: "AWS::NoValue" + - Ref: AWS::NoValue - - EC2DescribePolicy: {} + - EC2DescribePolicy: {} MyQueue: Type: AWS::SQS::Queue +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_resource_refs.yaml b/integration/resources/templates/combination/function_with_resource_refs.yaml index d8b92b71b..4ce85a020 100644 --- a/integration/resources/templates/combination/function_with_resource_refs.yaml +++ b/integration/resources/templates/combination/function_with_resource_refs.yaml @@ -6,7 +6,7 @@ Resources: MyLambdaFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: hello.handler @@ -14,7 +14,7 @@ Resources: AutoPublishAlias: Live MyOtherFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Runtime: python3.8 @@ -33,7 +33,7 @@ Outputs: AliasInSub: Value: - Fn::Sub: ["${MyLambdaFunction.Alias} ${SomeValue}", {"SomeValue": "Alias"}] + Fn::Sub: ['${MyLambdaFunction.Alias} ${SomeValue}', SomeValue: Alias] VersionArn: Value: @@ -41,4 +41,6 @@ Outputs: VersionNumber: Value: - Fn::GetAtt: ["MyLambdaFunction.Version", "Version"] + Fn::GetAtt: [MyLambdaFunction.Version, Version] +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_s3.yaml b/integration/resources/templates/combination/function_with_s3.yaml index f97bc296a..33a28ba90 100644 --- a/integration/resources/templates/combination/function_with_s3.yaml +++ b/integration/resources/templates/combination/function_with_s3.yaml @@ -16,3 +16,5 @@ Resources: Events: s3:ObjectCreated:* MyBucket: Type: AWS::S3::Bucket +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_s3_intrinsics.yaml b/integration/resources/templates/combination/function_with_s3_intrinsics.yaml index a1009a8c5..278890063 100644 --- a/integration/resources/templates/combination/function_with_s3_intrinsics.yaml +++ b/integration/resources/templates/combination/function_with_s3_intrinsics.yaml @@ -1,8 +1,8 @@ Conditions: MyCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunction: @@ -22,15 +22,17 @@ Resources: Events: s3:ObjectCreated:* Filter: Fn::If: - - MyCondition - - S3Key: - Rules: - - Name: prefix - Value: object_prefix - - S3Key: - Rules: - - Name: suffix - Value: object_suffix + - MyCondition + - S3Key: + Rules: + - Name: prefix + Value: object_prefix + - S3Key: + Rules: + - Name: suffix + Value: object_suffix MyBucket: Type: AWS::S3::Bucket +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_schedule.yaml b/integration/resources/templates/combination/function_with_schedule.yaml index 9e05a4f74..af5a4d996 100644 --- a/integration/resources/templates/combination/function_with_schedule.yaml +++ b/integration/resources/templates/combination/function_with_schedule.yaml @@ -14,9 +14,11 @@ Resources: Repeat: Type: Schedule Properties: - Schedule: 'rate(5 minutes)' - Input: '{"Hello": "world!"}' - Name: - Ref: ScheduleName - Description: test schedule - Enabled: True + Schedule: rate(5 minutes) + Input: '{"Hello": "world!"}' + Name: + Ref: ScheduleName + Description: test schedule + Enabled: true +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_schedule_dlq_and_retry_policy.yaml b/integration/resources/templates/combination/function_with_schedule_dlq_and_retry_policy.yaml index 4a57be458..314919c0e 100644 --- a/integration/resources/templates/combination/function_with_schedule_dlq_and_retry_policy.yaml +++ b/integration/resources/templates/combination/function_with_schedule_dlq_and_retry_policy.yaml @@ -13,26 +13,28 @@ Resources: Repeat: Type: Schedule Properties: - Schedule: 'rate(5 minutes)' - Input: '{"Hello": "world!"}' - Description: test schedule - Enabled: True - DeadLetterConfig: - Arn: - Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" - RetryPolicy: - MaximumRetryAttempts: 10 + Schedule: rate(5 minutes) + Input: '{"Hello": "world!"}' + Description: test schedule + Enabled: true + DeadLetterConfig: + Arn: + Fn::GetAtt: + - MyDeadLetterQueue + - Arn + RetryPolicy: + MaximumRetryAttempts: 10 Outputs: ScheduleName: - Description: "Name of the cw schedule" + Description: Name of the cw schedule Value: Ref: MyLambdaFunctionRepeat MyDLQArn: - Description: "Arn of the dead-letter queue created for the Schedule rule target" + Description: Arn of the dead-letter queue created for the Schedule rule target Value: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" \ No newline at end of file + - MyDeadLetterQueue + - Arn +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_schedule_dlq_generated.yaml b/integration/resources/templates/combination/function_with_schedule_dlq_generated.yaml index 40b700dae..6aa0a600f 100644 --- a/integration/resources/templates/combination/function_with_schedule_dlq_generated.yaml +++ b/integration/resources/templates/combination/function_with_schedule_dlq_generated.yaml @@ -10,31 +10,33 @@ Resources: Repeat: Type: Schedule Properties: - Schedule: 'rate(5 minutes)' - Input: '{"Hello": "world!"}' - Description: test schedule - Enabled: True - DeadLetterConfig: - Type: SQS + Schedule: rate(5 minutes) + Input: '{"Hello": "world!"}' + Description: test schedule + Enabled: true + DeadLetterConfig: + Type: SQS Outputs: ScheduleName: - Description: "Name of the cw schedule" + Description: Name of the cw schedule Value: Ref: MyLambdaFunctionRepeat MyLambdaArn: - Description: "Arn of the lambda target" + Description: Arn of the lambda target Value: Fn::GetAtt: - - "MyLambdaFunction" - - "Arn" + - MyLambdaFunction + - Arn MyDLQArn: - Description: "Arn of the dead-letter queue created for the Schedule rule target" + Description: Arn of the dead-letter queue created for the Schedule rule target Value: Fn::GetAtt: - - "MyLambdaFunctionRepeatQueue" - - "Arn" + - MyLambdaFunctionRepeatQueue + - Arn MyDLQUrl: - Description: "Url of the dead-letter queue created for the Schedule rule target" + Description: Url of the dead-letter queue created for the Schedule rule target Value: - Ref: MyLambdaFunctionRepeatQueue \ No newline at end of file + Ref: MyLambdaFunctionRepeatQueue +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_self_managed_kafka.yaml b/integration/resources/templates/combination/function_with_self_managed_kafka.yaml index ad91968ea..1bbc324d9 100644 --- a/integration/resources/templates/combination/function_with_self_managed_kafka.yaml +++ b/integration/resources/templates/combination/function_with_self_managed_kafka.yaml @@ -11,14 +11,14 @@ Resources: Type: SelfManagedKafka Properties: KafkaBootstrapServers: - - abc.xyz.com:9092 - - 123.45.67.89:9096 + - abc.xyz.com:9092 + - 123.45.67.89:9096 Topics: - - Topic1 + - Topic1 SourceAccessConfigurations: - - Type: BASIC_AUTH - URI: - Ref: KafkaUserSecret + - Type: BASIC_AUTH + URI: + Ref: KafkaUserSecret KafkaUserSecret: Type: AWS::SecretsManager::Secret @@ -27,3 +27,5 @@ Resources: SecretString: Fn::Sub: '{"username":"testBrokerUser","password":"testBrokerPassword"}' +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_self_managed_kafka_intrinsics.yaml b/integration/resources/templates/combination/function_with_self_managed_kafka_intrinsics.yaml index 01e1d59ca..f08c4417c 100644 --- a/integration/resources/templates/combination/function_with_self_managed_kafka_intrinsics.yaml +++ b/integration/resources/templates/combination/function_with_self_managed_kafka_intrinsics.yaml @@ -20,13 +20,13 @@ Resources: Type: SelfManagedKafka Properties: KafkaBootstrapServers: - - Ref: KafkaBootstrapServersValue + - Ref: KafkaBootstrapServersValue Topics: Ref: TopicsValue SourceAccessConfigurations: - - Type: BASIC_AUTH - URI: - Ref: KafkaUserSecret + - Type: BASIC_AUTH + URI: + Ref: KafkaUserSecret KafkaUserSecret: Type: AWS::SecretsManager::Secret @@ -35,3 +35,5 @@ Resources: SecretString: Fn::Sub: '{"username":"testBrokerUserWithInstrinsic","password":"testBrokerPasswordWithInstrinsic"}' +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_signing_profile.yaml b/integration/resources/templates/combination/function_with_signing_profile.yaml index f1534cff5..d3aab8f98 100644 --- a/integration/resources/templates/combination/function_with_signing_profile.yaml +++ b/integration/resources/templates/combination/function_with_signing_profile.yaml @@ -1,29 +1,29 @@ Resources: - # a function which has lambda signing configuration # due to the nature of the flow, we can't sign this package # and we are setting warning for signing config - MyUnsignedLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - CodeSigningConfigArn: - Ref: MySignedFunctionCodeSigningConfig - - MySignedFunctionCodeSigningConfig: - Type: AWS::Lambda::CodeSigningConfig - Properties: - Description: "Code Signing for MyUnsignedLambdaFunction" - AllowedPublishers: - SigningProfileVersionArns: - - Fn::GetAtt: MySigningProfile.ProfileVersionArn - CodeSigningPolicies: - UntrustedArtifactOnDeployment: "Warn" - - MySigningProfile: - Type: AWS::Signer::SigningProfile - Properties: - PlatformId: AWSLambda-SHA384-ECDSA + MyUnsignedLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + CodeSigningConfigArn: + Ref: MySignedFunctionCodeSigningConfig + + MySignedFunctionCodeSigningConfig: + Type: AWS::Lambda::CodeSigningConfig + Properties: + Description: Code Signing for MyUnsignedLambdaFunction + AllowedPublishers: + SigningProfileVersionArns: + - Fn::GetAtt: MySigningProfile.ProfileVersionArn + CodeSigningPolicies: + UntrustedArtifactOnDeployment: Warn + MySigningProfile: + Type: AWS::Signer::SigningProfile + Properties: + PlatformId: AWSLambda-SHA384-ECDSA +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_sns.yaml b/integration/resources/templates/combination/function_with_sns.yaml index 68b7756fd..014b0d524 100644 --- a/integration/resources/templates/combination/function_with_sns.yaml +++ b/integration/resources/templates/combination/function_with_sns.yaml @@ -13,7 +13,7 @@ Resources: Properties: Topic: Ref: MySnsTopic - + SQSSubscriptionEvent: Type: SNS Properties: @@ -26,3 +26,5 @@ Resources: MySnsTopic: Type: AWS::SNS::Topic +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_sns_intrinsics.yaml b/integration/resources/templates/combination/function_with_sns_intrinsics.yaml index 664a5385e..8b0f72ded 100644 --- a/integration/resources/templates/combination/function_with_sns_intrinsics.yaml +++ b/integration/resources/templates/combination/function_with_sns_intrinsics.yaml @@ -1,8 +1,8 @@ Conditions: MyCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunction: @@ -21,18 +21,20 @@ Resources: Ref: MySnsTopic FilterPolicy: Fn::If: - - MyCondition - - price_usd: - - numeric: - - ">=" - - 100 - - price_usd: - - numeric: - - "<" - - 100 + - MyCondition + - price_usd: + - numeric: + - '>=' + - 100 + - price_usd: + - numeric: + - < + - 100 Region: Ref: AWS::Region SqsSubscription: true MySnsTopic: Type: AWS::SNS::Topic +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_sqs.yaml b/integration/resources/templates/combination/function_with_sqs.yaml index 7f0f5d225..c6f88c53f 100644 --- a/integration/resources/templates/combination/function_with_sqs.yaml +++ b/integration/resources/templates/combination/function_with_sqs.yaml @@ -10,8 +10,10 @@ Resources: Type: SQS Properties: Queue: - Fn::GetAtt: ["MySqsQueue", "Arn"] + Fn::GetAtt: [MySqsQueue, Arn] BatchSize: 2 MySqsQueue: - Type: AWS::SQS::Queue \ No newline at end of file + Type: AWS::SQS::Queue +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/function_with_userpool_event.yaml b/integration/resources/templates/combination/function_with_userpool_event.yaml index 7e8617e6b..39c450cf4 100644 --- a/integration/resources/templates/combination/function_with_userpool_event.yaml +++ b/integration/resources/templates/combination/function_with_userpool_event.yaml @@ -13,11 +13,11 @@ Resources: PasswordPolicy: MinimumLength: 8 UsernameAttributes: - - email + - email Schema: - - AttributeDataType: String - Name: email - Required: false + - AttributeDataType: String + Name: email + Required: false PreSignupLambdaFunction: Type: AWS::Serverless::Function @@ -40,16 +40,18 @@ Resources: Trigger: PreSignUp Outputs: - Region: - Description: "Region" - Value: - Ref: AWS::Region - - PreSignupLambdaFunctionArn: - Description: "lambda Function Arn" - Value: - Fn::GetAtt: [PreSignupLambdaFunction, Arn] - CognitoUserPoolId: - Description: "Cognito User Pool Id" - Value: - Ref: MyCognitoUserPool \ No newline at end of file + Region: + Description: Region + Value: + Ref: AWS::Region + + PreSignupLambdaFunctionArn: + Description: lambda Function Arn + Value: + Fn::GetAtt: [PreSignupLambdaFunction, Arn] + CognitoUserPoolId: + Description: Cognito User Pool Id + Value: + Ref: MyCognitoUserPool +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/http_api_with_auth.yaml b/integration/resources/templates/combination/http_api_with_auth.yaml index 623aa13cf..1d2d9a5f5 100644 --- a/integration/resources/templates/combination/http_api_with_auth.yaml +++ b/integration/resources/templates/combination/http_api_with_auth.yaml @@ -14,7 +14,7 @@ Resources: Properties: Auth: Authorizer: MyOAuth2Auth - ApiId: + ApiId: Ref: MyApi Method: GET Path: /get @@ -23,14 +23,14 @@ Resources: Properties: Auth: Authorizer: MyLambdaAuth - ApiId: + ApiId: Ref: MyApi Method: POST Path: /post DefaultApi: Type: HttpApi Properties: - ApiId: + ApiId: Ref: MyApi Method: DEFAULT Path: /default/post @@ -50,32 +50,34 @@ Resources: Auth: Authorizers: MyLambdaAuth: - FunctionArn: + FunctionArn: Fn::GetAtt: - - MyAuthFn - - Arn + - MyAuthFn + - Arn FunctionInvokeRole: Fn::GetAtt: - - MyAuthFnRole - - Arn + - MyAuthFnRole + - Arn Identity: Context: - - contextVar + - contextVar Headers: - - Authorization + - Authorization QueryStrings: - - petId + - petId StageVariables: - - stageVar + - stageVar ReauthorizeEvery: 23 EnableSimpleResponses: true AuthorizerPayloadFormatVersion: 2.0 MyOAuth2Auth: AuthorizationScopes: - - scope4 + - scope4 JwtConfiguration: - issuer: "https://openid-connect.onelogin.com/oidc" + issuer: https://openid-connect.onelogin.com/oidc audience: - - MyApi - IdentitySource: "$request.querystring.param" - DefaultAuthorizer: MyOAuth2Auth \ No newline at end of file + - MyApi + IdentitySource: $request.querystring.param + DefaultAuthorizer: MyOAuth2Auth +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/http_api_with_auth_updated.yaml b/integration/resources/templates/combination/http_api_with_auth_updated.yaml index 68e5b61d1..37d1177be 100644 --- a/integration/resources/templates/combination/http_api_with_auth_updated.yaml +++ b/integration/resources/templates/combination/http_api_with_auth_updated.yaml @@ -14,7 +14,7 @@ Resources: Properties: Auth: Authorizer: MyLambdaAuthUpdated - ApiId: + ApiId: Ref: MyApi Method: POST Path: /post @@ -36,18 +36,20 @@ Resources: Auth: Authorizers: MyLambdaAuthUpdated: - FunctionArn: + FunctionArn: Fn::GetAtt: - - MyAuthFn - - Arn + - MyAuthFn + - Arn FunctionInvokeRole: Fn::GetAtt: - - MyAuthFnRole - - Arn + - MyAuthFnRole + - Arn Identity: Headers: - - Authorization + - Authorization ReauthorizeEvery: 37 EnableSimpleResponses: false AuthorizerPayloadFormatVersion: 1.0 - DefaultAuthorizer: MyLambdaAuthUpdated \ No newline at end of file + DefaultAuthorizer: MyLambdaAuthUpdated +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/http_api_with_cors.yaml b/integration/resources/templates/combination/http_api_with_cors.yaml index cb9a3170f..f16f7100a 100644 --- a/integration/resources/templates/combination/http_api_with_cors.yaml +++ b/integration/resources/templates/combination/http_api_with_cors.yaml @@ -1,28 +1,27 @@ - Globals: HttpApi: CorsConfiguration: AllowHeaders: - - x-apigateway-header + - x-apigateway-header AllowMethods: - - GET + - GET AllowOrigins: - - https://foo.com + - https://foo.com ExposeHeaders: - - x-amzn-header + - x-amzn-header Resources: HttpApiFunction: Type: AWS::Serverless::Function Properties: InlineCode: | - exports.handler = async (event) => { - return { - statusCode: 200, - body: JSON.stringify(event), - headers: {} - } - } + exports.handler = async (event) => { + return { + statusCode: 200, + body: JSON.stringify(event), + headers: {} + } + } Handler: index.handler Runtime: nodejs14.x Events: @@ -32,14 +31,16 @@ Resources: Method: GET Path: /path TimeoutInMillis: 15000 - PayloadFormatVersion: "1.0" + PayloadFormatVersion: '1.0' Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessHttpApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' + Fn::Sub: https://${ServerlessHttpApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ ApiId: Description: Api id of ServerlessHttpApi Value: - Ref: ServerlessHttpApi + Ref: ServerlessHttpApi +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/http_api_with_custom_domains_regional.yaml b/integration/resources/templates/combination/http_api_with_custom_domains_regional.yaml index 5fceb14b0..cdfb3ef4d 100644 --- a/integration/resources/templates/combination/http_api_with_custom_domains_regional.yaml +++ b/integration/resources/templates/combination/http_api_with_custom_domains_regional.yaml @@ -19,8 +19,8 @@ Globals: TruststoreVersion: 0 SecurityPolicy: TLS_1_2 BasePath: - - /get - - /post + - /get + - /post Route53: HostedZoneId: Ref: HostedZoneId @@ -45,16 +45,18 @@ Resources: Properties: Method: Get Path: /get - ApiId: + ApiId: Ref: MyApi ImplicitPost: Type: HttpApi Properties: Method: Post Path: /post - ApiId: + ApiId: Ref: MyApi MyApi: Type: AWS::Serverless::HttpApi Properties: StageName: Prod +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/http_api_with_custom_domains_regional_ownership_verification.yaml b/integration/resources/templates/combination/http_api_with_custom_domains_regional_ownership_verification.yaml index b8ffb2ba8..cf42ae430 100644 --- a/integration/resources/templates/combination/http_api_with_custom_domains_regional_ownership_verification.yaml +++ b/integration/resources/templates/combination/http_api_with_custom_domains_regional_ownership_verification.yaml @@ -21,8 +21,8 @@ Globals: TruststoreVersion: 0 SecurityPolicy: TLS_1_2 BasePath: - - /get - - /post + - /get + - /post Route53: HostedZoneId: Ref: HostedZoneId @@ -62,3 +62,5 @@ Resources: Type: AWS::Serverless::HttpApi Properties: StageName: Prod +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_false.yaml b/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_false.yaml index 675fcc232..b8fea10cb 100644 --- a/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_false.yaml +++ b/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_false.yaml @@ -18,21 +18,23 @@ Resources: Properties: Method: Get Path: /get - ApiId: + ApiId: Ref: MyApi ImplicitPost: Type: HttpApi Properties: Method: Post Path: /post - ApiId: + ApiId: Ref: MyApi MyApi: Type: AWS::Serverless::HttpApi Properties: - DisableExecuteApiEndpoint: False + DisableExecuteApiEndpoint: false StageName: Prod Outputs: ApiId: Value: - Ref: MyApi \ No newline at end of file + Ref: MyApi +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_true.yaml b/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_true.yaml index 0f72aaf00..e4cd6a198 100644 --- a/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_true.yaml +++ b/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_true.yaml @@ -18,14 +18,14 @@ Resources: Properties: Method: Get Path: /get - ApiId: + ApiId: Ref: MyApi ImplicitPost: Type: HttpApi Properties: Method: Post Path: /post - ApiId: + ApiId: Ref: MyApi MyApi: Type: AWS::Serverless::HttpApi @@ -36,4 +36,6 @@ Resources: Outputs: ApiId: Value: - Ref: MyApi \ No newline at end of file + Ref: MyApi +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/implicit_api_with_settings.yaml b/integration/resources/templates/combination/implicit_api_with_settings.yaml index 5cabedb29..824e2e009 100644 --- a/integration/resources/templates/combination/implicit_api_with_settings.yaml +++ b/integration/resources/templates/combination/implicit_api_with_settings.yaml @@ -2,15 +2,10 @@ Globals: Api: EndpointConfiguration: REGIONAL BinaryMediaTypes: - - image~1jpg - - image~1png - MethodSettings: [{ - "LoggingLevel": "INFO", - "MetricsEnabled": True, - "DataTraceEnabled": True, - "ResourcePath": "/*", - "HttpMethod": "*" - }] + - image~1jpg + - image~1png + MethodSettings: [{LoggingLevel: INFO, MetricsEnabled: true, DataTraceEnabled: true, + ResourcePath: /*, HttpMethod: '*'}] Resources: MyLambdaFunction: @@ -27,3 +22,5 @@ Resources: Properties: Path: /pathget Method: get +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/intrinsics_code_definition_uri.yaml b/integration/resources/templates/combination/intrinsics_code_definition_uri.yaml index c540057a4..aab850222 100644 --- a/integration/resources/templates/combination/intrinsics_code_definition_uri.yaml +++ b/integration/resources/templates/combination/intrinsics_code_definition_uri.yaml @@ -1,12 +1,12 @@ # Must support explicit bucket, key and version in CodeUri and DefinitionUri parameters Parameters: - Bucket: - Type: String - CodeKey: - Type: String - SwaggerKey: - Type: String + Bucket: + Type: String + CodeKey: + Type: String + SwaggerKey: + Type: String Resources: @@ -33,3 +33,5 @@ Resources: Key: Ref: SwaggerKey +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/intrinsics_serverless_api.yaml b/integration/resources/templates/combination/intrinsics_serverless_api.yaml index 0cd450688..32827ada4 100644 --- a/integration/resources/templates/combination/intrinsics_serverless_api.yaml +++ b/integration/resources/templates/combination/intrinsics_serverless_api.yaml @@ -10,17 +10,17 @@ Parameters: Default: devstage CacheClusterEnabled: Type: String - Default: "true" + Default: 'true' Conditions: TrueCondition: Fn::Equals: - - true - - true + - true + - true FalseCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunction: @@ -95,9 +95,9 @@ Resources: Ref: SwaggerKey Variables: Var1: - "Fn::Join": ["", ["a", "b"]] + Fn::Join: ['', [a, b]] Var2: - "Fn::Join": ["", ["1", "2"]] + Fn::Join: ['', ['1', '2']] MyApiFalseCondition: Type: AWS::Serverless::Api @@ -112,7 +112,8 @@ Resources: Ref: SwaggerKey Variables: Var1: - "Fn::Join": ["", ["a", "b"]] + Fn::Join: ['', [a, b]] Var2: - "Fn::Join": ["", ["1", "2"]] - + Fn::Join: ['', ['1', '2']] +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/intrinsics_serverless_function.yaml b/integration/resources/templates/combination/intrinsics_serverless_function.yaml index 703242bcc..c1606e61d 100644 --- a/integration/resources/templates/combination/intrinsics_serverless_function.yaml +++ b/integration/resources/templates/combination/intrinsics_serverless_function.yaml @@ -22,65 +22,65 @@ Parameters: Conditions: TrueCondition: Fn::Equals: - - true - - true + - true + - true FalseCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: TrueCondition Properties: CodeUri: Bucket: Ref: Bucket Key: - "Fn::Sub": ["${CodeKey}${extn}", {extn: ""}] + Fn::Sub: ['${CodeKey}${extn}', extn: ''] Handler: - "Fn::Sub": ["${filename}.handler", {filename: "index"}] + Fn::Sub: ['${filename}.handler', filename: index] Runtime: - "Fn::Join": ["", ["nodejs", "12.x"]] + Fn::Join: ['', [nodejs, 12.x]] Role: - "Fn::GetAtt": ["MyNewRole", "Arn"] + Fn::GetAtt: [MyNewRole, Arn] - Description: "Some description" + Description: Some description MemorySize: Ref: MemorySize Timeout: Ref: Timeout - + AutoPublishCodeSha256: Ref: AutoPublishSha Environment: Variables: MyRoleArn: - "Fn::GetAtt": ["MyNewRole", "Arn"] + Fn::GetAtt: [MyNewRole, Arn] InputParameter: Ref: CodeKey VpcConfig: SecurityGroupIds: - - "Fn::GetAtt": ["MySecurityGroup", "GroupId"] + - Fn::GetAtt: [MySecurityGroup, GroupId] SubnetIds: - - Ref: PreCreatedSubnetOne + - Ref: PreCreatedSubnetOne # Additional resources to reference inside the Function resource MyNewRole: Type: AWS::IAM::Role Properties: ManagedPolicyArns: - - {"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"} - - {"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole"} + - {Fn::Sub: 'arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'} + - {Fn::Sub: 'arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole'} AssumeRolePolicyDocument: Version: '2012-10-17' Statement: @@ -92,27 +92,27 @@ Resources: - lambda.amazonaws.com MySecurityGroup: - Type: "AWS::EC2::SecurityGroup" + Type: AWS::EC2::SecurityGroup Properties: - GroupDescription: "my test group" + GroupDescription: my test group VpcId: Ref: PreCreatedVpc # False condition, shouldn't be created MyFunctionFalseCondition: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: FalseCondition Properties: CodeUri: Bucket: Ref: Bucket Key: - "Fn::Sub": ["${CodeKey}${extn}", {extn: ""}] + Fn::Sub: ['${CodeKey}${extn}', extn: ''] Handler: - "Fn::Sub": ["${filename}.handler", {filename: "index"}] + Fn::Sub: ['${filename}.handler', filename: index] Runtime: - "Fn::Join": ["", ["nodejs", "12.x"]] - - + Fn::Join: ['', [nodejs, 12.x]] +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/state_machine_with_api.yaml b/integration/resources/templates/combination/state_machine_with_api.yaml index 23946e3d2..abf4c003f 100644 --- a/integration/resources/templates/combination/state_machine_with_api.yaml +++ b/integration/resources/templates/combination/state_machine_with_api.yaml @@ -4,7 +4,7 @@ Resources: ExistingRestApi: Type: AWS::Serverless::Api Properties: - StageName: "Dev" + StageName: Dev MyStateMachine: Type: AWS::Serverless::StateMachine @@ -22,11 +22,11 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: GetApi: @@ -45,30 +45,32 @@ Resources: Outputs: Region: - Description: "Region" + Description: Region Value: Ref: AWS::Region Partition: - Description: "Partition" + Description: Partition Value: Ref: AWS::Partition MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyImplicitApiRoleName: - Description: "Name of the role created for the implicit Api method" + Description: Name of the role created for the implicit Api method Value: Ref: MyStateMachinePostApiRole MyImplicitApiRoleArn: - Description: "ARN of the role created for the implicit Api method" + Description: ARN of the role created for the implicit Api method Value: Fn::GetAtt: MyStateMachinePostApiRole.Arn MyExplicitApiRoleName: - Description: "Name of the role created for the explicit Api method" + Description: Name of the role created for the explicit Api method Value: Ref: MyStateMachineGetApiRole MyExplicitApiRoleArn: - Description: "ARN of the role created for the explicit Api method" + Description: ARN of the role created for the explicit Api method Value: Fn::GetAtt: MyStateMachineGetApiRole.Arn +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/state_machine_with_cwe.yaml b/integration/resources/templates/combination/state_machine_with_cwe.yaml index c2b8a5dcb..ad3308169 100644 --- a/integration/resources/templates/combination/state_machine_with_cwe.yaml +++ b/integration/resources/templates/combination/state_machine_with_cwe.yaml @@ -16,11 +16,11 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: CWEvent: Type: CloudWatchEvent @@ -28,18 +28,20 @@ Resources: Pattern: detail: state: - - terminated + - terminated Outputs: MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyEventName: - Description: "Name of the CloudWatchEvent rule created" + Description: Name of the CloudWatchEvent rule created Value: Ref: MyStateMachineCWEvent MyEventRole: - Description: "Name of the role created for the CWE rule" + Description: Name of the role created for the CWE rule Value: - Ref: MyStateMachineCWEventRole \ No newline at end of file + Ref: MyStateMachineCWEventRole +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/state_machine_with_cwe_dlq_generated.yaml b/integration/resources/templates/combination/state_machine_with_cwe_dlq_generated.yaml index 5a2185226..72ea19ecb 100644 --- a/integration/resources/templates/combination/state_machine_with_cwe_dlq_generated.yaml +++ b/integration/resources/templates/combination/state_machine_with_cwe_dlq_generated.yaml @@ -16,11 +16,11 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: CWEvent: Type: EventBridgeRule @@ -28,7 +28,7 @@ Resources: Pattern: detail: state: - - terminated + - terminated DeadLetterConfig: Type: SQS RetryPolicy: @@ -36,24 +36,26 @@ Resources: Outputs: MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyEventName: - Description: "Name of the CloudWatchEvent rule created" + Description: Name of the CloudWatchEvent rule created Value: Ref: MyStateMachineCWEvent MyEventRole: - Description: "Name of the role created for the CWE rule" + Description: Name of the role created for the CWE rule Value: Ref: MyStateMachineCWEventRole MyDLQArn: - Description: "Arn of the dead-letter queue created for the CWE rule target" + Description: Arn of the dead-letter queue created for the CWE rule target Value: Fn::GetAtt: - - "MyStateMachineCWEventQueue" - - "Arn" + - MyStateMachineCWEventQueue + - Arn MyDLQUrl: - Description: "Url of the dead-letter queue created for the CWE rule target" + Description: Url of the dead-letter queue created for the CWE rule target Value: - Ref: MyStateMachineCWEventQueue \ No newline at end of file + Ref: MyStateMachineCWEventQueue +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/state_machine_with_cwe_with_dlq_and_retry_policy.yaml b/integration/resources/templates/combination/state_machine_with_cwe_with_dlq_and_retry_policy.yaml index 463716437..382e255e8 100644 --- a/integration/resources/templates/combination/state_machine_with_cwe_with_dlq_and_retry_policy.yaml +++ b/integration/resources/templates/combination/state_machine_with_cwe_with_dlq_and_retry_policy.yaml @@ -18,11 +18,11 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: CWEvent: Type: EventBridgeRule @@ -30,32 +30,34 @@ Resources: Pattern: detail: state: - - terminated + - terminated DeadLetterConfig: Arn: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" + - MyDeadLetterQueue + - Arn RetryPolicy: MaximumEventAgeInSeconds: 400 MaximumRetryAttempts: 5 Outputs: MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyEventName: - Description: "Name of the CloudWatchEvent rule created" + Description: Name of the CloudWatchEvent rule created Value: Ref: MyStateMachineCWEvent MyEventRole: - Description: "Name of the role created for the CWE rule" + Description: Name of the role created for the CWE rule Value: Ref: MyStateMachineCWEventRole MyDLQArn: - Description: "Arn of the dead-letter queue provided for the CWE rule target" + Description: Arn of the dead-letter queue provided for the CWE rule target Value: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" \ No newline at end of file + - MyDeadLetterQueue + - Arn +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/state_machine_with_policy_templates.yaml b/integration/resources/templates/combination/state_machine_with_policy_templates.yaml index cafa9f007..967c8a477 100644 --- a/integration/resources/templates/combination/state_machine_with_policy_templates.yaml +++ b/integration/resources/templates/combination/state_machine_with_policy_templates.yaml @@ -10,14 +10,14 @@ Resources: Type: Task Resource: Fn::GetAtt: MyFunction.Arn - End: True + End: true Policies: - - SQSPollerPolicy: - QueueName: - Fn::GetAtt: ["MyQueue", "QueueName"] - - LambdaInvokePolicy: - FunctionName: - Ref: MyFunction + - SQSPollerPolicy: + QueueName: + Fn::GetAtt: [MyQueue, QueueName] + - LambdaInvokePolicy: + FunctionName: + Ref: MyFunction MyFunction: Type: AWS::Serverless::Function @@ -31,6 +31,8 @@ Resources: Outputs: MyStateMachineRole: - Description: "ARN of the role created for the State Machine" + Description: ARN of the role created for the State Machine Value: - Ref: MyStateMachineRole \ No newline at end of file + Ref: MyStateMachineRole +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/state_machine_with_schedule.yaml b/integration/resources/templates/combination/state_machine_with_schedule.yaml index 7f8868902..9ebf19a86 100644 --- a/integration/resources/templates/combination/state_machine_with_schedule.yaml +++ b/integration/resources/templates/combination/state_machine_with_schedule.yaml @@ -16,30 +16,32 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: CWSchedule: Type: Schedule Properties: - Schedule: 'rate(1 minute)' + Schedule: rate(1 minute) Description: test schedule - Enabled: False + Enabled: false Outputs: MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyScheduleName: - Description: "Name of the Schedule rule created" + Description: Name of the Schedule rule created Value: Ref: MyStateMachineCWSchedule MyEventRole: - Description: "ARN of the role created for the Schedule rule" + Description: ARN of the role created for the Schedule rule Value: - Ref: MyStateMachineCWScheduleRole \ No newline at end of file + Ref: MyStateMachineCWScheduleRole +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/state_machine_with_schedule_dlq_and_retry_policy.yaml b/integration/resources/templates/combination/state_machine_with_schedule_dlq_and_retry_policy.yaml index 5abae8a4a..fb610625e 100644 --- a/integration/resources/templates/combination/state_machine_with_schedule_dlq_and_retry_policy.yaml +++ b/integration/resources/templates/combination/state_machine_with_schedule_dlq_and_retry_policy.yaml @@ -18,44 +18,46 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: CWSchedule: Type: Schedule Properties: - Schedule: 'rate(1 minute)' + Schedule: rate(1 minute) Description: test schedule - Enabled: False + Enabled: false DeadLetterConfig: Arn: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" + - MyDeadLetterQueue + - Arn RetryPolicy: MaximumRetryAttempts: 2 Outputs: MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyScheduleName: - Description: "Name of the Schedule rule created" + Description: Name of the Schedule rule created Value: Ref: MyStateMachineCWSchedule MyEventRole: - Description: "ARN of the role created for the Schedule rule" + Description: ARN of the role created for the Schedule rule Value: Ref: MyStateMachineCWScheduleRole MyDLQArn: - Description: "Arn of the dead-letter queue created for the Schedule rule target" + Description: Arn of the dead-letter queue created for the Schedule rule target Value: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" \ No newline at end of file + - MyDeadLetterQueue + - Arn +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/combination/state_machine_with_schedule_dlq_generated.yaml b/integration/resources/templates/combination/state_machine_with_schedule_dlq_generated.yaml index ec84d4387..baa35cf53 100644 --- a/integration/resources/templates/combination/state_machine_with_schedule_dlq_generated.yaml +++ b/integration/resources/templates/combination/state_machine_with_schedule_dlq_generated.yaml @@ -16,43 +16,45 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: CWSchedule: Type: Schedule Properties: - Schedule: 'rate(1 minute)' + Schedule: rate(1 minute) Description: test schedule - Enabled: False + Enabled: false DeadLetterConfig: Type: SQS QueueLogicalId: MyDlq Outputs: MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyScheduleName: - Description: "Name of the Schedule rule created" + Description: Name of the Schedule rule created Value: Ref: MyStateMachineCWSchedule MyEventRole: - Description: "ARN of the role created for the Schedule rule" + Description: ARN of the role created for the Schedule rule Value: Ref: MyStateMachineCWScheduleRole MyDLQArn: - Description: "Arn of the dead-letter queue created for the Schedule rule target" + Description: Arn of the dead-letter queue created for the Schedule rule target Value: Fn::GetAtt: - - "MyDlq" - - "Arn" + - MyDlq + - Arn MyDLQUrl: - Description: "Url of the dead-letter queue created for the Schedule rule target" + Description: Url of the dead-letter queue created for the Schedule rule target Value: - Ref: MyDlq \ No newline at end of file + Ref: MyDlq +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_api.yaml b/integration/resources/templates/single/basic_api.yaml index 0b6322cec..aae58ec85 100644 --- a/integration/resources/templates/single/basic_api.yaml +++ b/integration/resources/templates/single/basic_api.yaml @@ -4,3 +4,5 @@ Resources: Properties: StageName: MyNewStageName DefinitionUri: ${definitionuri} +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_api_inline_openapi.yaml b/integration/resources/templates/single/basic_api_inline_openapi.yaml index 7f14ad5dc..021a1386e 100644 --- a/integration/resources/templates/single/basic_api_inline_openapi.yaml +++ b/integration/resources/templates/single/basic_api_inline_openapi.yaml @@ -5,23 +5,25 @@ Resources: StageName: MyNewStageName DefinitionBody: # Simple HTTP Proxy API - openapi: "3.0" + openapi: '3.0' info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_api_inline_swagger.yaml b/integration/resources/templates/single/basic_api_inline_swagger.yaml index ce9ff2429..3023c1f68 100644 --- a/integration/resources/templates/single/basic_api_inline_swagger.yaml +++ b/integration/resources/templates/single/basic_api_inline_swagger.yaml @@ -5,23 +5,25 @@ Resources: StageName: MyNewStageName DefinitionBody: # Simple HTTP Proxy API - swagger: "2.0" + swagger: '2.0' info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_api_with_mode.yaml b/integration/resources/templates/single/basic_api_with_mode.yaml index ffad6b15d..2fd8ee154 100644 --- a/integration/resources/templates/single/basic_api_with_mode.yaml +++ b/integration/resources/templates/single/basic_api_with_mode.yaml @@ -6,7 +6,7 @@ Resources: Mode: overwrite TestFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: python3.8 @@ -32,3 +32,5 @@ Resources: Outputs: ApiEndpoint: Value: !Sub "https://${MyApi}.execute-api.${AWS::Region}.amazonaws.com/MyNewStageName" +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_api_with_mode_update.yaml b/integration/resources/templates/single/basic_api_with_mode_update.yaml index 3f34693b9..5b6376cbf 100644 --- a/integration/resources/templates/single/basic_api_with_mode_update.yaml +++ b/integration/resources/templates/single/basic_api_with_mode_update.yaml @@ -6,7 +6,7 @@ Resources: Mode: overwrite TestFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: python3.8 @@ -22,3 +22,5 @@ Resources: Method: put RestApiId: !Ref MyApi +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_api_with_tags.yaml b/integration/resources/templates/single/basic_api_with_tags.yaml index c3bce8d8d..32328b833 100644 --- a/integration/resources/templates/single/basic_api_with_tags.yaml +++ b/integration/resources/templates/single/basic_api_with_tags.yaml @@ -5,5 +5,7 @@ Resources: StageName: my-new-stage-name DefinitionUri: ${definitionuri} Tags: - TagKey1: TagValue1 - TagKey2: "" + TagKey1: TagValue1 + TagKey2: '' +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_application_s3_location.yaml b/integration/resources/templates/single/basic_application_s3_location.yaml index 5a6044674..9e97173ba 100644 --- a/integration/resources/templates/single/basic_application_s3_location.yaml +++ b/integration/resources/templates/single/basic_application_s3_location.yaml @@ -3,3 +3,5 @@ Resources: Type: AWS::Serverless::Application Properties: Location: ${templateurl} +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_application_sar_location.yaml b/integration/resources/templates/single/basic_application_sar_location.yaml index e0c922296..8cea82cfd 100644 --- a/integration/resources/templates/single/basic_application_sar_location.yaml +++ b/integration/resources/templates/single/basic_application_sar_location.yaml @@ -11,3 +11,5 @@ Resources: SemanticVersion: 1.0.3 Parameters: IdentityNameParameter: test +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_application_sar_location_with_intrinsics.yaml b/integration/resources/templates/single/basic_application_sar_location_with_intrinsics.yaml index 2c1dd3ba3..d34ef47ef 100644 --- a/integration/resources/templates/single/basic_application_sar_location_with_intrinsics.yaml +++ b/integration/resources/templates/single/basic_application_sar_location_with_intrinsics.yaml @@ -45,12 +45,14 @@ Resources: SemanticVersion: Fn::FindInMap: - SARApplication - - { Ref: 'AWS::Region' } + - {Ref: AWS::Region} - SemanticVersion Parameters: IdentityNameParameter: test NotificationARNs: - - Ref: MySns + - Ref: MySns MySns: - Type: AWS::SNS::Topic \ No newline at end of file + Type: AWS::SNS::Topic +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_function.yaml b/integration/resources/templates/single/basic_function.yaml index ae6b002c4..233702b10 100644 --- a/integration/resources/templates/single/basic_function.yaml +++ b/integration/resources/templates/single/basic_function.yaml @@ -1,15 +1,17 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess - Environment: - Variables: - Name: Value - Name2: Value2 + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess + Environment: + Variables: + Name: Value + Name2: Value2 +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_function_event_destinations.yaml b/integration/resources/templates/single/basic_function_event_destinations.yaml index d3f8d9934..c6fe7a681 100644 --- a/integration/resources/templates/single/basic_function_event_destinations.yaml +++ b/integration/resources/templates/single/basic_function_event_destinations.yaml @@ -1,95 +1,97 @@ Conditions: - QueueCreationDisabled: - Fn::Equals: - - false - - true + QueueCreationDisabled: + Fn::Equals: + - false + - true Resources: - MyTestFunction: - Type: AWS::Serverless::Function - Properties: - EventInvokeConfig: - MaximumEventAgeInSeconds: 70 - MaximumRetryAttempts: 1 - DestinationConfig: - OnSuccess: - Type: SQS - Destination: - Fn::If: - - QueueCreationDisabled - - Fn::GetAtt: - - DestinationSQS - - Arn - - Ref: 'AWS::NoValue' - OnFailure: - Type: Lambda - Destination: - Fn::GetAtt: - - DestinationLambda - - Arn - InlineCode: | - exports.handler = function(event, context, callback) { - var event_received_at = new Date().toISOString(); - console.log('Event received at: ' + event_received_at); - console.log('Received event:', JSON.stringify(event, null, 2)); - if (event.Success) { - console.log("Success"); - context.callbackWaitsForEmptyEventLoop = false; - callback(null); - } else { - console.log("Failure"); - context.callbackWaitsForEmptyEventLoop = false; - callback(new Error("Failure from event, Success = false, I am failing!"), 'Destination Function Error Thrown'); - } - }; - Handler: index.handler - Runtime: nodejs14.x - MemorySize: 1024 - MyTestFunction2: - Type: AWS::Serverless::Function - Properties: - AutoPublishAlias: live - EventInvokeConfig: - MaximumEventAgeInSeconds: 80 - MaximumRetryAttempts: 2 - DestinationConfig: - OnSuccess: - Type: SNS - OnFailure: - Type: EventBridge - Destination: - Fn::Sub: arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/default - InlineCode: | - exports.handler = function(event, context, callback) { - var event_received_at = new Date().toISOString(); - console.log('Event received at: ' + event_received_at); - console.log('Received event:', JSON.stringify(event, null, 2)); - if (event.Success) { - console.log("Success"); - context.callbackWaitsForEmptyEventLoop = false; - callback(null); - } else { - console.log("Failure"); - context.callbackWaitsForEmptyEventLoop = false; - callback(new Error("Failure from event, Success = false, I am failing!"), 'Destination Function Error Thrown'); - } - }; - Handler: index.handler - Runtime: nodejs14.x - MemorySize: 1024 - DestinationLambda: - Type: AWS::Serverless::Function - Properties: - InlineCode: | - exports.handler = async (event) => { - const response = { - statusCode: 200, - body: JSON.stringify('Hello from Lambda!'), - }; - return response; - }; - Handler: index.handler - Runtime: nodejs14.x - MemorySize: 1024 - DestinationSQS: - Condition: QueueCreationDisabled - Type: AWS::SQS::Queue + MyTestFunction: + Type: AWS::Serverless::Function + Properties: + EventInvokeConfig: + MaximumEventAgeInSeconds: 70 + MaximumRetryAttempts: 1 + DestinationConfig: + OnSuccess: + Type: SQS + Destination: + Fn::If: + - QueueCreationDisabled + - Fn::GetAtt: + - DestinationSQS + - Arn + - Ref: AWS::NoValue + OnFailure: + Type: Lambda + Destination: + Fn::GetAtt: + - DestinationLambda + - Arn + InlineCode: | + exports.handler = function(event, context, callback) { + var event_received_at = new Date().toISOString(); + console.log('Event received at: ' + event_received_at); + console.log('Received event:', JSON.stringify(event, null, 2)); + if (event.Success) { + console.log("Success"); + context.callbackWaitsForEmptyEventLoop = false; + callback(null); + } else { + console.log("Failure"); + context.callbackWaitsForEmptyEventLoop = false; + callback(new Error("Failure from event, Success = false, I am failing!"), 'Destination Function Error Thrown'); + } + }; + Handler: index.handler + Runtime: nodejs14.x + MemorySize: 1024 + MyTestFunction2: + Type: AWS::Serverless::Function + Properties: + AutoPublishAlias: live + EventInvokeConfig: + MaximumEventAgeInSeconds: 80 + MaximumRetryAttempts: 2 + DestinationConfig: + OnSuccess: + Type: SNS + OnFailure: + Type: EventBridge + Destination: + Fn::Sub: arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/default + InlineCode: | + exports.handler = function(event, context, callback) { + var event_received_at = new Date().toISOString(); + console.log('Event received at: ' + event_received_at); + console.log('Received event:', JSON.stringify(event, null, 2)); + if (event.Success) { + console.log("Success"); + context.callbackWaitsForEmptyEventLoop = false; + callback(null); + } else { + console.log("Failure"); + context.callbackWaitsForEmptyEventLoop = false; + callback(new Error("Failure from event, Success = false, I am failing!"), 'Destination Function Error Thrown'); + } + }; + Handler: index.handler + Runtime: nodejs14.x + MemorySize: 1024 + DestinationLambda: + Type: AWS::Serverless::Function + Properties: + InlineCode: | + exports.handler = async (event) => { + const response = { + statusCode: 200, + body: JSON.stringify('Hello from Lambda!'), + }; + return response; + }; + Handler: index.handler + Runtime: nodejs14.x + MemorySize: 1024 + DestinationSQS: + Condition: QueueCreationDisabled + Type: AWS::SQS::Queue +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_function_no_envvar.yaml b/integration/resources/templates/single/basic_function_no_envvar.yaml index 9ae0917bd..b90b7a257 100644 --- a/integration/resources/templates/single/basic_function_no_envvar.yaml +++ b/integration/resources/templates/single/basic_function_no_envvar.yaml @@ -1,11 +1,13 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_function_openapi.yaml b/integration/resources/templates/single/basic_function_openapi.yaml index 4e25221de..299892503 100644 --- a/integration/resources/templates/single/basic_function_openapi.yaml +++ b/integration/resources/templates/single/basic_function_openapi.yaml @@ -1,18 +1,20 @@ Globals: - Api: - OpenApiVersion: 3.0.1 + Api: + OpenApiVersion: 3.0.1 Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess - Environment: - Variables: - Name: Value - Name2: Value2 + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess + Environment: + Variables: + Name: Value + Name2: Value2 +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_function_with_arm_architecture.yaml b/integration/resources/templates/single/basic_function_with_arm_architecture.yaml index 0668e3587..4ddd6eea9 100644 --- a/integration/resources/templates/single/basic_function_with_arm_architecture.yaml +++ b/integration/resources/templates/single/basic_function_with_arm_architecture.yaml @@ -1,10 +1,11 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Architectures: ["arm64"] - \ No newline at end of file + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Architectures: [arm64] +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_function_with_function_url_config.yaml b/integration/resources/templates/single/basic_function_with_function_url_config.yaml index 76bb2692f..891c762cb 100644 --- a/integration/resources/templates/single/basic_function_with_function_url_config.yaml +++ b/integration/resources/templates/single/basic_function_with_function_url_config.yaml @@ -1,21 +1,23 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - FunctionUrlConfig: - AuthType: NONE - Cors: - AllowOrigins: - - "https://foo.com" - AllowMethods: - - "POST" - AllowCredentials: true - AllowHeaders: - - "x-Custom-Header" - ExposeHeaders: - - "x-amzn-header" - MaxAge: 10 + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + FunctionUrlConfig: + AuthType: NONE + Cors: + AllowOrigins: + - https://foo.com + AllowMethods: + - POST + AllowCredentials: true + AllowHeaders: + - x-Custom-Header + ExposeHeaders: + - x-amzn-header + MaxAge: 10 +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_function_with_function_url_with_autopuplishalias.yaml b/integration/resources/templates/single/basic_function_with_function_url_with_autopuplishalias.yaml index 26e7476b6..48a30c427 100644 --- a/integration/resources/templates/single/basic_function_with_function_url_with_autopuplishalias.yaml +++ b/integration/resources/templates/single/basic_function_with_function_url_with_autopuplishalias.yaml @@ -1,22 +1,24 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - AutoPublishAlias: live - FunctionUrlConfig: - AuthType: NONE - Cors: - AllowOrigins: - - "https://foo.com" - AllowMethods: - - "POST" - AllowCredentials: true - AllowHeaders: - - "x-Custom-Header" - ExposeHeaders: - - "x-amzn-header" - MaxAge: 10 + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + AutoPublishAlias: live + FunctionUrlConfig: + AuthType: NONE + Cors: + AllowOrigins: + - https://foo.com + AllowMethods: + - POST + AllowCredentials: true + AllowHeaders: + - x-Custom-Header + ExposeHeaders: + - x-amzn-header + MaxAge: 10 +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_function_with_kmskeyarn.yaml b/integration/resources/templates/single/basic_function_with_kmskeyarn.yaml index 80faf07b8..5c623584b 100644 --- a/integration/resources/templates/single/basic_function_with_kmskeyarn.yaml +++ b/integration/resources/templates/single/basic_function_with_kmskeyarn.yaml @@ -1,32 +1,33 @@ Resources: - BasicFunctionWithKmsKeyArn: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Environment: - Variables: - Key: Value - KmsKeyArn: - Fn::GetAtt: [MyKey, Arn] + BasicFunctionWithKmsKeyArn: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Environment: + Variables: + Key: Value + KmsKeyArn: + Fn::GetAtt: [MyKey, Arn] - MyKey: - Type: "AWS::KMS::Key" - Properties: - Description: "A sample key" - KeyPolicy: - Version: "2012-10-17" - Id: "key-default-1" - Statement: - - - Sid: "Allow administration of the key" - Effect: "Allow" - Principal: - AWS: - Fn::Sub: "arn:${AWS::Partition}:iam::${AWS::AccountId}:root" - Action: - - "kms:*" - Resource: "*" \ No newline at end of file + MyKey: + Type: AWS::KMS::Key + Properties: + Description: A sample key + KeyPolicy: + Version: '2012-10-17' + Id: key-default-1 + Statement: + - Sid: Allow administration of the key + Effect: Allow + Principal: + AWS: + Fn::Sub: arn:${AWS::Partition}:iam::${AWS::AccountId}:root + Action: + - kms:* + Resource: '*' +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_function_with_sns_dlq.yaml b/integration/resources/templates/single/basic_function_with_sns_dlq.yaml index ad2c79512..e2157f4a2 100644 --- a/integration/resources/templates/single/basic_function_with_sns_dlq.yaml +++ b/integration/resources/templates/single/basic_function_with_sns_dlq.yaml @@ -8,7 +8,9 @@ Resources: DeadLetterQueue: Type: SNS TargetArn: - Ref: "MyTopic" + Ref: MyTopic MyTopic: Type: AWS::SNS::Topic +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_function_with_sqs_dlq.yaml b/integration/resources/templates/single/basic_function_with_sqs_dlq.yaml index 0e3405f9b..99ff6cdf7 100644 --- a/integration/resources/templates/single/basic_function_with_sqs_dlq.yaml +++ b/integration/resources/templates/single/basic_function_with_sqs_dlq.yaml @@ -1,4 +1,3 @@ - Resources: MyFunction: Type: AWS::Serverless::Function @@ -9,7 +8,9 @@ Resources: DeadLetterQueue: Type: SQS TargetArn: - Fn::GetAtt: ["MyQueue", "Arn"] + Fn::GetAtt: [MyQueue, Arn] MyQueue: Type: AWS::SQS::Queue +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_function_with_tags.yaml b/integration/resources/templates/single/basic_function_with_tags.yaml index 3368c0120..c8b3f1d52 100644 --- a/integration/resources/templates/single/basic_function_with_tags.yaml +++ b/integration/resources/templates/single/basic_function_with_tags.yaml @@ -1,14 +1,16 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess - Tags: - TagKey1: TagValue1 - TagKey2: "" + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess + Tags: + TagKey1: TagValue1 + TagKey2: '' +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_function_with_tracing.yaml b/integration/resources/templates/single/basic_function_with_tracing.yaml index 469a3a786..657febb72 100644 --- a/integration/resources/templates/single/basic_function_with_tracing.yaml +++ b/integration/resources/templates/single/basic_function_with_tracing.yaml @@ -10,27 +10,29 @@ Parameters: Default: PassThrough Resources: - ActiveTracingFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess - Tracing: Active + ActiveTracingFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess + Tracing: Active - PassThroughTracingFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess - Tracing: - Ref: TracingParamPassThrough + PassThroughTracingFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess + Tracing: + Ref: TracingParamPassThrough +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_function_with_x86_architecture.yaml b/integration/resources/templates/single/basic_function_with_x86_architecture.yaml index 3196a8bf1..c104d1a64 100644 --- a/integration/resources/templates/single/basic_function_with_x86_architecture.yaml +++ b/integration/resources/templates/single/basic_function_with_x86_architecture.yaml @@ -1,11 +1,13 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Architectures: - - x86_64 - + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Architectures: + - x86_64 + +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_http_api.yaml b/integration/resources/templates/single/basic_http_api.yaml index 27e3c340d..e5b5f0ff1 100644 --- a/integration/resources/templates/single/basic_http_api.yaml +++ b/integration/resources/templates/single/basic_http_api.yaml @@ -8,4 +8,6 @@ Resources: title: Ref: AWS::StackName openapi: 3.0.1 - paths: {} \ No newline at end of file + paths: {} +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_layer.yaml b/integration/resources/templates/single/basic_layer.yaml index 6b308fd91..2117471b4 100644 --- a/integration/resources/templates/single/basic_layer.yaml +++ b/integration/resources/templates/single/basic_layer.yaml @@ -1,6 +1,8 @@ Resources: - MyLayerVersion: - Type: AWS::Serverless::LayerVersion - Properties: - ContentUri: ${contenturi} - RetentionPolicy: Delete + MyLayerVersion: + Type: AWS::Serverless::LayerVersion + Properties: + ContentUri: ${contenturi} + RetentionPolicy: Delete +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_layer_with_compatible_architecture.yaml b/integration/resources/templates/single/basic_layer_with_compatible_architecture.yaml index 648175109..187b72e7a 100644 --- a/integration/resources/templates/single/basic_layer_with_compatible_architecture.yaml +++ b/integration/resources/templates/single/basic_layer_with_compatible_architecture.yaml @@ -1,28 +1,30 @@ Parameters: - Runtimes: - Type: CommaDelimitedList - Default: nodejs14.x - LayerName: - Type: String - Default: MyNamedLayerVersion - + Runtimes: + Type: CommaDelimitedList + Default: nodejs14.x + LayerName: + Type: String + Default: MyNamedLayerVersion + Resources: - MyLayerVersion: - Type: AWS::Serverless::LayerVersion - Properties: - ContentUri: ${contenturi} - LayerName: - Ref: LayerName - CompatibleRuntimes: - Ref: Runtimes - CompatibleArchitectures: [x86_64, arm64] + MyLayerVersion: + Type: AWS::Serverless::LayerVersion + Properties: + ContentUri: ${contenturi} + LayerName: + Ref: LayerName + CompatibleRuntimes: + Ref: Runtimes + CompatibleArchitectures: [x86_64, arm64] Outputs: - MyLayerArn: - Value: - Ref: MyLayerVersion - LayerName: - Value: - Ref: LayerName - + MyLayerArn: + Value: + Ref: MyLayerVersion + LayerName: + Value: + Ref: LayerName + +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_layer_with_parameters.yaml b/integration/resources/templates/single/basic_layer_with_parameters.yaml index 01b8a8671..de2040383 100644 --- a/integration/resources/templates/single/basic_layer_with_parameters.yaml +++ b/integration/resources/templates/single/basic_layer_with_parameters.yaml @@ -1,46 +1,48 @@ Parameters: - Retention: - Type: String - Default: Retain - License: - Type: String - Default: MIT-0 - Runtimes: - Type: CommaDelimitedList - Default: nodejs14.x - LayerName: - Type: String - Default: MyNamedLayerVersion - Description: - Type: String - Default: Some description about this layer goes here + Retention: + Type: String + Default: Retain + License: + Type: String + Default: MIT-0 + Runtimes: + Type: CommaDelimitedList + Default: nodejs14.x + LayerName: + Type: String + Default: MyNamedLayerVersion + Description: + Type: String + Default: Some description about this layer goes here Resources: - MyLayerVersion: - Type: AWS::Serverless::LayerVersion - Properties: - ContentUri: ${contenturi} - LayerName: - Ref: LayerName - RetentionPolicy: - Ref: Retention - CompatibleRuntimes: - Ref: Runtimes - LicenseInfo: - Ref: License - Description: - Ref: Description + MyLayerVersion: + Type: AWS::Serverless::LayerVersion + Properties: + ContentUri: ${contenturi} + LayerName: + Ref: LayerName + RetentionPolicy: + Ref: Retention + CompatibleRuntimes: + Ref: Runtimes + LicenseInfo: + Ref: License + Description: + Ref: Description Outputs: - MyLayerArn: - Value: - Ref: MyLayerVersion - License: - Value: - Ref: License - Description: - Value: - Ref: Description - LayerName: - Value: - Ref: LayerName \ No newline at end of file + MyLayerArn: + Value: + Ref: MyLayerVersion + License: + Value: + Ref: License + Description: + Value: + Ref: Description + LayerName: + Value: + Ref: LayerName +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_state_machine_inline_definition.yaml b/integration/resources/templates/single/basic_state_machine_inline_definition.yaml index 8fb8a16cd..f7c068f2d 100644 --- a/integration/resources/templates/single/basic_state_machine_inline_definition.yaml +++ b/integration/resources/templates/single/basic_state_machine_inline_definition.yaml @@ -16,8 +16,10 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_state_machine_with_tags.yaml b/integration/resources/templates/single/basic_state_machine_with_tags.yaml index 815652641..550ff1fa4 100644 --- a/integration/resources/templates/single/basic_state_machine_with_tags.yaml +++ b/integration/resources/templates/single/basic_state_machine_with_tags.yaml @@ -15,11 +15,11 @@ Resources: Result: World End: true Policies: - - Version: "2012-10-17" - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Tags: TagOne: ValueOne TagTwo: ValueTwo @@ -31,3 +31,5 @@ Outputs: Description: ARN of the state machine Value: Ref: MyStateMachine +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_table_no_param.yaml b/integration/resources/templates/single/basic_table_no_param.yaml index ae4fe8164..142b7315e 100644 --- a/integration/resources/templates/single/basic_table_no_param.yaml +++ b/integration/resources/templates/single/basic_table_no_param.yaml @@ -2,3 +2,5 @@ Resources: MyApi: Type: AWS::Serverless::SimpleTable # SimpleTable does NOT require any parameters +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/basic_table_with_param.yaml b/integration/resources/templates/single/basic_table_with_param.yaml index c0a7039c3..bb4148a19 100644 --- a/integration/resources/templates/single/basic_table_with_param.yaml +++ b/integration/resources/templates/single/basic_table_with_param.yaml @@ -10,3 +10,5 @@ Resources: ProvisionedThroughput: ReadCapacityUnits: 2 WriteCapacityUnits: 2 +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/function_alias_with_http_api_events.yaml b/integration/resources/templates/single/function_alias_with_http_api_events.yaml index a87d0e15a..94b4ed468 100644 --- a/integration/resources/templates/single/function_alias_with_http_api_events.yaml +++ b/integration/resources/templates/single/function_alias_with_http_api_events.yaml @@ -21,3 +21,5 @@ Resources: Ref: MyHttpApi Path: /bar Method: POST +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/function_with_deployment_preference_alarms_intrinsic_if.yaml b/integration/resources/templates/single/function_with_deployment_preference_alarms_intrinsic_if.yaml index ddc1a13bd..a736b3e1d 100644 --- a/integration/resources/templates/single/function_with_deployment_preference_alarms_intrinsic_if.yaml +++ b/integration/resources/templates/single/function_with_deployment_preference_alarms_intrinsic_if.yaml @@ -1,11 +1,11 @@ Conditions: MyCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunction: - Type: "AWS::Serverless::Function" + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: hello.handler @@ -15,9 +15,11 @@ Resources: Type: Linear10PercentEvery3Minutes Alarms: Fn::If: - - MyCondition - - - Alarm1 - - Alarm2 - - Alarm3 - - - Alarm1 - - Alarm5 + - MyCondition + - - Alarm1 + - Alarm2 + - Alarm3 + - - Alarm1 + - Alarm5 +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/function_with_ephemeral_storage.yaml b/integration/resources/templates/single/function_with_ephemeral_storage.yaml index 74fb1ab78..ddd3bdf63 100644 --- a/integration/resources/templates/single/function_with_ephemeral_storage.yaml +++ b/integration/resources/templates/single/function_with_ephemeral_storage.yaml @@ -1,17 +1,19 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - EphemeralStorage: - Size: 1024 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess - Environment: - Variables: - Name: Value - Name2: Value2 \ No newline at end of file + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + EphemeralStorage: + Size: 1024 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess + Environment: + Variables: + Name: Value + Name2: Value2 +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/function_with_http_api_events.yaml b/integration/resources/templates/single/function_with_http_api_events.yaml index 57eaad7f4..dbfe28052 100644 --- a/integration/resources/templates/single/function_with_http_api_events.yaml +++ b/integration/resources/templates/single/function_with_http_api_events.yaml @@ -20,3 +20,5 @@ Resources: Ref: MyHttpApi Path: /bar Method: POST +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/function_with_http_api_events_and_auth.yaml b/integration/resources/templates/single/function_with_http_api_events_and_auth.yaml index 17794edba..7362f93b4 100644 --- a/integration/resources/templates/single/function_with_http_api_events_and_auth.yaml +++ b/integration/resources/templates/single/function_with_http_api_events_and_auth.yaml @@ -94,3 +94,5 @@ Resources: Properties: Auth: EnableIamAuthorizer: true +Metadata: + SamTransformTest: true diff --git a/integration/resources/templates/single/state_machine_with_api.yaml b/integration/resources/templates/single/state_machine_with_api.yaml index a4aafa021..0fe28583e 100644 --- a/integration/resources/templates/single/state_machine_with_api.yaml +++ b/integration/resources/templates/single/state_machine_with_api.yaml @@ -17,7 +17,7 @@ Resources: Type: AWS::Serverless::StateMachine Properties: Policies: - - arn:aws:iam::aws:policy/AWSLambda_FullAccess + - arn:aws:iam::aws:policy/AWSLambda_FullAccess Definition: StartAt: One States: @@ -37,3 +37,5 @@ Resources: Outputs: ApiEndpoint: Value: !Sub "https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/echo" +Metadata: + SamTransformTest: true diff --git a/integration/setup/companion-stack.yaml b/integration/setup/companion-stack.yaml index e33fc1d7d..72a123267 100644 --- a/integration/setup/companion-stack.yaml +++ b/integration/setup/companion-stack.yaml @@ -1,30 +1,30 @@ Resources: PreCreatedVpc: - Type: "AWS::EC2::VPC" + Type: AWS::EC2::VPC Properties: - CidrBlock: "10.0.0.0/16" + CidrBlock: 10.0.0.0/16 PreCreatedSubnetOne: - Type: "AWS::EC2::Subnet" + Type: AWS::EC2::Subnet Properties: VpcId: Ref: PreCreatedVpc - CidrBlock: "10.0.0.0/24" + CidrBlock: 10.0.0.0/24 AvailabilityZone: Fn::Select: - - 0 - - Fn::GetAZs: "" + - 0 + - Fn::GetAZs: '' PreCreatedSubnetTwo: - Type: "AWS::EC2::Subnet" + Type: AWS::EC2::Subnet Properties: VpcId: Ref: PreCreatedVpc - CidrBlock: "10.0.1.0/24" + CidrBlock: 10.0.1.0/24 AvailabilityZone: Fn::Select: - - 1 - - Fn::GetAZs: "" + - 1 + - Fn::GetAZs: '' PreCreatedInternetGateway: Type: AWS::EC2::InternetGateway @@ -43,26 +43,28 @@ Resources: Outputs: PreCreatedVpc: - Description: "Pre-created VPC that can be used inside other tests" + Description: Pre-created VPC that can be used inside other tests Value: Ref: PreCreatedVpc PreCreatedSubnetTwo: - Description: "Pre-created #2 subnet that can be used inside other tests" + Description: 'Pre-created #2 subnet that can be used inside other tests' Value: Ref: PreCreatedSubnetTwo PreCreatedSubnetOne: - Description: "Pre-created #1 subnet that can be used inside other tests" + Description: 'Pre-created #1 subnet that can be used inside other tests' Value: Ref: PreCreatedSubnetOne PreCreatedInternetGateway: - Description: "Pre-created Internet Gateway that can be used inside other tests" + Description: Pre-created Internet Gateway that can be used inside other tests Value: Ref: PreCreatedInternetGateway PreCreatedAttachGateway: - Description: "Pre-created Attach Gateway that can be used inside other tests" + Description: Pre-created Attach Gateway that can be used inside other tests Value: Ref: PreCreatedAttachGateway PreCreatedS3Bucket: - Description: "Pre-created S3 Bucket that can be used inside other tests" - Value: - Ref: PreCreatedS3Bucket \ No newline at end of file + Description: Pre-created S3 Bucket that can be used inside other tests + Value: + Ref: PreCreatedS3Bucket +Metadata: + SamTransformTest: true diff --git a/integration/setup/example-sar-app.yaml b/integration/setup/example-sar-app.yaml index 483eec305..7ac573273 100644 --- a/integration/setup/example-sar-app.yaml +++ b/integration/setup/example-sar-app.yaml @@ -18,4 +18,6 @@ Resources: Timeout: 5 Environment: Variables: - IdentityNameParameter: !Ref IdentityNameParameter \ No newline at end of file + IdentityNameParameter: !Ref IdentityNameParameter +Metadata: + SamTransformTest: true