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 for custom IAM Role and clean-up of the generated role #18

Open
bwagner5 opened this issue Jun 22, 2022 · 2 comments
Open

Allow for custom IAM Role and clean-up of the generated role #18

bwagner5 opened this issue Jun 22, 2022 · 2 comments

Comments

@bwagner5
Copy link
Contributor

Describe the feature

  • Allow for the ec2-spot-interrupter to use a user specific IAM role rather than the default generated one.
  • Allow for the ec2-spot-interrupter to delete the generated IAM role.

To Reproduce
Steps to demonstrate the desired behavior:

## Generates an IAM role for FIS to use, but there is no way to delete the role from the CLI
## You would need to manually find the role to delete it.
$ ec2-spot-interrupter --instance-ids i-012335
$ ec2-spot-interrupter --role-arn arn:aws::myrole --instance-ids i-012345

Additional context
Add any other context about the problem here.

@brycahta
Copy link
Contributor

I'm thinking we accomplish this by extending --clean flag to remove all underlying resources/infra. This would also provide a way to persist the role. Thoughts/prayers?

@bwagner5
Copy link
Contributor Author

hmm maybe... although --clean is probably best if always set to true, which is the default. I'm not sure if there would be any problems deleting the IAM role every time? But if there's no propagation delays, then that's probably the best thing to do for simplicity.

I think a good test is to implement IAM role deletion on --clean and then try executing the tool really fast. The creation would also need to be modified a bit to put a UUID or something so that it could support multiple invocations at the same time (wouldn't want the IAM role to be deleted by one process of ec2-spot-interrupter when another one is trying to use it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants