make cloudformation update stack use parameters provided (#843)

This commit is contained in:
David Wilcox 2017-03-05 14:48:51 +11:00 committed by Steve Pulec
commit a9554924df
4 changed files with 49 additions and 5 deletions

View file

@ -444,6 +444,42 @@ def test_update_stack():
})
@mock_cloudformation
def test_update_stack_with_parameters():
dummy_template = {
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Stack",
"Resources": {
"VPC": {
"Properties": {
"CidrBlock": {"Ref": "Bar"}
},
"Type": "AWS::EC2::VPC"
}
},
"Parameters": {
"Bar": {
"Type": "String"
}
}
}
dummy_template_json = json.dumps(dummy_template)
conn = boto.connect_cloudformation()
conn.create_stack(
"test_stack",
template_body=dummy_template_json,
parameters=[("Bar", "192.168.0.0/16")]
)
conn.update_stack(
"test_stack",
template_body=dummy_template_json,
parameters=[("Bar", "192.168.0.1/16")]
)
stack = conn.describe_stacks()[0]
assert stack.parameters[0].value == "192.168.0.1/16"
@mock_cloudformation
def test_update_stack_when_rolled_back():
conn = boto.connect_cloudformation()