Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow existing role when creating new AutoScalingGroup #1701

Closed
fisherpro opened this issue Feb 7, 2019 · 1 comment · Fixed by #1727
Closed

Allow existing role when creating new AutoScalingGroup #1701

fisherpro opened this issue Feb 7, 2019 · 1 comment · Fixed by #1727
Assignees
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.

Comments

@fisherpro
Copy link

fisherpro commented Feb 7, 2019

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:

  1. Add the following property to AutoScalingGroupProps
    role?: iam.IRole;

  2. Add conditional to this.role = ... in AutoScalingGroup (auto-scaling-group.ts)
    this.role = props.role || new iam.Role(this, ...

@eladb
Copy link
Contributor

eladb commented Feb 11, 2019

Thanks for raising this. I think a role property to ASG makes sense

@eladb eladb added feature-request A feature should be added or improved. @aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling labels Feb 11, 2019
eladb pushed a commit that referenced this issue Feb 11, 2019
Allow specifying an IAM role (`IRole`) when defining an AutoScalingGroup. This allows
either passing a role created in the same stack or passing in an imported role.

Fixes #1701
@eladb eladb self-assigned this Feb 11, 2019
@fulghum fulghum added the effort/small Small work item – less than a day of effort label Feb 11, 2019
eladb pushed a commit that referenced this issue Feb 11, 2019
Allow specifying an IAM role (`IRole`) when defining an AutoScalingGroup. This allows
either passing a role created in the same stack or passing in an imported role.

Fixes #1701
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants