Allow CloudFormation stack tags to be updated
Limitations: * does not update the tags of the resources in the stack. that can be implemented later. * does not support the supposed feature of clearing tags by passing an empty value that boto3 mentions in its documentation. I could not find anything in the request body to indicate when an empty value was passed.
This commit is contained in:
parent
a6e762340d
commit
6f4cb512ac
4 changed files with 43 additions and 6 deletions
|
|
@ -424,7 +424,7 @@ def test_update_stack():
|
|||
|
||||
|
||||
@mock_cloudformation_deprecated
|
||||
def test_update_stack():
|
||||
def test_update_stack_with_previous_template():
|
||||
conn = boto.connect_cloudformation()
|
||||
conn.create_stack(
|
||||
"test_stack",
|
||||
|
|
@ -482,6 +482,26 @@ def test_update_stack_with_parameters():
|
|||
assert stack.parameters[0].value == "192.168.0.1/16"
|
||||
|
||||
|
||||
@mock_cloudformation_deprecated
|
||||
def test_update_stack_replace_tags():
|
||||
conn = boto.connect_cloudformation()
|
||||
conn.create_stack(
|
||||
"test_stack",
|
||||
template_body=dummy_template_json,
|
||||
tags={"foo": "bar"},
|
||||
)
|
||||
conn.update_stack(
|
||||
"test_stack",
|
||||
template_body=dummy_template_json,
|
||||
tags={"foo": "baz"},
|
||||
)
|
||||
|
||||
stack = conn.describe_stacks()[0]
|
||||
stack.stack_status.should.equal("UPDATE_COMPLETE")
|
||||
# since there is one tag it doesn't come out as a list
|
||||
dict(stack.tags).should.equal({"foo": "baz"})
|
||||
|
||||
|
||||
@mock_cloudformation_deprecated
|
||||
def test_update_stack_when_rolled_back():
|
||||
conn = boto.connect_cloudformation()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue