Reputation: 16822
Terraform v0.12.x
I created a launch template using Terraforms aws_launch_template resource. I then use the created template to create an AWS spot fleet using the aws_spot_fleet_request resource. Straight-forward enough.
In the AWS console, I can also launch spot fleets using launch templates, and there I have the option to create on-demand instances, as seen in this screen shot
However, I don't see how to do the same using the aws_spot_fleet_request
resouce. So though I successfully create the spot fleet, I don't see any on-demand instances created, they're all spot instances. What's the trick to add on-demand instances to my fleet?
Upvotes: 1
Views: 602
Reputation: 239005
aws_spot_fleet_request
does not support spot fleets with spot and on-demand instances. Thus, aws_spot_fleet_request
is for a spot fleet containing only spot instance.
However, there is already a PR made to add this functionality:
Upvotes: 1