Add cloudformation update from s3 support (#1377)
* Fix variable name typo * Make it possible to delete EC2 instances from cloudformation json * Add support for updating a cloudformation stack from an s3 template url
This commit is contained in:
parent
52ce8d378f
commit
92f5f7b263
4 changed files with 73 additions and 22 deletions
|
|
@ -161,11 +161,15 @@ class CloudFormationResponse(BaseResponse):
|
|||
def update_stack(self):
|
||||
stack_name = self._get_param('StackName')
|
||||
role_arn = self._get_param('RoleARN')
|
||||
template_url = self._get_param('TemplateURL')
|
||||
if self._get_param('UsePreviousTemplate') == "true":
|
||||
stack_body = self.cloudformation_backend.get_stack(
|
||||
stack_name).template
|
||||
elif 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'])
|
||||
for parameter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue