-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Add support for launch templates to aws_spot_fleet_request #4267
Comments
I'm working on supporting launch templates in instance and asg resources. Spot fleet request support looks similar so I might as well work on it. PR should a arrive somewhere next week. |
@gordonbondon Working on that maybe? |
Thank you @gordonbondon this would be awesome! |
Looks like someone got to it before me #4866 |
Oh sorry @gordonbondon, hadn't seen this issue and that you were working on it. If anyone has any ideas on how to get the testing assertions against the random-ish numbers in the state working (see WIP section of #4866) I can finish up the PR. |
Would you be down for having the overrides being a list of maps? |
This is already implemented in #4866 and is exactly how I use it @Jamie-BitFlight
This actually works with any resource attr that isn't set as "required" when multiple map blocks can be passed in:
Such structures always allow a list of maps to be passed in as long as they're not set to required. If you're interested in getting the completed PR merged (it's finished now as long as no changes need to be made after review) please thumbs up or comment it or something so that the team can gauge interest. |
The Launch Template support in EC2 Fleets seems to work really well. Is that direction AWS seems to be going with provisioning like this (instead of spot fleets?) It sounds like Auto Scaling isn't working for those groups yet. Either way I think that syntax would work well in for |
Is there are update or workaround to have it working with Terraform? I have searched a lot on the web and seems that the only solution is to keep with the "launch_specification" and we would prefer to use the "launch_template" as it suits better with our use case. |
As an update, since AWS added support for launch templates and spot request pools to ASGs, we've switched to using these instead, as we get all the extra benefits of ASGs over spot fleet requests and it can all be done in Terraform too. |
@WheresWardy , how did you do it in terraform? |
@deitch We created an |
Nicely done @WheresWardy . Thanks! |
@gordonbondon when will you add support for using launch templates in a |
@gordonbondon thanks. I think we need to update the documentation of the |
Just fyi, this isn't actually done, just that PR #4866 had been opened. It seems to be awaiting changes and another review. |
@WheresWardy so what would be the difference between ASG and Spot Fleet in your scenario? I believe Spot Fleet is that only one that can on-demand instances mixed with spot ones correct? |
@scalp42 This issue predates the ability to have mixed-instance-type spot fleets in ASGs, but since this is now supported in ASGs (and ASGs have support for launch templates in terraform) we've since switched to using ASGs, so this issue doesn't affect us anymore. They also support mixing on-demand with spot now too. |
addressed in #12732 |
Support for this functionality has been merged and will release with version 2.60.0 of the Terraform AWS Provider, later this week. Thanks to @lossanarch and @DrFaust92 for the implementation. 👍 |
This has been released in version 2.60.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Now that support for EC2 launch templates has been added to Terraform via #2927, I'd like to request support for this be added to the
aws_spot_fleet_request
resource.At the moment, the only way to add multiple variations of instances to spot fleet requests is with individual
launch_specification
parameters. This involves a lot of duplication ofaws_instance
parameters that are the same when you may just want to change the instance type across multiple launch specifications for example.Launch templates will add the ability to supply the majority of consistent parameters via the template.
Terraform Version
Affected Resource(s)
Please list the resources as a list, for example:
The text was updated successfully, but these errors were encountered: