EC2 Fleet gives the ability to create fleets that are composed of a combination of EC2 On-Demand, Reserved, and Spot Instances with a single API call.
resource "aws_launch_template" "foo" {
...
}
resource "aws_ec2_fleet" "foo" {
request_type = "maintain"
launch_template = {
id = "${aws_launch_template.foo.id}"
version = "$$Latest"
}
launch_template_overrides {
instance_type = "m4.16xlarge"
weighted_capacity = 64
}
launch_template_overrides {
instance_type = "m5.24xlarge"
weighted_capacity = 96
}
total_target_capacity = 2880
on_demand_target_capacity = 960
spot_target_capacity = 1920
default_target_capacity_type = "spot"
}
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html
Anyone going to have a serious go at this in the near future?
I'll try to get an initial pull request up today. ๐
Initial pull request: #5960 -- implements most of the functionality, rest of which I can finish up on Monday hopefully.
The new aws_ec2_fleet
resource has been merged and will release with version 1.39.0 of the AWS provider, likely later today. ๐
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!
Most helpful comment
The new
aws_ec2_fleet
resource has been merged and will release with version 1.39.0 of the AWS provider, likely later today. ๐