File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/@aws-cdk/aws-autoscaling/lib Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -348,7 +348,8 @@ export class AutoScalingGroup extends AutoScalingGroupBase implements
348
348
elb . ILoadBalancerTarget ,
349
349
ec2 . IConnectable ,
350
350
elbv2 . IApplicationLoadBalancerTarget ,
351
- elbv2 . INetworkLoadBalancerTarget {
351
+ elbv2 . INetworkLoadBalancerTarget ,
352
+ iam . IGrantable {
352
353
353
354
public static fromAutoScalingGroupName ( scope : Construct , id : string , autoScalingGroupName : string ) : IAutoScalingGroup {
354
355
class Import extends AutoScalingGroupBase {
@@ -378,6 +379,11 @@ export class AutoScalingGroup extends AutoScalingGroupBase implements
378
379
*/
379
380
public readonly role : iam . IRole ;
380
381
382
+ /**
383
+ * The principal to grant permissions to
384
+ */
385
+ public readonly grantPrincipal : iam . IPrincipal ;
386
+
381
387
/**
382
388
* Name of the AutoScalingGroup
383
389
*/
@@ -421,6 +427,8 @@ export class AutoScalingGroup extends AutoScalingGroupBase implements
421
427
assumedBy : new iam . ServicePrincipal ( 'ec2.amazonaws.com' )
422
428
} ) ;
423
429
430
+ this . grantPrincipal = this . role ;
431
+
424
432
const iamProfile = new iam . CfnInstanceProfile ( this , 'InstanceProfile' , {
425
433
roles : [ this . role . roleName ]
426
434
} ) ;
You can’t perform that action at this time.
0 commit comments