instance-scheduler-on-aws icon indicating copy to clipboard operation
instance-scheduler-on-aws copied to clipboard

Instance Scheduler - Role Name Randomised

Open Sysfcuk opened this issue 3 years ago • 1 comments

Hello,

First off, thank you for maintaining this solution, it is invaluable in our environment

We do have an issue that has caught us out a few times, if we remove and re-add the instance scheduler it re-creates roles with a random ID. This is an issue for our custom KMS keys where we have manually specified permissions for this role. Without these KMS permissions in place the instances will not start.

It would be great to have the option of manually enforcing the role name so we can ensure it remains the same when we re-launch the solution.

Many Thanks,

Sysfcuk avatar Jul 22 '22 11:07 Sysfcuk

Thanks for your feedback. The role names are randomized by design to allow for multiple deployments of the solution in the same accounts. Having static role names would break this functionality and will not allow customers to support multiple deployments.

deolank avatar Aug 01 '22 17:08 deolank

Easiest fix to avoid collision and keep static roles would be "MyRoleName-${AWS::StackName}-${AWS::Region}"

What you could do is add a parameter - MyRoleName - and if it is blank, use a random name. If not blank, use the above.

abjoerne avatar Oct 24 '22 06:10 abjoerne