It would be nice to add this to terraform:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html
AWS sucks at keep track of such spot-fleet requests, with terraform you can easily tag them internally.
+1
+1
Spotfleet requests are super repetitive. It would be very awesome if I defined a instance's config once, and all the instance types and subnets/az I want it in, and have the config generated.
Spotfleet requests can only be created and destroyed as well, meaning that this would help dramatically with updates.
+1
Don't get your hopes up right away, but I've started working on this here:
https://github.com/hashicorp/terraform/compare/master...Yelp:spot-fleet_resource
I plan on implementing this, dog-fooding this at Yelp to ensure it works as intended, and then doing a PR.
Thanks, just wanted to note it does work, but had a few issues where I couldn't setup iam_instance_profile, or vpc_security_group_ids
Also the time-limit, should be optional, not required.
It also needs options to on-cancel to terminate or not to.
Also part of this should be able to create the aws_iam_role/aws_iam_role_policy for spot_fleet, and kinda wait until the instance status returns terminated if terminated is enabled on cancel, to finally remove the aws_iam_role/aws_iam_role_policy for it.
@JoeOrtiz ... should it? Wouldn't a user use a normal TF resource to make iam roles, etc? (do other TF aws resources auto-create iam roles?)
Regardless, if you would like to speed up development on this, please send PRs to:
https://github.com/yelp/terraform/
And when it is in a presentable state I'll put it together for upstream. (Thanks to @keymone it at least converges!)
@solarkennedy how has this been working for you?
I would say "pretty good". I think we've got the major bugs out by now and it has been serving us well for for non-customer facing use cases (just in case).
I'll make a PR soon and start the process of upstreaming the code.
@solarkennedy anything i can help out with? We just got a serious need for spot fleet support :)
PR is coming https://github.com/Yelp/terraform/pull/17
Thanks to @keshavdv
This is awesome, thanks @solarkennedy! Can't wait to take it for a spin.
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
PR is coming https://github.com/Yelp/terraform/pull/17
Thanks to @keshavdv