File tree 2 files changed +5
-4
lines changed
packages/@aws-cdk/aws-redshift
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -307,8 +307,9 @@ export interface ClusterProps {
307
307
308
308
/**
309
309
* A single AWS Identity and Access Management (IAM) role to be used as the default role for the cluster.
310
+ * The default role must be included in the roles list.
310
311
*
311
- * @default - No default role is attached to the cluster.
312
+ * @default - No default role is specified for the cluster.
312
313
*/
313
314
readonly defaultRole ?: iam . IRole ;
314
315
@@ -681,7 +682,7 @@ export class Cluster extends ClusterBase {
681
682
}
682
683
683
684
/**
684
- * Adds default IAM role to cluster
685
+ * Adds default IAM role to cluster. The default IAM role must be already associated to the cluster to be added as the default role.
685
686
*
686
687
* @param defaultIamRole the IAM role to be set as the default role
687
688
*/
@@ -698,7 +699,7 @@ export class Cluster extends ClusterBase {
698
699
}
699
700
}
700
701
if ( ! roleAlreadyOnCluster ) {
701
- throw new Error ( 'Default role must be included in role list .' ) ;
702
+ throw new Error ( 'Default role must be associated to the Redshift cluster to be set as the default role .' ) ;
702
703
}
703
704
704
705
// On UPDATE or CREATE define the default IAM role. On DELETE, remove the default IAM role
Original file line number Diff line number Diff line change @@ -644,7 +644,7 @@ describe('default IAM role', () => {
644
644
645
645
expect ( ( ) => {
646
646
cluster . addDefaultIamRole ( defaultRole1 ) ;
647
- } ) . toThrow ( / D e f a u l t r o l e m u s t b e i n c l u d e d i n r o l e l i s t ./ ) ;
647
+ } ) . toThrow ( / D e f a u l t r o l e m u s t b e a s s o c i a t e d t o t h e R e d s h i f t c l u s t e r t o b e s e t a s t h e d e f a u l t r o l e ./ ) ;
648
648
} ) ;
649
649
} ) ;
650
650
You can’t perform that action at this time.
0 commit comments