Terraform-provider-aws: EC2 Fleet Resource

Created on 18 May 2018  ยท  5Comments  ยท  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a ๐Ÿ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

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.

https://aws.amazon.com/blogs/aws/ec2-fleet-manage-thousands-of-on-demand-and-spot-instances-with-one-request/

New or Affected Resource(s)

  • aws_ec2_fleet

Potential Terraform Configuration

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"
}

References

  • https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html

  • new-resource servicec2

    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. ๐Ÿ‘

    All 5 comments

    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!

    Was this page helpful?
    0 / 5 - 0 ratings