pulumi_wasm_providers_aws_mini::ec2

Module fleet

source
Expand description

Provides a resource to manage EC2 Fleets.

§Example Usage

use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
    let example = fleet::create(
        "example",
        FleetArgs::builder()
            .launch_template_configs(
                vec![
                    FleetLaunchTemplateConfig::builder()
                    .launchTemplateSpecification(FleetLaunchTemplateConfigLaunchTemplateSpecification::builder()
                    .launchTemplateId("${exampleAwsLaunchTemplate.id}")
                    .version("${exampleAwsLaunchTemplate.latestVersion}").build_struct())
                    .build_struct(),
                ],
            )
            .target_capacity_specification(
                FleetTargetCapacitySpecification::builder()
                    .defaultTargetCapacityType("spot")
                    .totalTargetCapacity(5)
                    .build_struct(),
            )
            .build_struct(),
    );
}

§Import

Using pulumi import, import aws_ec2_fleet using the Fleet identifier. For example:

$ pulumi import aws:ec2/fleet:Fleet example fleet-b9b55d27-c5fc-41ac-a6f3-48fcc91f080c

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments