Allow existing role when creating new AutoScalingGroup #1701
Labels
@aws-cdk/aws-autoscaling
Related to Amazon EC2 Auto Scaling
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
My company does not allow the creation of roles except by our InfoSec department. Because of this we need to separate all cloudformation into parts. One that the AWS admins can run which includes only roles, and the other for developers.
Issue #205 has a good discussion regarding whether to allow users to bring their own roles when defining new resources. #205 was eventually closed with a fix to allow a preexisting role to be passed in when creating new lambdas.
Does AutoScalingGroup allow a role to be passed in somehow? If not, the same type of fix should be made for AutoScalingGroupProps which currently does not accept a role. Perhaps the fix should look like this:
Add the following property to AutoScalingGroupProps
role?: iam.IRole;
Add conditional to
this.role = ...
in AutoScalingGroup (auto-scaling-group.ts)this.role = props.role || new iam.Role(this, ...
The text was updated successfully, but these errors were encountered: