Merge pull request #1476 from cliveli/master

Use the TemplateBody by default it exist
This commit is contained in:
Steve Pulec 2018-03-07 07:40:28 -05:00 committed by GitHub
commit 2e379853e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -49,3 +49,4 @@ Moto is written by Steve Pulec with contributions from:
* [Michael van Tellingen](https://github.com/mvantellingen)
* [Jessie Nadler](https://github.com/nadlerjessie)
* [Alex Morken](https://github.com/alexmorken)
* [Clive Li](https://github.com/cliveli)

View File

@ -221,13 +221,12 @@ class CloudFormationResponse(BaseResponse):
stack_name = self._get_param('StackName')
role_arn = self._get_param('RoleARN')
template_url = self._get_param('TemplateURL')
stack_body = self._get_param('TemplateBody')
if self._get_param('UsePreviousTemplate') == "true":
stack_body = self.cloudformation_backend.get_stack(
stack_name).template
elif template_url:
elif not stack_body and template_url:
stack_body = self._get_stack_from_s3_url(template_url)
else:
stack_body = self._get_param('TemplateBody')
parameters = dict([
(parameter['parameter_key'], parameter['parameter_value'])