Fleet Args
Provides a resource to manage EC2 Fleets.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Fleet;
import com.pulumi.aws.ec2.FleetArgs;
import com.pulumi.aws.ec2.inputs.FleetLaunchTemplateConfigArgs;
import com.pulumi.aws.ec2.inputs.FleetLaunchTemplateConfigLaunchTemplateSpecificationArgs;
import com.pulumi.aws.ec2.inputs.FleetTargetCapacitySpecificationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Fleet("example", FleetArgs.builder()
.launchTemplateConfig(FleetLaunchTemplateConfigArgs.builder()
.launchTemplateSpecification(FleetLaunchTemplateConfigLaunchTemplateSpecificationArgs.builder()
.launchTemplateId(aws_launch_template.example().id())
.version(aws_launch_template.example().latest_version())
.build())
.build())
.targetCapacitySpecification(FleetTargetCapacitySpecificationArgs.builder()
.defaultTargetCapacityType("spot")
.totalTargetCapacity(5)
.build())
.build());
}
}
Import
aws_ec2_fleet
can be imported by using the Fleet identifier, e.g.,
$ pulumi import aws:ec2/fleet:Fleet example fleet-b9b55d27-c5fc-41ac-a6f3-48fcc91f080c
Constructors
Properties
Whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2. Valid values: no-termination
, termination
. Defaults to termination
. Supported only for fleets of type maintain
.
Information about the instances that were launched by the fleet. Available only when type
is set to instant
.
The state of the EC2 Fleet.
The number of units fulfilled by this request compared to the set target capacity.
The number of units fulfilled by this request compared to the set target On-Demand capacity.
Nested argument containing EC2 Launch Template configurations. Defined below.
Nested argument containing On-Demand configurations. Defined below.
Whether EC2 Fleet should replace unhealthy instances. Defaults to false
. Supported only for fleets of type maintain
.
Nested argument containing Spot configurations. Defined below.
Nested argument containing target capacity configurations. Defined below.
Whether to terminate instances for an EC2 Fleet if it is deleted successfully. Defaults to false
.
Whether running instances should be terminated when the EC2 Fleet expires. Defaults to false
.
The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.