From adcb73d30a3bb3cb307b50ec2bed776587298dfb Mon Sep 17 00:00:00 2001 From: Sami Jawhar Date: Sat, 24 Nov 2018 20:28:06 +0000 Subject: [PATCH 01/10] Allow Api.Auth in Globals section --- samtranslator/plugins/globals/globals.py | 1 + 1 file changed, 1 insertion(+) diff --git a/samtranslator/plugins/globals/globals.py b/samtranslator/plugins/globals/globals.py index 5c94009f53..f2270523a4 100644 --- a/samtranslator/plugins/globals/globals.py +++ b/samtranslator/plugins/globals/globals.py @@ -36,6 +36,7 @@ class Globals(object): # StageName: Because StageName cannot be overridden for Implicit APIs because of the current plugin # architecture SamResourceType.Api.value: [ + 'Auth', "Name", "DefinitionUri", "CacheClusterEnabled", From 2e5a7ce7dd4650d1e395c6980ffacd1ad06c8bb0 Mon Sep 17 00:00:00 2001 From: Sami Jawhar Date: Mon, 10 Dec 2018 21:44:25 +0800 Subject: [PATCH 02/10] Add Auth to expected error for error_globals_api_with_stage_name --- .../output/error_globals_api_with_stage_name.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/translator/output/error_globals_api_with_stage_name.json b/tests/translator/output/error_globals_api_with_stage_name.json index 57ed024389..85c3950519 100644 --- a/tests/translator/output/error_globals_api_with_stage_name.json +++ b/tests/translator/output/error_globals_api_with_stage_name.json @@ -1,8 +1,8 @@ { "errors": [ { - "errorMessage": "'Globals' section is invalid. 'StageName' is not a supported property of 'Api'. Must be one of the following values - ['Name', 'DefinitionUri', 'CacheClusterEnabled', 'CacheClusterSize', 'Variables', 'EndpointConfiguration', 'MethodSettings', 'BinaryMediaTypes', 'Cors']" + "errorMessage": "'Globals' section is invalid. 'StageName' is not a supported property of 'Api'. Must be one of the following values - ['Auth', 'Name', 'DefinitionUri', 'CacheClusterEnabled', 'CacheClusterSize', 'Variables', 'EndpointConfiguration', 'MethodSettings', 'BinaryMediaTypes', 'Cors']" } ], - "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. 'Globals' section is invalid. 'StageName' is not a supported property of 'Api'. Must be one of the following values - ['Name', 'DefinitionUri', 'CacheClusterEnabled', 'CacheClusterSize', 'Variables', 'EndpointConfiguration', 'MethodSettings', 'BinaryMediaTypes', 'Cors']" -} \ No newline at end of file + "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. 'Globals' section is invalid. 'StageName' is not a supported property of 'Api'. Must be one of the following values - ['Auth', 'Name', 'DefinitionUri', 'CacheClusterEnabled', 'CacheClusterSize', 'Variables', 'EndpointConfiguration', 'MethodSettings', 'BinaryMediaTypes', 'Cors']" +} From 205372b89ad101772185b8962a2916d76552701c Mon Sep 17 00:00:00 2001 From: Sami Jawhar Date: Fri, 14 Dec 2018 21:11:41 +0800 Subject: [PATCH 03/10] Added auth check to globals_for_api --- tests/translator/input/globals_for_api.yaml | 5 ++++ tests/translator/output/globals_for_api.json | 26 ++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/tests/translator/input/globals_for_api.yaml b/tests/translator/input/globals_for_api.yaml index bce2204701..90765c2c98 100644 --- a/tests/translator/input/globals_for_api.yaml +++ b/tests/translator/input/globals_for_api.yaml @@ -3,6 +3,11 @@ Globals: Name: "some api" CacheClusterEnabled: True CacheClusterSize: "1.6" + Auth: + DefaultAuthorizer: MyCognitoAuth + Authorizers: + MyCognitoAuth: + UserPoolArn: !GetAtt MyUserPool.Arn Variables: SomeVar: Value diff --git a/tests/translator/output/globals_for_api.json b/tests/translator/output/globals_for_api.json index 7b9c9557f6..63f39c1ee2 100644 --- a/tests/translator/output/globals_for_api.json +++ b/tests/translator/output/globals_for_api.json @@ -113,6 +113,19 @@ "CacheClusterEnabled": true, "DeploymentId": { "Ref": "ServerlessRestApiDeployment62b96c1a61" + }, + "Auth": { + "DefaultAuthorizer": "MyCognitoAuth", + "Authorizers": { + "MyCognitoAuth": { + "UserPoolArn": { + "Fn::GetAtt": [ + "MyUserPool", + "Arn" + ] + } + } + } } } }, @@ -179,6 +192,19 @@ "CacheClusterEnabled": true, "DeploymentId": { "Ref": "ExplicitApiDeployment359f256a3b" + }, + "Auth": { + "DefaultAuthorizer": "MyCognitoAuth", + "Authorizers": { + "MyCognitoAuth": { + "UserPoolArn": { + "Fn::GetAtt": [ + "MyUserPool", + "Arn" + ] + } + } + } } } } From df357d98918152101cde25194053c86e7bd480bc Mon Sep 17 00:00:00 2001 From: Sami Jawhar Date: Fri, 14 Dec 2018 21:30:52 +0800 Subject: [PATCH 04/10] Added valid swagger body to explicitApi for global auth test --- tests/translator/input/globals_for_api.yaml | 14 ++++++++++-- tests/translator/output/globals_for_api.json | 23 ++++++++++++++++++-- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/tests/translator/input/globals_for_api.yaml b/tests/translator/input/globals_for_api.yaml index 90765c2c98..784a850b16 100644 --- a/tests/translator/input/globals_for_api.yaml +++ b/tests/translator/input/globals_for_api.yaml @@ -30,6 +30,16 @@ Resources: Properties: StageName: SomeStage DefinitionBody: - "this": "is" - "a": "swagger" + swagger: 2.0 + info: + version: '1.0' + title: !Ref AWS::StackName + paths: + "/": + get: + x-amazon-apigateway-integration: + httpMethod: POST + type: aws_proxy + uri: !Sub arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ImplicitApiFunction.Arn}/invocations + responses: {} diff --git a/tests/translator/output/globals_for_api.json b/tests/translator/output/globals_for_api.json index 63f39c1ee2..88018f430e 100644 --- a/tests/translator/output/globals_for_api.json +++ b/tests/translator/output/globals_for_api.json @@ -93,8 +93,27 @@ "Type": "AWS::ApiGateway::RestApi", "Properties": { "Body": { - "this": "is", - "a": "swagger" + "info": { + "version": "1.0", + "title": { + "Ref": "AWS::StackName" + } + }, + "paths": { + "/": { + "get": { + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ImplicitApiFunction.Arn}/invocations" + } + }, + "responses": {} + } + } + }, + "swagger": "2.0" }, "Name": "some api" } From 0941ae9e05c01feae491585e0777d886af7fbc33 Mon Sep 17 00:00:00 2001 From: Sami Jawhar Date: Fri, 14 Dec 2018 22:16:58 +0800 Subject: [PATCH 05/10] Added definition body to us-gov and cn global_for_api tests --- tests/translator/input/globals_for_api.yaml | 2 +- .../output/aws-cn/globals_for_api.json | 23 +++++++++++++++++-- .../output/aws-us-gov/globals_for_api.json | 23 +++++++++++++++++-- 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/tests/translator/input/globals_for_api.yaml b/tests/translator/input/globals_for_api.yaml index 784a850b16..22f43805a5 100644 --- a/tests/translator/input/globals_for_api.yaml +++ b/tests/translator/input/globals_for_api.yaml @@ -7,7 +7,7 @@ Globals: DefaultAuthorizer: MyCognitoAuth Authorizers: MyCognitoAuth: - UserPoolArn: !GetAtt MyUserPool.Arn + UserPoolArn: !GetAtt MyUserPool.Arn Variables: SomeVar: Value diff --git a/tests/translator/output/aws-cn/globals_for_api.json b/tests/translator/output/aws-cn/globals_for_api.json index f3e7c8b75a..6493b8f9d3 100644 --- a/tests/translator/output/aws-cn/globals_for_api.json +++ b/tests/translator/output/aws-cn/globals_for_api.json @@ -93,8 +93,27 @@ "Type": "AWS::ApiGateway::RestApi", "Properties": { "Body": { - "this": "is", - "a": "swagger" + "info": { + "version": "1.0", + "title": { + "Ref": "AWS::StackName" + } + }, + "paths": { + "/": { + "get": { + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-cn:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ImplicitApiFunction.Arn}/invocations" + } + }, + "responses": {} + } + } + }, + "swagger": "2.0" }, "EndpointConfiguration": { "Types": [ diff --git a/tests/translator/output/aws-us-gov/globals_for_api.json b/tests/translator/output/aws-us-gov/globals_for_api.json index c27039b593..7b4bf88ca9 100644 --- a/tests/translator/output/aws-us-gov/globals_for_api.json +++ b/tests/translator/output/aws-us-gov/globals_for_api.json @@ -93,8 +93,27 @@ "Type": "AWS::ApiGateway::RestApi", "Properties": { "Body": { - "this": "is", - "a": "swagger" + "info": { + "version": "1.0", + "title": { + "Ref": "AWS::StackName" + } + }, + "paths": { + "/": { + "get": { + "x-amazon-apigateway-integration": { + "httpMethod": "POST", + "type": "aws_proxy", + "uri": { + "Fn::Sub": "arn:aws-us-gov:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ImplicitApiFunction.Arn}/invocations" + } + }, + "responses": {} + } + } + }, + "swagger": "2.0" }, "EndpointConfiguration": { "Types": [ From a930b85b0229cc32d718243559ba7887d8dcfa7e Mon Sep 17 00:00:00 2001 From: Keeton Hodgson Date: Fri, 21 Dec 2018 12:49:31 -0800 Subject: [PATCH 06/10] Fixed output for normal partition for api globals test --- tests/translator/output/globals_for_api.json | 100 +++++++++++-------- 1 file changed, 61 insertions(+), 39 deletions(-) diff --git a/tests/translator/output/globals_for_api.json b/tests/translator/output/globals_for_api.json index 88018f430e..4fe72b4fe7 100644 --- a/tests/translator/output/globals_for_api.json +++ b/tests/translator/output/globals_for_api.json @@ -109,12 +109,36 @@ "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ImplicitApiFunction.Arn}/invocations" } }, - "responses": {} + "responses": {}, + "security": [ + { + "MyCognitoAuth": [] + } + ] } } }, - "swagger": "2.0" - }, + "swagger": 2.0, + "securityDefinitions": { + "MyCognitoAuth": { + "type": "apiKey", + "name": "Authorization", + "in": "header", + "x-amazon-apigateway-authtype": "cognito_user_pools", + "x-amazon-apigateway-authorizer": { + "type": "cognito_user_pools", + "providerARNs": [ + { + "Fn::GetAtt": [ + "MyUserPool", + "Arn" + ] + } + ] + } + } + } + }, "Name": "some api" } }, @@ -131,40 +155,27 @@ }, "CacheClusterEnabled": true, "DeploymentId": { - "Ref": "ServerlessRestApiDeployment62b96c1a61" - }, - "Auth": { - "DefaultAuthorizer": "MyCognitoAuth", - "Authorizers": { - "MyCognitoAuth": { - "UserPoolArn": { - "Fn::GetAtt": [ - "MyUserPool", - "Arn" - ] - } - } - } + "Ref": "ServerlessRestApiDeploymentaeab051f80" } } }, - "ServerlessRestApiDeployment62b96c1a61": { + "ServerlessRestApiDeploymentaeab051f80": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ServerlessRestApi" }, - "Description": "RestApi deployment id: 62b96c1a611878eefb13e8ef66dbc71b9ba3dd19", + "Description": "RestApi deployment id: aeab051f804635874701cd506a1540740a379961", "StageName": "Stage" } }, - "ExplicitApiDeployment359f256a3b": { + "ExplicitApiDeploymentf8ca980dfb": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ExplicitApi" }, - "Description": "RestApi deployment id: 359f256a3b3ff2e1102e335a4d603f02df9b4988", + "Description": "RestApi deployment id: f8ca980dfb884f427b861089480cf72d9094f39f", "StageName": "Stage" } }, @@ -188,12 +199,36 @@ "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ImplicitApiFunction.Arn}/invocations" } }, - "responses": {} + "responses": {}, + "security": [ + { + "MyCognitoAuth": [] + } + ] } } }, - "swagger": "2.0" - }, + "swagger": "2.0", + "securityDefinitions": { + "MyCognitoAuth": { + "type": "apiKey", + "name": "Authorization", + "in": "header", + "x-amazon-apigateway-authtype": "cognito_user_pools", + "x-amazon-apigateway-authorizer": { + "type": "cognito_user_pools", + "providerARNs": [ + { + "Fn::GetAtt": [ + "MyUserPool", + "Arn" + ] + } + ] + } + } + } + }, "Name": "some api" } }, @@ -210,22 +245,9 @@ }, "CacheClusterEnabled": true, "DeploymentId": { - "Ref": "ExplicitApiDeployment359f256a3b" - }, - "Auth": { - "DefaultAuthorizer": "MyCognitoAuth", - "Authorizers": { - "MyCognitoAuth": { - "UserPoolArn": { - "Fn::GetAtt": [ - "MyUserPool", - "Arn" - ] - } - } - } + "Ref": "ExplicitApiDeploymentf8ca980dfb" } } } } -} \ No newline at end of file +} From 13547064ce666abb723925989cc71e200f087343 Mon Sep 17 00:00:00 2001 From: Keeton Hodgson Date: Fri, 21 Dec 2018 13:09:38 -0800 Subject: [PATCH 07/10] us-gov test for api globals passes --- .../output/aws-us-gov/globals_for_api.json | 76 +++++++++++++++---- 1 file changed, 62 insertions(+), 14 deletions(-) diff --git a/tests/translator/output/aws-us-gov/globals_for_api.json b/tests/translator/output/aws-us-gov/globals_for_api.json index 7b4bf88ca9..39a70f3d3e 100644 --- a/tests/translator/output/aws-us-gov/globals_for_api.json +++ b/tests/translator/output/aws-us-gov/globals_for_api.json @@ -106,15 +106,39 @@ "httpMethod": "POST", "type": "aws_proxy", "uri": { - "Fn::Sub": "arn:aws-us-gov:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ImplicitApiFunction.Arn}/invocations" + "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ImplicitApiFunction.Arn}/invocations" } }, - "responses": {} + "responses": {}, + "security": [ + { + "MyCognitoAuth": [] + } + ] } } }, - "swagger": "2.0" - }, + "swagger": 2.0, + "securityDefinitions": { + "MyCognitoAuth": { + "type": "apiKey", + "name": "Authorization", + "in": "header", + "x-amazon-apigateway-authtype": "cognito_user_pools", + "x-amazon-apigateway-authorizer": { + "type": "cognito_user_pools", + "providerARNs": [ + { + "Fn::GetAtt": [ + "MyUserPool", + "Arn" + ] + } + ] + } + } + } + }, "EndpointConfiguration": { "Types": [ "REGIONAL" @@ -126,13 +150,13 @@ } } }, - "ServerlessRestApiDeployment5b2cb4ba8f": { + "ServerlessRestApiDeployment8d8686036d": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ServerlessRestApi" }, - "Description": "RestApi deployment id: 5b2cb4ba8fce8a9445b1914c6c6fbeef81a9075a", + "Description": "RestApi deployment id: 8d8686036d660a9db5398f6f9d1d3158923cac59", "StageName": "Stage" } }, @@ -149,7 +173,7 @@ }, "CacheClusterEnabled": true, "DeploymentId": { - "Ref": "ExplicitApiDeployment359f256a3b" + "Ref": "ExplicitApiDeploymentf8ca980dfb" } } }, @@ -166,7 +190,7 @@ }, "CacheClusterEnabled": true, "DeploymentId": { - "Ref": "ServerlessRestApiDeployment5b2cb4ba8f" + "Ref": "ServerlessRestApiDeployment8d8686036d" } } }, @@ -190,12 +214,36 @@ "Fn::Sub": "arn:aws-us-gov:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ImplicitApiFunction.Arn}/invocations" } }, - "responses": {} + "responses": {}, + "security": [ + { + "MyCognitoAuth": [] + } + ] } } }, - "swagger": "2.0" - }, + "swagger": "2.0", + "securityDefinitions": { + "MyCognitoAuth": { + "type": "apiKey", + "name": "Authorization", + "in": "header", + "x-amazon-apigateway-authtype": "cognito_user_pools", + "x-amazon-apigateway-authorizer": { + "type": "cognito_user_pools", + "providerARNs": [ + { + "Fn::GetAtt": [ + "MyUserPool", + "Arn" + ] + } + ] + } + } + } + }, "EndpointConfiguration": { "Types": [ "REGIONAL" @@ -207,15 +255,15 @@ } } }, - "ExplicitApiDeployment359f256a3b": { + "ExplicitApiDeploymentf8ca980dfb": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ExplicitApi" }, - "Description": "RestApi deployment id: 359f256a3b3ff2e1102e335a4d603f02df9b4988", + "Description": "RestApi deployment id: f8ca980dfb884f427b861089480cf72d9094f39f", "StageName": "Stage" } } } -} \ No newline at end of file +} From fe7385556c3b47e30d852d6f0695169e1168ee30 Mon Sep 17 00:00:00 2001 From: Keeton Hodgson Date: Fri, 21 Dec 2018 13:18:52 -0800 Subject: [PATCH 08/10] update tests for aws-cn --- .../output/aws-cn/globals_for_api.json | 76 +++++++++++++++---- 1 file changed, 62 insertions(+), 14 deletions(-) diff --git a/tests/translator/output/aws-cn/globals_for_api.json b/tests/translator/output/aws-cn/globals_for_api.json index 6493b8f9d3..f39b34fd7e 100644 --- a/tests/translator/output/aws-cn/globals_for_api.json +++ b/tests/translator/output/aws-cn/globals_for_api.json @@ -106,15 +106,39 @@ "httpMethod": "POST", "type": "aws_proxy", "uri": { - "Fn::Sub": "arn:aws-cn:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ImplicitApiFunction.Arn}/invocations" + "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ImplicitApiFunction.Arn}/invocations" } }, - "responses": {} + "responses": {}, + "security": [ + { + "MyCognitoAuth": [] + } + ] } } }, - "swagger": "2.0" - }, + "swagger": 2.0, + "securityDefinitions": { + "MyCognitoAuth": { + "type": "apiKey", + "name": "Authorization", + "in": "header", + "x-amazon-apigateway-authtype": "cognito_user_pools", + "x-amazon-apigateway-authorizer": { + "type": "cognito_user_pools", + "providerARNs": [ + { + "Fn::GetAtt": [ + "MyUserPool", + "Arn" + ] + } + ] + } + } + } + }, "EndpointConfiguration": { "Types": [ "REGIONAL" @@ -139,27 +163,27 @@ }, "CacheClusterEnabled": true, "DeploymentId": { - "Ref": "ServerlessRestApiDeploymentcb4fb12558" + "Ref": "ServerlessRestApiDeployment9a5572f369" } } }, - "ServerlessRestApiDeploymentcb4fb12558": { + "ServerlessRestApiDeployment9a5572f369": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ServerlessRestApi" }, - "Description": "RestApi deployment id: cb4fb1255811b7b6a25dd35f23ee7ad133003b89", + "Description": "RestApi deployment id: 9a5572f369351aa29c0c17b8d747fb28430e1b88", "StageName": "Stage" } }, - "ExplicitApiDeployment359f256a3b": { + "ExplicitApiDeploymentf8ca980dfb": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ExplicitApi" }, - "Description": "RestApi deployment id: 359f256a3b3ff2e1102e335a4d603f02df9b4988", + "Description": "RestApi deployment id: f8ca980dfb884f427b861089480cf72d9094f39f", "StageName": "Stage" } }, @@ -183,12 +207,36 @@ "Fn::Sub": "arn:aws-cn:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ImplicitApiFunction.Arn}/invocations" } }, - "responses": {} + "responses": {}, + "security": [ + { + "MyCognitoAuth": [] + } + ] } } }, - "swagger": "2.0" - }, + "swagger": "2.0", + "securityDefinitions": { + "MyCognitoAuth": { + "type": "apiKey", + "name": "Authorization", + "in": "header", + "x-amazon-apigateway-authtype": "cognito_user_pools", + "x-amazon-apigateway-authorizer": { + "type": "cognito_user_pools", + "providerARNs": [ + { + "Fn::GetAtt": [ + "MyUserPool", + "Arn" + ] + } + ] + } + } + } + }, "EndpointConfiguration": { "Types": [ "REGIONAL" @@ -213,9 +261,9 @@ }, "CacheClusterEnabled": true, "DeploymentId": { - "Ref": "ExplicitApiDeployment359f256a3b" + "Ref": "ExplicitApiDeploymentf8ca980dfb" } } } } -} \ No newline at end of file +} From 7b811e5edd6f246752a868724428ede2e2477811 Mon Sep 17 00:00:00 2001 From: Keeton Hodgson Date: Wed, 2 Jan 2019 15:36:38 -0800 Subject: [PATCH 09/10] Updated tests for py27 --- tests/translator/output/aws-cn/globals_for_api.json | 12 ++++++------ .../output/aws-us-gov/globals_for_api.json | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/translator/output/aws-cn/globals_for_api.json b/tests/translator/output/aws-cn/globals_for_api.json index f39b34fd7e..571cb42e7d 100644 --- a/tests/translator/output/aws-cn/globals_for_api.json +++ b/tests/translator/output/aws-cn/globals_for_api.json @@ -163,27 +163,27 @@ }, "CacheClusterEnabled": true, "DeploymentId": { - "Ref": "ServerlessRestApiDeployment9a5572f369" + "Ref": "ServerlessRestApiDeploymentdb4b9da82a" } } }, - "ServerlessRestApiDeployment9a5572f369": { + "ServerlessRestApiDeploymentdb4b9da82a": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ServerlessRestApi" }, - "Description": "RestApi deployment id: 9a5572f369351aa29c0c17b8d747fb28430e1b88", + "Description": "RestApi deployment id: db4b9da82adc6031fcd32bf3a4954485464fc009", "StageName": "Stage" } }, - "ExplicitApiDeploymentf8ca980dfb": { + "ExplicitApiDeploymentd5fa0145e9": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ExplicitApi" }, - "Description": "RestApi deployment id: f8ca980dfb884f427b861089480cf72d9094f39f", + "Description": "RestApi deployment id: d5fa0145e9e6393911d32967e66fd7091d605483", "StageName": "Stage" } }, @@ -261,7 +261,7 @@ }, "CacheClusterEnabled": true, "DeploymentId": { - "Ref": "ExplicitApiDeploymentf8ca980dfb" + "Ref": "ExplicitApiDeploymentd5fa0145e9" } } } diff --git a/tests/translator/output/aws-us-gov/globals_for_api.json b/tests/translator/output/aws-us-gov/globals_for_api.json index 39a70f3d3e..af8198c818 100644 --- a/tests/translator/output/aws-us-gov/globals_for_api.json +++ b/tests/translator/output/aws-us-gov/globals_for_api.json @@ -173,7 +173,7 @@ }, "CacheClusterEnabled": true, "DeploymentId": { - "Ref": "ExplicitApiDeploymentf8ca980dfb" + "Ref": "ExplicitApiDeploymentd5fa0145e9" } } }, @@ -255,13 +255,13 @@ } } }, - "ExplicitApiDeploymentf8ca980dfb": { + "ExplicitApiDeploymentd5fa0145e9": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ExplicitApi" }, - "Description": "RestApi deployment id: f8ca980dfb884f427b861089480cf72d9094f39f", + "Description": "RestApi deployment id: d5fa0145e9e6393911d32967e66fd7091d605483", "StageName": "Stage" } } From 5f331610a614fd5393ddb1b8fb786bf4a1c31398 Mon Sep 17 00:00:00 2001 From: Keeton Hodgson Date: Thu, 3 Jan 2019 09:36:36 -0800 Subject: [PATCH 10/10] Updated other deployment hashes --- tests/translator/output/aws-cn/globals_for_api.json | 6 +++--- .../output/aws-us-gov/globals_for_api.json | 6 +++--- tests/translator/output/globals_for_api.json | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/translator/output/aws-cn/globals_for_api.json b/tests/translator/output/aws-cn/globals_for_api.json index 571cb42e7d..415765aba4 100644 --- a/tests/translator/output/aws-cn/globals_for_api.json +++ b/tests/translator/output/aws-cn/globals_for_api.json @@ -163,17 +163,17 @@ }, "CacheClusterEnabled": true, "DeploymentId": { - "Ref": "ServerlessRestApiDeploymentdb4b9da82a" + "Ref": "ServerlessRestApiDeploymente1212668e0" } } }, - "ServerlessRestApiDeploymentdb4b9da82a": { + "ServerlessRestApiDeploymente1212668e0": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ServerlessRestApi" }, - "Description": "RestApi deployment id: db4b9da82adc6031fcd32bf3a4954485464fc009", + "Description": "RestApi deployment id: e1212668e096994ab32167666f5a877bd6ac5fad", "StageName": "Stage" } }, diff --git a/tests/translator/output/aws-us-gov/globals_for_api.json b/tests/translator/output/aws-us-gov/globals_for_api.json index af8198c818..d03debdacc 100644 --- a/tests/translator/output/aws-us-gov/globals_for_api.json +++ b/tests/translator/output/aws-us-gov/globals_for_api.json @@ -150,13 +150,13 @@ } } }, - "ServerlessRestApiDeployment8d8686036d": { + "ServerlessRestApiDeploymentc969c99f9d": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ServerlessRestApi" }, - "Description": "RestApi deployment id: 8d8686036d660a9db5398f6f9d1d3158923cac59", + "Description": "RestApi deployment id: c969c99f9d6b6921dff605a206e8989bdb7d1bc7", "StageName": "Stage" } }, @@ -190,7 +190,7 @@ }, "CacheClusterEnabled": true, "DeploymentId": { - "Ref": "ServerlessRestApiDeployment8d8686036d" + "Ref": "ServerlessRestApiDeploymentc969c99f9d" } } }, diff --git a/tests/translator/output/globals_for_api.json b/tests/translator/output/globals_for_api.json index 4fe72b4fe7..b9c74178c9 100644 --- a/tests/translator/output/globals_for_api.json +++ b/tests/translator/output/globals_for_api.json @@ -155,27 +155,27 @@ }, "CacheClusterEnabled": true, "DeploymentId": { - "Ref": "ServerlessRestApiDeploymentaeab051f80" + "Ref": "ServerlessRestApiDeploymentdb4b9da82a" } } }, - "ServerlessRestApiDeploymentaeab051f80": { + "ServerlessRestApiDeploymentdb4b9da82a": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ServerlessRestApi" }, - "Description": "RestApi deployment id: aeab051f804635874701cd506a1540740a379961", + "Description": "RestApi deployment id: db4b9da82adc6031fcd32bf3a4954485464fc009", "StageName": "Stage" } }, - "ExplicitApiDeploymentf8ca980dfb": { + "ExplicitApiDeploymentd5fa0145e9": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ExplicitApi" }, - "Description": "RestApi deployment id: f8ca980dfb884f427b861089480cf72d9094f39f", + "Description": "RestApi deployment id: d5fa0145e9e6393911d32967e66fd7091d605483", "StageName": "Stage" } }, @@ -245,7 +245,7 @@ }, "CacheClusterEnabled": true, "DeploymentId": { - "Ref": "ExplicitApiDeploymentf8ca980dfb" + "Ref": "ExplicitApiDeploymentd5fa0145e9" } } }