cloudformation: Support RoleARN for create and update stack (#807)

Signed-off-by: Andrew Harris <andrew.harris@getbraintree.com>
This commit is contained in:
Jesse Szwedko 2017-01-18 19:59:47 -08:00 committed by Steve Pulec
commit e1260bca06
3 changed files with 30 additions and 5 deletions

View file

@ -104,6 +104,19 @@ def test_create_stack_with_notification_arn():
'arn:aws:sns:us-east-1:123456789012:fake-queue')
@mock_cloudformation
def test_create_stack_with_role_arn():
cf = boto3.resource('cloudformation', region_name='us-east-1')
cf.create_stack(
StackName="test_stack_with_notifications",
TemplateBody=dummy_template_json,
RoleARN='arn:aws:iam::123456789012:role/moto',
)
stack = list(cf.stacks.all())[0]
stack.role_arn.should.equal('arn:aws:iam::123456789012:role/moto')
@mock_cloudformation
@mock_s3
def test_create_stack_from_s3_url():
@ -240,6 +253,7 @@ def test_describe_updated_stack():
cf_conn.update_stack(
StackName="test_stack",
RoleARN='arn:aws:iam::123456789012:role/moto',
TemplateBody=dummy_update_template_json)
stack = cf_conn.describe_stacks(StackName="test_stack")['Stacks'][0]
@ -248,6 +262,7 @@ def test_describe_updated_stack():
stack_by_id['StackId'].should.equal(stack['StackId'])
stack_by_id['StackName'].should.equal("test_stack")
stack_by_id['StackStatus'].should.equal("UPDATE_COMPLETE")
stack_by_id['RoleARN'].should.equal('arn:aws:iam::123456789012:role/moto')
@mock_cloudformation