WIP: add iam roles to redshift

This commit is contained in:
andrew 2018-02-22 14:58:19 -05:00
commit 6ab416724a
3 changed files with 32 additions and 2 deletions

View file

@ -294,6 +294,24 @@ def test_create_cluster_with_vpc_security_groups_boto3():
list(group_ids).should.equal([security_group.id])
@mock_redshift
def test_create_cluster_with_iam_roles():
iam_role = 'arn:aws:iam:::role/my-iam-role'
client = boto3.client('redshift', region_name='us-east-1')
cluster_id = 'my_cluster'
client.create_cluster(
ClusterIdentifier=cluster_id,
NodeType="dw.hs1.xlarge",
MasterUsername="username",
MasterUserPassword="password",
IamRoles=[iam_role],
)
response = client.describe_clusters(ClusterIdentifier=cluster_id)
cluster = response['Clusters'][0]
iam_roles = [role['IamRoleArn'] for role in cluster['IamRoles']]
list(iam_roles).should.equal([iam_role.arn])
@mock_redshift_deprecated
def test_create_cluster_with_parameter_group():
conn = boto.connect_redshift()