Skip to content

Instantly share code, notes, and snippets.

@likwid
Created April 10, 2020 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save likwid/c98d0c36a1bd50e9943ea27da72cd2c5 to your computer and use it in GitHub Desktop.
Save likwid/c98d0c36a1bd50e9943ea27da72cd2c5 to your computer and use it in GitHub Desktop.
ec2-fleet terraform example
resource aws_ec2_fleet buildkite_agents {
launch_template_config {
launch_template_specification {
launch_template_id = aws_launch_template.current.id
version = aws_launch_template.current.latest_version
}
override {
instance_type = "c5.4xlarge"
max_price = "0.4"
}
}
spot_options {
allocation_strategy = "lowestPrice"
}
target_capacity_specification {
default_target_capacity_type = "spot"
spot_target_capacity = 3
total_target_capacity = 3
}
terminate_instances_with_expiration = "true"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment