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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws_spot_fleet_request: add support for launch-before-terminate rebalance strategy #22634
Comments
@partamonov have you tried using the "launch-before-terminate" value for the The documentation may need to need to be updated, but I believe this is already supported as the supported strategies are originating from the Golang SDK which has been updated with this value. |
@sjonpaulbrown, yes I tried. It fails with missing mandatory timeout field, as with launch-before-terminate timeout is required field. My idea was exactly to try it, as I thought that default 120 seconds might work for me, but that field is not present in terraform input data, so request fails type SpotCapacityRebalance struct {
// The replacement strategy to use. Only available for fleets of type maintain.
//
// launch - Spot Fleet launches a new replacement Spot Instance when a rebalance
// notification is emitted for an existing Spot Instance in the fleet. Spot
// Fleet does not terminate the instances that receive a rebalance notification.
// You can terminate the old instances, or you can leave them running. You are
// charged for all instances while they are running.
//
// launch-before-terminate - Spot Fleet launches a new replacement Spot Instance
// when a rebalance notification is emitted for an existing Spot Instance in
// the fleet, and then, after a delay that you specify (in TerminationDelay),
// terminates the instances that received a rebalance notification.
ReplacementStrategy *string `locationName:"replacementStrategy" type:"string" enum:"ReplacementStrategy"`
// The amount of time (in seconds) that Amazon EC2 waits before terminating
// the old Spot Instance after launching a new replacement Spot Instance.
//
// Required when ReplacementStrategy is set to launch-before-terminate.
//
// Not valid when ReplacementStrategy is set to launch.
//
// Valid values: Minimum value of 120 seconds. Maximum value of 7200 seconds.
TerminationDelay *int64 `locationName:"terminationDelay" type:"integer"`
// contains filtered or unexported fields
} |
Ah, that makes sense. So, the |
A spot fleet request with the "launch-before-terminate" replacement_strategy cannot be created using terraform-provider-aws version 4.14.0... |
This is a must have for us. I cannot use Terraform for Spot Fleet Requests as we need launch-before-terminate. I hate using Cloudformation, so would prefer if we can get some traction on this please. |
Community Note
Description
Now only supported type for capacity rebalance is
launch
, but that would be handy to supportlaunch-before-terminate
New or Affected Resource(s)
Potential Terraform Configuration
Link to AWS documentation
The text was updated successfully, but these errors were encountered: