1. Packages
  2. AWS Classic
  3. API Docs
  4. ec2
  5. SpotInstanceRequest

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

aws.ec2.SpotInstanceRequest

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

    Provides an EC2 Spot Instance Request resource. This allows instances to be requested on the spot market.

    By default this provider creates Spot Instance Requests with a persistent type, which means that for the duration of their lifetime, AWS will launch an instance with the configured details if and when the spot market will accept the requested price.

    On destruction, this provider will make an attempt to terminate the associated Spot Instance if there is one present.

    Spot Instances requests with a one-time type will close the spot request when the instance is terminated either by the request being below the current spot price availability or by a user.

    NOTE: Because their behavior depends on the live status of the spot market, Spot Instance Requests have a unique lifecycle that makes them behave differently than other resources. Most importantly: there is no guarantee that a Spot Instance exists to fulfill the request at any given point in time. See the AWS Spot Instance documentation for more information.

    **NOTE AWS strongly discourages the use of the legacy APIs called by this resource. We recommend using the EC2 Instance resource with instance_market_options instead.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    // Request a spot instance at $0.03
    const cheapWorker = new aws.ec2.SpotInstanceRequest("cheap_worker", {
        ami: "ami-1234",
        spotPrice: "0.03",
        instanceType: "c4.xlarge",
        tags: {
            Name: "CheapWorker",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    # Request a spot instance at $0.03
    cheap_worker = aws.ec2.SpotInstanceRequest("cheap_worker",
        ami="ami-1234",
        spot_price="0.03",
        instance_type="c4.xlarge",
        tags={
            "Name": "CheapWorker",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Request a spot instance at $0.03
    		_, err := ec2.NewSpotInstanceRequest(ctx, "cheap_worker", &ec2.SpotInstanceRequestArgs{
    			Ami:          pulumi.String("ami-1234"),
    			SpotPrice:    pulumi.String("0.03"),
    			InstanceType: pulumi.String("c4.xlarge"),
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("CheapWorker"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        // Request a spot instance at $0.03
        var cheapWorker = new Aws.Ec2.SpotInstanceRequest("cheap_worker", new()
        {
            Ami = "ami-1234",
            SpotPrice = "0.03",
            InstanceType = "c4.xlarge",
            Tags = 
            {
                { "Name", "CheapWorker" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2.SpotInstanceRequest;
    import com.pulumi.aws.ec2.SpotInstanceRequestArgs;
    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 cheapWorker = new SpotInstanceRequest("cheapWorker", SpotInstanceRequestArgs.builder()        
                .ami("ami-1234")
                .spotPrice("0.03")
                .instanceType("c4.xlarge")
                .tags(Map.of("Name", "CheapWorker"))
                .build());
    
        }
    }
    
    resources:
      # Request a spot instance at $0.03
      cheapWorker:
        type: aws:ec2:SpotInstanceRequest
        name: cheap_worker
        properties:
          ami: ami-1234
          spotPrice: '0.03'
          instanceType: c4.xlarge
          tags:
            Name: CheapWorker
    

    Create SpotInstanceRequest Resource

    new SpotInstanceRequest(name: string, args?: SpotInstanceRequestArgs, opts?: CustomResourceOptions);
    @overload
    def SpotInstanceRequest(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            ami: Optional[str] = None,
                            associate_public_ip_address: Optional[bool] = None,
                            availability_zone: Optional[str] = None,
                            block_duration_minutes: Optional[int] = None,
                            capacity_reservation_specification: Optional[SpotInstanceRequestCapacityReservationSpecificationArgs] = None,
                            cpu_core_count: Optional[int] = None,
                            cpu_options: Optional[SpotInstanceRequestCpuOptionsArgs] = None,
                            cpu_threads_per_core: Optional[int] = None,
                            credit_specification: Optional[SpotInstanceRequestCreditSpecificationArgs] = None,
                            disable_api_stop: Optional[bool] = None,
                            disable_api_termination: Optional[bool] = None,
                            ebs_block_devices: Optional[Sequence[SpotInstanceRequestEbsBlockDeviceArgs]] = None,
                            ebs_optimized: Optional[bool] = None,
                            enclave_options: Optional[SpotInstanceRequestEnclaveOptionsArgs] = None,
                            ephemeral_block_devices: Optional[Sequence[SpotInstanceRequestEphemeralBlockDeviceArgs]] = None,
                            get_password_data: Optional[bool] = None,
                            hibernation: Optional[bool] = None,
                            host_id: Optional[str] = None,
                            host_resource_group_arn: Optional[str] = None,
                            iam_instance_profile: Optional[str] = None,
                            instance_initiated_shutdown_behavior: Optional[str] = None,
                            instance_interruption_behavior: Optional[str] = None,
                            instance_type: Optional[str] = None,
                            ipv6_address_count: Optional[int] = None,
                            ipv6_addresses: Optional[Sequence[str]] = None,
                            key_name: Optional[str] = None,
                            launch_group: Optional[str] = None,
                            launch_template: Optional[SpotInstanceRequestLaunchTemplateArgs] = None,
                            maintenance_options: Optional[SpotInstanceRequestMaintenanceOptionsArgs] = None,
                            metadata_options: Optional[SpotInstanceRequestMetadataOptionsArgs] = None,
                            monitoring: Optional[bool] = None,
                            network_interfaces: Optional[Sequence[SpotInstanceRequestNetworkInterfaceArgs]] = None,
                            placement_group: Optional[str] = None,
                            placement_partition_number: Optional[int] = None,
                            private_dns_name_options: Optional[SpotInstanceRequestPrivateDnsNameOptionsArgs] = None,
                            private_ip: Optional[str] = None,
                            root_block_device: Optional[SpotInstanceRequestRootBlockDeviceArgs] = None,
                            secondary_private_ips: Optional[Sequence[str]] = None,
                            security_groups: Optional[Sequence[str]] = None,
                            source_dest_check: Optional[bool] = None,
                            spot_price: Optional[str] = None,
                            spot_type: Optional[str] = None,
                            subnet_id: Optional[str] = None,
                            tags: Optional[Mapping[str, str]] = None,
                            tenancy: Optional[str] = None,
                            user_data: Optional[str] = None,
                            user_data_base64: Optional[str] = None,
                            user_data_replace_on_change: Optional[bool] = None,
                            valid_from: Optional[str] = None,
                            valid_until: Optional[str] = None,
                            volume_tags: Optional[Mapping[str, str]] = None,
                            vpc_security_group_ids: Optional[Sequence[str]] = None,
                            wait_for_fulfillment: Optional[bool] = None)
    @overload
    def SpotInstanceRequest(resource_name: str,
                            args: Optional[SpotInstanceRequestArgs] = None,
                            opts: Optional[ResourceOptions] = None)
    func NewSpotInstanceRequest(ctx *Context, name string, args *SpotInstanceRequestArgs, opts ...ResourceOption) (*SpotInstanceRequest, error)
    public SpotInstanceRequest(string name, SpotInstanceRequestArgs? args = null, CustomResourceOptions? opts = null)
    public SpotInstanceRequest(String name, SpotInstanceRequestArgs args)
    public SpotInstanceRequest(String name, SpotInstanceRequestArgs args, CustomResourceOptions options)
    
    type: aws:ec2:SpotInstanceRequest
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SpotInstanceRequestArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SpotInstanceRequestArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SpotInstanceRequestArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SpotInstanceRequestArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SpotInstanceRequestArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SpotInstanceRequest Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SpotInstanceRequest resource accepts the following input properties:

    Ami string
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    AssociatePublicIpAddress bool
    Whether to associate a public IP address with an instance in a VPC.
    AvailabilityZone string
    AZ to start the instance in.
    BlockDurationMinutes int
    The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
    CapacityReservationSpecification SpotInstanceRequestCapacityReservationSpecification

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    CpuCoreCount int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated:use 'cpu_options' argument instead

    CpuOptions SpotInstanceRequestCpuOptions
    The CPU options for the instance. See CPU Options below for more details.
    CpuThreadsPerCore int
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated:use 'cpu_options' argument instead

    CreditSpecification SpotInstanceRequestCreditSpecification
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    DisableApiStop bool
    If true, enables EC2 Instance Stop Protection.
    DisableApiTermination bool
    If true, enables EC2 Instance Termination Protection.
    EbsBlockDevices List<SpotInstanceRequestEbsBlockDevice>
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    EbsOptimized bool
    If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.
    EnclaveOptions SpotInstanceRequestEnclaveOptions
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    EphemeralBlockDevices List<SpotInstanceRequestEphemeralBlockDevice>
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    GetPasswordData bool
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    Hibernation bool
    If true, the launched EC2 instance will support hibernation.
    HostId string
    ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
    HostResourceGroupArn string
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    IamInstanceProfile string
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    InstanceInitiatedShutdownBehavior string
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    InstanceInterruptionBehavior string
    Indicates Spot instance behavior when it is interrupted. Valid values are terminate, stop, or hibernate. Default value is terminate.
    InstanceType string
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    Ipv6AddressCount int
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    Ipv6Addresses List<string>
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    KeyName string
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    LaunchGroup string
    A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
    LaunchTemplate SpotInstanceRequestLaunchTemplate
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    MaintenanceOptions SpotInstanceRequestMaintenanceOptions
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    MetadataOptions SpotInstanceRequestMetadataOptions
    Customize the metadata options of the instance. See Metadata Options below for more details.
    Monitoring bool
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    NetworkInterfaces List<SpotInstanceRequestNetworkInterface>
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    PlacementGroup string
    Placement Group to start the instance in.
    PlacementPartitionNumber int
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    PrivateDnsNameOptions SpotInstanceRequestPrivateDnsNameOptions
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    PrivateIp string
    Private IP address to associate with the instance in a VPC.
    RootBlockDevice SpotInstanceRequestRootBlockDevice
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    SecondaryPrivateIps List<string>
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    SecurityGroups List<string>

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    SourceDestCheck bool
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    SpotPrice string
    The maximum price to request on the spot market.
    SpotType string
    If set to one-time, after the instance is terminated, the spot request will be closed.
    SubnetId string
    VPC Subnet ID to launch in.
    Tags Dictionary<string, string>
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Tenancy string
    Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. Valid values are default, dedicated, and host.
    UserData string
    User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    UserDataBase64 string
    Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    UserDataReplaceOnChange bool
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    ValidFrom string
    The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
    ValidUntil string
    The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
    VolumeTags Dictionary<string, string>

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    VpcSecurityGroupIds List<string>
    List of security group IDs to associate with.
    WaitForFulfillment bool
    If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
    Ami string
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    AssociatePublicIpAddress bool
    Whether to associate a public IP address with an instance in a VPC.
    AvailabilityZone string
    AZ to start the instance in.
    BlockDurationMinutes int
    The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
    CapacityReservationSpecification SpotInstanceRequestCapacityReservationSpecificationArgs

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    CpuCoreCount int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated:use 'cpu_options' argument instead

    CpuOptions SpotInstanceRequestCpuOptionsArgs
    The CPU options for the instance. See CPU Options below for more details.
    CpuThreadsPerCore int
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated:use 'cpu_options' argument instead

    CreditSpecification SpotInstanceRequestCreditSpecificationArgs
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    DisableApiStop bool
    If true, enables EC2 Instance Stop Protection.
    DisableApiTermination bool
    If true, enables EC2 Instance Termination Protection.
    EbsBlockDevices []SpotInstanceRequestEbsBlockDeviceArgs
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    EbsOptimized bool
    If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.
    EnclaveOptions SpotInstanceRequestEnclaveOptionsArgs
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    EphemeralBlockDevices []SpotInstanceRequestEphemeralBlockDeviceArgs
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    GetPasswordData bool
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    Hibernation bool
    If true, the launched EC2 instance will support hibernation.
    HostId string
    ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
    HostResourceGroupArn string
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    IamInstanceProfile string
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    InstanceInitiatedShutdownBehavior string
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    InstanceInterruptionBehavior string
    Indicates Spot instance behavior when it is interrupted. Valid values are terminate, stop, or hibernate. Default value is terminate.
    InstanceType string
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    Ipv6AddressCount int
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    Ipv6Addresses []string
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    KeyName string
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    LaunchGroup string
    A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
    LaunchTemplate SpotInstanceRequestLaunchTemplateArgs
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    MaintenanceOptions SpotInstanceRequestMaintenanceOptionsArgs
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    MetadataOptions SpotInstanceRequestMetadataOptionsArgs
    Customize the metadata options of the instance. See Metadata Options below for more details.
    Monitoring bool
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    NetworkInterfaces []SpotInstanceRequestNetworkInterfaceArgs
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    PlacementGroup string
    Placement Group to start the instance in.
    PlacementPartitionNumber int
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    PrivateDnsNameOptions SpotInstanceRequestPrivateDnsNameOptionsArgs
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    PrivateIp string
    Private IP address to associate with the instance in a VPC.
    RootBlockDevice SpotInstanceRequestRootBlockDeviceArgs
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    SecondaryPrivateIps []string
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    SecurityGroups []string

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    SourceDestCheck bool
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    SpotPrice string
    The maximum price to request on the spot market.
    SpotType string
    If set to one-time, after the instance is terminated, the spot request will be closed.
    SubnetId string
    VPC Subnet ID to launch in.
    Tags map[string]string
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Tenancy string
    Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. Valid values are default, dedicated, and host.
    UserData string
    User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    UserDataBase64 string
    Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    UserDataReplaceOnChange bool
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    ValidFrom string
    The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
    ValidUntil string
    The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
    VolumeTags map[string]string

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    VpcSecurityGroupIds []string
    List of security group IDs to associate with.
    WaitForFulfillment bool
    If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
    ami String
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    associatePublicIpAddress Boolean
    Whether to associate a public IP address with an instance in a VPC.
    availabilityZone String
    AZ to start the instance in.
    blockDurationMinutes Integer
    The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
    capacityReservationSpecification SpotInstanceRequestCapacityReservationSpecification

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpuCoreCount Integer
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated:use 'cpu_options' argument instead

    cpuOptions SpotInstanceRequestCpuOptions
    The CPU options for the instance. See CPU Options below for more details.
    cpuThreadsPerCore Integer
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated:use 'cpu_options' argument instead

    creditSpecification SpotInstanceRequestCreditSpecification
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disableApiStop Boolean
    If true, enables EC2 Instance Stop Protection.
    disableApiTermination Boolean
    If true, enables EC2 Instance Termination Protection.
    ebsBlockDevices List<SpotInstanceRequestEbsBlockDevice>
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebsOptimized Boolean
    If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.
    enclaveOptions SpotInstanceRequestEnclaveOptions
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeralBlockDevices List<SpotInstanceRequestEphemeralBlockDevice>
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    getPasswordData Boolean
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation Boolean
    If true, the launched EC2 instance will support hibernation.
    hostId String
    ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
    hostResourceGroupArn String
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iamInstanceProfile String
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instanceInitiatedShutdownBehavior String
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instanceInterruptionBehavior String
    Indicates Spot instance behavior when it is interrupted. Valid values are terminate, stop, or hibernate. Default value is terminate.
    instanceType String
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6AddressCount Integer
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6Addresses List<String>
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    keyName String
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launchGroup String
    A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
    launchTemplate SpotInstanceRequestLaunchTemplate
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenanceOptions SpotInstanceRequestMaintenanceOptions
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadataOptions SpotInstanceRequestMetadataOptions
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring Boolean
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    networkInterfaces List<SpotInstanceRequestNetworkInterface>
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    placementGroup String
    Placement Group to start the instance in.
    placementPartitionNumber Integer
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    privateDnsNameOptions SpotInstanceRequestPrivateDnsNameOptions
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    privateIp String
    Private IP address to associate with the instance in a VPC.
    rootBlockDevice SpotInstanceRequestRootBlockDevice
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondaryPrivateIps List<String>
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    securityGroups List<String>

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    sourceDestCheck Boolean
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    spotPrice String
    The maximum price to request on the spot market.
    spotType String
    If set to one-time, after the instance is terminated, the spot request will be closed.
    subnetId String
    VPC Subnet ID to launch in.
    tags Map<String,String>
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tenancy String
    Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. Valid values are default, dedicated, and host.
    userData String
    User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    userDataBase64 String
    Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    userDataReplaceOnChange Boolean
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    validFrom String
    The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
    validUntil String
    The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
    volumeTags Map<String,String>

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpcSecurityGroupIds List<String>
    List of security group IDs to associate with.
    waitForFulfillment Boolean
    If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
    ami string
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    associatePublicIpAddress boolean
    Whether to associate a public IP address with an instance in a VPC.
    availabilityZone string
    AZ to start the instance in.
    blockDurationMinutes number
    The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
    capacityReservationSpecification SpotInstanceRequestCapacityReservationSpecification

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpuCoreCount number
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated:use 'cpu_options' argument instead

    cpuOptions SpotInstanceRequestCpuOptions
    The CPU options for the instance. See CPU Options below for more details.
    cpuThreadsPerCore number
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated:use 'cpu_options' argument instead

    creditSpecification SpotInstanceRequestCreditSpecification
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disableApiStop boolean
    If true, enables EC2 Instance Stop Protection.
    disableApiTermination boolean
    If true, enables EC2 Instance Termination Protection.
    ebsBlockDevices SpotInstanceRequestEbsBlockDevice[]
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebsOptimized boolean
    If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.
    enclaveOptions SpotInstanceRequestEnclaveOptions
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeralBlockDevices SpotInstanceRequestEphemeralBlockDevice[]
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    getPasswordData boolean
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation boolean
    If true, the launched EC2 instance will support hibernation.
    hostId string
    ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
    hostResourceGroupArn string
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iamInstanceProfile string
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instanceInitiatedShutdownBehavior string
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instanceInterruptionBehavior string
    Indicates Spot instance behavior when it is interrupted. Valid values are terminate, stop, or hibernate. Default value is terminate.
    instanceType string
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6AddressCount number
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6Addresses string[]
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    keyName string
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launchGroup string
    A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
    launchTemplate SpotInstanceRequestLaunchTemplate
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenanceOptions SpotInstanceRequestMaintenanceOptions
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadataOptions SpotInstanceRequestMetadataOptions
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring boolean
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    networkInterfaces SpotInstanceRequestNetworkInterface[]
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    placementGroup string
    Placement Group to start the instance in.
    placementPartitionNumber number
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    privateDnsNameOptions SpotInstanceRequestPrivateDnsNameOptions
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    privateIp string
    Private IP address to associate with the instance in a VPC.
    rootBlockDevice SpotInstanceRequestRootBlockDevice
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondaryPrivateIps string[]
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    securityGroups string[]

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    sourceDestCheck boolean
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    spotPrice string
    The maximum price to request on the spot market.
    spotType string
    If set to one-time, after the instance is terminated, the spot request will be closed.
    subnetId string
    VPC Subnet ID to launch in.
    tags {[key: string]: string}
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tenancy string
    Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. Valid values are default, dedicated, and host.
    userData string
    User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    userDataBase64 string
    Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    userDataReplaceOnChange boolean
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    validFrom string
    The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
    validUntil string
    The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
    volumeTags {[key: string]: string}

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpcSecurityGroupIds string[]
    List of security group IDs to associate with.
    waitForFulfillment boolean
    If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
    ami str
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    associate_public_ip_address bool
    Whether to associate a public IP address with an instance in a VPC.
    availability_zone str
    AZ to start the instance in.
    block_duration_minutes int
    The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
    capacity_reservation_specification SpotInstanceRequestCapacityReservationSpecificationArgs

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpu_core_count int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated:use 'cpu_options' argument instead

    cpu_options SpotInstanceRequestCpuOptionsArgs
    The CPU options for the instance. See CPU Options below for more details.
    cpu_threads_per_core int
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated:use 'cpu_options' argument instead

    credit_specification SpotInstanceRequestCreditSpecificationArgs
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disable_api_stop bool
    If true, enables EC2 Instance Stop Protection.
    disable_api_termination bool
    If true, enables EC2 Instance Termination Protection.
    ebs_block_devices Sequence[SpotInstanceRequestEbsBlockDeviceArgs]
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebs_optimized bool
    If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.
    enclave_options SpotInstanceRequestEnclaveOptionsArgs
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeral_block_devices Sequence[SpotInstanceRequestEphemeralBlockDeviceArgs]
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    get_password_data bool
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation bool
    If true, the launched EC2 instance will support hibernation.
    host_id str
    ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
    host_resource_group_arn str
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iam_instance_profile str
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instance_initiated_shutdown_behavior str
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instance_interruption_behavior str
    Indicates Spot instance behavior when it is interrupted. Valid values are terminate, stop, or hibernate. Default value is terminate.
    instance_type str
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6_address_count int
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6_addresses Sequence[str]
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    key_name str
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launch_group str
    A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
    launch_template SpotInstanceRequestLaunchTemplateArgs
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenance_options SpotInstanceRequestMaintenanceOptionsArgs
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadata_options SpotInstanceRequestMetadataOptionsArgs
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring bool
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    network_interfaces Sequence[SpotInstanceRequestNetworkInterfaceArgs]
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    placement_group str
    Placement Group to start the instance in.
    placement_partition_number int
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    private_dns_name_options SpotInstanceRequestPrivateDnsNameOptionsArgs
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    private_ip str
    Private IP address to associate with the instance in a VPC.
    root_block_device SpotInstanceRequestRootBlockDeviceArgs
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondary_private_ips Sequence[str]
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    security_groups Sequence[str]

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    source_dest_check bool
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    spot_price str
    The maximum price to request on the spot market.
    spot_type str
    If set to one-time, after the instance is terminated, the spot request will be closed.
    subnet_id str
    VPC Subnet ID to launch in.
    tags Mapping[str, str]
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tenancy str
    Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. Valid values are default, dedicated, and host.
    user_data str
    User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    user_data_base64 str
    Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    user_data_replace_on_change bool
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    valid_from str
    The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
    valid_until str
    The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
    volume_tags Mapping[str, str]

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpc_security_group_ids Sequence[str]
    List of security group IDs to associate with.
    wait_for_fulfillment bool
    If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
    ami String
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    associatePublicIpAddress Boolean
    Whether to associate a public IP address with an instance in a VPC.
    availabilityZone String
    AZ to start the instance in.
    blockDurationMinutes Number
    The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
    capacityReservationSpecification Property Map

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpuCoreCount Number
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated:use 'cpu_options' argument instead

    cpuOptions Property Map
    The CPU options for the instance. See CPU Options below for more details.
    cpuThreadsPerCore Number
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated:use 'cpu_options' argument instead

    creditSpecification Property Map
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disableApiStop Boolean
    If true, enables EC2 Instance Stop Protection.
    disableApiTermination Boolean
    If true, enables EC2 Instance Termination Protection.
    ebsBlockDevices List<Property Map>
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebsOptimized Boolean
    If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.
    enclaveOptions Property Map
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeralBlockDevices List<Property Map>
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    getPasswordData Boolean
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation Boolean
    If true, the launched EC2 instance will support hibernation.
    hostId String
    ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
    hostResourceGroupArn String
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iamInstanceProfile String
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instanceInitiatedShutdownBehavior String
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instanceInterruptionBehavior String
    Indicates Spot instance behavior when it is interrupted. Valid values are terminate, stop, or hibernate. Default value is terminate.
    instanceType String
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6AddressCount Number
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6Addresses List<String>
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    keyName String
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launchGroup String
    A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
    launchTemplate Property Map
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenanceOptions Property Map
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadataOptions Property Map
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring Boolean
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    networkInterfaces List<Property Map>
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    placementGroup String
    Placement Group to start the instance in.
    placementPartitionNumber Number
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    privateDnsNameOptions Property Map
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    privateIp String
    Private IP address to associate with the instance in a VPC.
    rootBlockDevice Property Map
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondaryPrivateIps List<String>
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    securityGroups List<String>

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    sourceDestCheck Boolean
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    spotPrice String
    The maximum price to request on the spot market.
    spotType String
    If set to one-time, after the instance is terminated, the spot request will be closed.
    subnetId String
    VPC Subnet ID to launch in.
    tags Map<String>
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tenancy String
    Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. Valid values are default, dedicated, and host.
    userData String
    User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    userDataBase64 String
    Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    userDataReplaceOnChange Boolean
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    validFrom String
    The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
    validUntil String
    The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
    volumeTags Map<String>

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpcSecurityGroupIds List<String>
    List of security group IDs to associate with.
    waitForFulfillment Boolean
    If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SpotInstanceRequest resource produces the following output properties:

    Arn string
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceState string
    OutpostArn string
    PasswordData string
    PrimaryNetworkInterfaceId string
    PrivateDns string
    The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC
    PublicDns string
    The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC
    PublicIp string
    The public IP address assigned to the instance, if applicable.
    SpotBidStatus string
    The current bid status of the Spot Instance Request.
    SpotInstanceId string
    The Instance ID (if any) that is currently fulfilling the Spot Instance request.
    SpotRequestState string
    The current request state of the Spot Instance Request.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Arn string
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceState string
    OutpostArn string
    PasswordData string
    PrimaryNetworkInterfaceId string
    PrivateDns string
    The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC
    PublicDns string
    The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC
    PublicIp string
    The public IP address assigned to the instance, if applicable.
    SpotBidStatus string
    The current bid status of the Spot Instance Request.
    SpotInstanceId string
    The Instance ID (if any) that is currently fulfilling the Spot Instance request.
    SpotRequestState string
    The current request state of the Spot Instance Request.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    id String
    The provider-assigned unique ID for this managed resource.
    instanceState String
    outpostArn String
    passwordData String
    primaryNetworkInterfaceId String
    privateDns String
    The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC
    publicDns String
    The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC
    publicIp String
    The public IP address assigned to the instance, if applicable.
    spotBidStatus String
    The current bid status of the Spot Instance Request.
    spotInstanceId String
    The Instance ID (if any) that is currently fulfilling the Spot Instance request.
    spotRequestState String
    The current request state of the Spot Instance Request.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn string
    id string
    The provider-assigned unique ID for this managed resource.
    instanceState string
    outpostArn string
    passwordData string
    primaryNetworkInterfaceId string
    privateDns string
    The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC
    publicDns string
    The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC
    publicIp string
    The public IP address assigned to the instance, if applicable.
    spotBidStatus string
    The current bid status of the Spot Instance Request.
    spotInstanceId string
    The Instance ID (if any) that is currently fulfilling the Spot Instance request.
    spotRequestState string
    The current request state of the Spot Instance Request.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn str
    id str
    The provider-assigned unique ID for this managed resource.
    instance_state str
    outpost_arn str
    password_data str
    primary_network_interface_id str
    private_dns str
    The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC
    public_dns str
    The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC
    public_ip str
    The public IP address assigned to the instance, if applicable.
    spot_bid_status str
    The current bid status of the Spot Instance Request.
    spot_instance_id str
    The Instance ID (if any) that is currently fulfilling the Spot Instance request.
    spot_request_state str
    The current request state of the Spot Instance Request.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    id String
    The provider-assigned unique ID for this managed resource.
    instanceState String
    outpostArn String
    passwordData String
    primaryNetworkInterfaceId String
    privateDns String
    The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC
    publicDns String
    The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC
    publicIp String
    The public IP address assigned to the instance, if applicable.
    spotBidStatus String
    The current bid status of the Spot Instance Request.
    spotInstanceId String
    The Instance ID (if any) that is currently fulfilling the Spot Instance request.
    spotRequestState String
    The current request state of the Spot Instance Request.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Look up Existing SpotInstanceRequest Resource

    Get an existing SpotInstanceRequest resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SpotInstanceRequestState, opts?: CustomResourceOptions): SpotInstanceRequest
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ami: Optional[str] = None,
            arn: Optional[str] = None,
            associate_public_ip_address: Optional[bool] = None,
            availability_zone: Optional[str] = None,
            block_duration_minutes: Optional[int] = None,
            capacity_reservation_specification: Optional[SpotInstanceRequestCapacityReservationSpecificationArgs] = None,
            cpu_core_count: Optional[int] = None,
            cpu_options: Optional[SpotInstanceRequestCpuOptionsArgs] = None,
            cpu_threads_per_core: Optional[int] = None,
            credit_specification: Optional[SpotInstanceRequestCreditSpecificationArgs] = None,
            disable_api_stop: Optional[bool] = None,
            disable_api_termination: Optional[bool] = None,
            ebs_block_devices: Optional[Sequence[SpotInstanceRequestEbsBlockDeviceArgs]] = None,
            ebs_optimized: Optional[bool] = None,
            enclave_options: Optional[SpotInstanceRequestEnclaveOptionsArgs] = None,
            ephemeral_block_devices: Optional[Sequence[SpotInstanceRequestEphemeralBlockDeviceArgs]] = None,
            get_password_data: Optional[bool] = None,
            hibernation: Optional[bool] = None,
            host_id: Optional[str] = None,
            host_resource_group_arn: Optional[str] = None,
            iam_instance_profile: Optional[str] = None,
            instance_initiated_shutdown_behavior: Optional[str] = None,
            instance_interruption_behavior: Optional[str] = None,
            instance_state: Optional[str] = None,
            instance_type: Optional[str] = None,
            ipv6_address_count: Optional[int] = None,
            ipv6_addresses: Optional[Sequence[str]] = None,
            key_name: Optional[str] = None,
            launch_group: Optional[str] = None,
            launch_template: Optional[SpotInstanceRequestLaunchTemplateArgs] = None,
            maintenance_options: Optional[SpotInstanceRequestMaintenanceOptionsArgs] = None,
            metadata_options: Optional[SpotInstanceRequestMetadataOptionsArgs] = None,
            monitoring: Optional[bool] = None,
            network_interfaces: Optional[Sequence[SpotInstanceRequestNetworkInterfaceArgs]] = None,
            outpost_arn: Optional[str] = None,
            password_data: Optional[str] = None,
            placement_group: Optional[str] = None,
            placement_partition_number: Optional[int] = None,
            primary_network_interface_id: Optional[str] = None,
            private_dns: Optional[str] = None,
            private_dns_name_options: Optional[SpotInstanceRequestPrivateDnsNameOptionsArgs] = None,
            private_ip: Optional[str] = None,
            public_dns: Optional[str] = None,
            public_ip: Optional[str] = None,
            root_block_device: Optional[SpotInstanceRequestRootBlockDeviceArgs] = None,
            secondary_private_ips: Optional[Sequence[str]] = None,
            security_groups: Optional[Sequence[str]] = None,
            source_dest_check: Optional[bool] = None,
            spot_bid_status: Optional[str] = None,
            spot_instance_id: Optional[str] = None,
            spot_price: Optional[str] = None,
            spot_request_state: Optional[str] = None,
            spot_type: Optional[str] = None,
            subnet_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            tenancy: Optional[str] = None,
            user_data: Optional[str] = None,
            user_data_base64: Optional[str] = None,
            user_data_replace_on_change: Optional[bool] = None,
            valid_from: Optional[str] = None,
            valid_until: Optional[str] = None,
            volume_tags: Optional[Mapping[str, str]] = None,
            vpc_security_group_ids: Optional[Sequence[str]] = None,
            wait_for_fulfillment: Optional[bool] = None) -> SpotInstanceRequest
    func GetSpotInstanceRequest(ctx *Context, name string, id IDInput, state *SpotInstanceRequestState, opts ...ResourceOption) (*SpotInstanceRequest, error)
    public static SpotInstanceRequest Get(string name, Input<string> id, SpotInstanceRequestState? state, CustomResourceOptions? opts = null)
    public static SpotInstanceRequest get(String name, Output<String> id, SpotInstanceRequestState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Ami string
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    Arn string
    AssociatePublicIpAddress bool
    Whether to associate a public IP address with an instance in a VPC.
    AvailabilityZone string
    AZ to start the instance in.
    BlockDurationMinutes int
    The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
    CapacityReservationSpecification SpotInstanceRequestCapacityReservationSpecification

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    CpuCoreCount int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated:use 'cpu_options' argument instead

    CpuOptions SpotInstanceRequestCpuOptions
    The CPU options for the instance. See CPU Options below for more details.
    CpuThreadsPerCore int
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated:use 'cpu_options' argument instead

    CreditSpecification SpotInstanceRequestCreditSpecification
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    DisableApiStop bool
    If true, enables EC2 Instance Stop Protection.
    DisableApiTermination bool
    If true, enables EC2 Instance Termination Protection.
    EbsBlockDevices List<SpotInstanceRequestEbsBlockDevice>
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    EbsOptimized bool
    If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.
    EnclaveOptions SpotInstanceRequestEnclaveOptions
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    EphemeralBlockDevices List<SpotInstanceRequestEphemeralBlockDevice>
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    GetPasswordData bool
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    Hibernation bool
    If true, the launched EC2 instance will support hibernation.
    HostId string
    ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
    HostResourceGroupArn string
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    IamInstanceProfile string
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    InstanceInitiatedShutdownBehavior string
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    InstanceInterruptionBehavior string
    Indicates Spot instance behavior when it is interrupted. Valid values are terminate, stop, or hibernate. Default value is terminate.
    InstanceState string
    InstanceType string
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    Ipv6AddressCount int
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    Ipv6Addresses List<string>
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    KeyName string
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    LaunchGroup string
    A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
    LaunchTemplate SpotInstanceRequestLaunchTemplate
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    MaintenanceOptions SpotInstanceRequestMaintenanceOptions
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    MetadataOptions SpotInstanceRequestMetadataOptions
    Customize the metadata options of the instance. See Metadata Options below for more details.
    Monitoring bool
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    NetworkInterfaces List<SpotInstanceRequestNetworkInterface>
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    OutpostArn string
    PasswordData string
    PlacementGroup string
    Placement Group to start the instance in.
    PlacementPartitionNumber int
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    PrimaryNetworkInterfaceId string
    PrivateDns string
    The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC
    PrivateDnsNameOptions SpotInstanceRequestPrivateDnsNameOptions
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    PrivateIp string
    Private IP address to associate with the instance in a VPC.
    PublicDns string
    The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC
    PublicIp string
    The public IP address assigned to the instance, if applicable.
    RootBlockDevice SpotInstanceRequestRootBlockDevice
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    SecondaryPrivateIps List<string>
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    SecurityGroups List<string>

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    SourceDestCheck bool
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    SpotBidStatus string
    The current bid status of the Spot Instance Request.
    SpotInstanceId string
    The Instance ID (if any) that is currently fulfilling the Spot Instance request.
    SpotPrice string
    The maximum price to request on the spot market.
    SpotRequestState string
    The current request state of the Spot Instance Request.
    SpotType string
    If set to one-time, after the instance is terminated, the spot request will be closed.
    SubnetId string
    VPC Subnet ID to launch in.
    Tags Dictionary<string, string>
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Tenancy string
    Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. Valid values are default, dedicated, and host.
    UserData string
    User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    UserDataBase64 string
    Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    UserDataReplaceOnChange bool
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    ValidFrom string
    The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
    ValidUntil string
    The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
    VolumeTags Dictionary<string, string>

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    VpcSecurityGroupIds List<string>
    List of security group IDs to associate with.
    WaitForFulfillment bool
    If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
    Ami string
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    Arn string
    AssociatePublicIpAddress bool
    Whether to associate a public IP address with an instance in a VPC.
    AvailabilityZone string
    AZ to start the instance in.
    BlockDurationMinutes int
    The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
    CapacityReservationSpecification SpotInstanceRequestCapacityReservationSpecificationArgs

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    CpuCoreCount int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated:use 'cpu_options' argument instead

    CpuOptions SpotInstanceRequestCpuOptionsArgs
    The CPU options for the instance. See CPU Options below for more details.
    CpuThreadsPerCore int
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated:use 'cpu_options' argument instead

    CreditSpecification SpotInstanceRequestCreditSpecificationArgs
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    DisableApiStop bool
    If true, enables EC2 Instance Stop Protection.
    DisableApiTermination bool
    If true, enables EC2 Instance Termination Protection.
    EbsBlockDevices []SpotInstanceRequestEbsBlockDeviceArgs
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    EbsOptimized bool
    If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.
    EnclaveOptions SpotInstanceRequestEnclaveOptionsArgs
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    EphemeralBlockDevices []SpotInstanceRequestEphemeralBlockDeviceArgs
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    GetPasswordData bool
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    Hibernation bool
    If true, the launched EC2 instance will support hibernation.
    HostId string
    ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
    HostResourceGroupArn string
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    IamInstanceProfile string
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    InstanceInitiatedShutdownBehavior string
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    InstanceInterruptionBehavior string
    Indicates Spot instance behavior when it is interrupted. Valid values are terminate, stop, or hibernate. Default value is terminate.
    InstanceState string
    InstanceType string
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    Ipv6AddressCount int
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    Ipv6Addresses []string
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    KeyName string
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    LaunchGroup string
    A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
    LaunchTemplate SpotInstanceRequestLaunchTemplateArgs
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    MaintenanceOptions SpotInstanceRequestMaintenanceOptionsArgs
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    MetadataOptions SpotInstanceRequestMetadataOptionsArgs
    Customize the metadata options of the instance. See Metadata Options below for more details.
    Monitoring bool
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    NetworkInterfaces []SpotInstanceRequestNetworkInterfaceArgs
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    OutpostArn string
    PasswordData string
    PlacementGroup string
    Placement Group to start the instance in.
    PlacementPartitionNumber int
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    PrimaryNetworkInterfaceId string
    PrivateDns string
    The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC
    PrivateDnsNameOptions SpotInstanceRequestPrivateDnsNameOptionsArgs
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    PrivateIp string
    Private IP address to associate with the instance in a VPC.
    PublicDns string
    The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC
    PublicIp string
    The public IP address assigned to the instance, if applicable.
    RootBlockDevice SpotInstanceRequestRootBlockDeviceArgs
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    SecondaryPrivateIps []string
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    SecurityGroups []string

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    SourceDestCheck bool
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    SpotBidStatus string
    The current bid status of the Spot Instance Request.
    SpotInstanceId string
    The Instance ID (if any) that is currently fulfilling the Spot Instance request.
    SpotPrice string
    The maximum price to request on the spot market.
    SpotRequestState string
    The current request state of the Spot Instance Request.
    SpotType string
    If set to one-time, after the instance is terminated, the spot request will be closed.
    SubnetId string
    VPC Subnet ID to launch in.
    Tags map[string]string
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Tenancy string
    Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. Valid values are default, dedicated, and host.
    UserData string
    User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    UserDataBase64 string
    Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    UserDataReplaceOnChange bool
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    ValidFrom string
    The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
    ValidUntil string
    The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
    VolumeTags map[string]string

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    VpcSecurityGroupIds []string
    List of security group IDs to associate with.
    WaitForFulfillment bool
    If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
    ami String
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    arn String
    associatePublicIpAddress Boolean
    Whether to associate a public IP address with an instance in a VPC.
    availabilityZone String
    AZ to start the instance in.
    blockDurationMinutes Integer
    The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
    capacityReservationSpecification SpotInstanceRequestCapacityReservationSpecification

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpuCoreCount Integer
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated:use 'cpu_options' argument instead

    cpuOptions SpotInstanceRequestCpuOptions
    The CPU options for the instance. See CPU Options below for more details.
    cpuThreadsPerCore Integer
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated:use 'cpu_options' argument instead

    creditSpecification SpotInstanceRequestCreditSpecification
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disableApiStop Boolean
    If true, enables EC2 Instance Stop Protection.
    disableApiTermination Boolean
    If true, enables EC2 Instance Termination Protection.
    ebsBlockDevices List<SpotInstanceRequestEbsBlockDevice>
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebsOptimized Boolean
    If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.
    enclaveOptions SpotInstanceRequestEnclaveOptions
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeralBlockDevices List<SpotInstanceRequestEphemeralBlockDevice>
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    getPasswordData Boolean
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation Boolean
    If true, the launched EC2 instance will support hibernation.
    hostId String
    ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
    hostResourceGroupArn String
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iamInstanceProfile String
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instanceInitiatedShutdownBehavior String
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instanceInterruptionBehavior String
    Indicates Spot instance behavior when it is interrupted. Valid values are terminate, stop, or hibernate. Default value is terminate.
    instanceState String
    instanceType String
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6AddressCount Integer
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6Addresses List<String>
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    keyName String
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launchGroup String
    A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
    launchTemplate SpotInstanceRequestLaunchTemplate
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenanceOptions SpotInstanceRequestMaintenanceOptions
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadataOptions SpotInstanceRequestMetadataOptions
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring Boolean
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    networkInterfaces List<SpotInstanceRequestNetworkInterface>
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    outpostArn String
    passwordData String
    placementGroup String
    Placement Group to start the instance in.
    placementPartitionNumber Integer
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    primaryNetworkInterfaceId String
    privateDns String
    The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC
    privateDnsNameOptions SpotInstanceRequestPrivateDnsNameOptions
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    privateIp String
    Private IP address to associate with the instance in a VPC.
    publicDns String
    The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC
    publicIp String
    The public IP address assigned to the instance, if applicable.
    rootBlockDevice SpotInstanceRequestRootBlockDevice
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondaryPrivateIps List<String>
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    securityGroups List<String>

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    sourceDestCheck Boolean
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    spotBidStatus String
    The current bid status of the Spot Instance Request.
    spotInstanceId String
    The Instance ID (if any) that is currently fulfilling the Spot Instance request.
    spotPrice String
    The maximum price to request on the spot market.
    spotRequestState String
    The current request state of the Spot Instance Request.
    spotType String
    If set to one-time, after the instance is terminated, the spot request will be closed.
    subnetId String
    VPC Subnet ID to launch in.
    tags Map<String,String>
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    tenancy String
    Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. Valid values are default, dedicated, and host.
    userData String
    User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    userDataBase64 String
    Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    userDataReplaceOnChange Boolean
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    validFrom String
    The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
    validUntil String
    The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
    volumeTags Map<String,String>

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpcSecurityGroupIds List<String>
    List of security group IDs to associate with.
    waitForFulfillment Boolean
    If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
    ami string
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    arn string
    associatePublicIpAddress boolean
    Whether to associate a public IP address with an instance in a VPC.
    availabilityZone string
    AZ to start the instance in.
    blockDurationMinutes number
    The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
    capacityReservationSpecification SpotInstanceRequestCapacityReservationSpecification

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpuCoreCount number
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated:use 'cpu_options' argument instead

    cpuOptions SpotInstanceRequestCpuOptions
    The CPU options for the instance. See CPU Options below for more details.
    cpuThreadsPerCore number
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated:use 'cpu_options' argument instead

    creditSpecification SpotInstanceRequestCreditSpecification
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disableApiStop boolean
    If true, enables EC2 Instance Stop Protection.
    disableApiTermination boolean
    If true, enables EC2 Instance Termination Protection.
    ebsBlockDevices SpotInstanceRequestEbsBlockDevice[]
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebsOptimized boolean
    If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.
    enclaveOptions SpotInstanceRequestEnclaveOptions
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeralBlockDevices SpotInstanceRequestEphemeralBlockDevice[]
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    getPasswordData boolean
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation boolean
    If true, the launched EC2 instance will support hibernation.
    hostId string
    ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
    hostResourceGroupArn string
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iamInstanceProfile string
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instanceInitiatedShutdownBehavior string
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instanceInterruptionBehavior string
    Indicates Spot instance behavior when it is interrupted. Valid values are terminate, stop, or hibernate. Default value is terminate.
    instanceState string
    instanceType string
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6AddressCount number
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6Addresses string[]
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    keyName string
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launchGroup string
    A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
    launchTemplate SpotInstanceRequestLaunchTemplate
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenanceOptions SpotInstanceRequestMaintenanceOptions
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadataOptions SpotInstanceRequestMetadataOptions
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring boolean
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    networkInterfaces SpotInstanceRequestNetworkInterface[]
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    outpostArn string
    passwordData string
    placementGroup string
    Placement Group to start the instance in.
    placementPartitionNumber number
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    primaryNetworkInterfaceId string
    privateDns string
    The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC
    privateDnsNameOptions SpotInstanceRequestPrivateDnsNameOptions
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    privateIp string
    Private IP address to associate with the instance in a VPC.
    publicDns string
    The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC
    publicIp string
    The public IP address assigned to the instance, if applicable.
    rootBlockDevice SpotInstanceRequestRootBlockDevice
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondaryPrivateIps string[]
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    securityGroups string[]

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    sourceDestCheck boolean
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    spotBidStatus string
    The current bid status of the Spot Instance Request.
    spotInstanceId string
    The Instance ID (if any) that is currently fulfilling the Spot Instance request.
    spotPrice string
    The maximum price to request on the spot market.
    spotRequestState string
    The current request state of the Spot Instance Request.
    spotType string
    If set to one-time, after the instance is terminated, the spot request will be closed.
    subnetId string
    VPC Subnet ID to launch in.
    tags {[key: string]: string}
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    tenancy string
    Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. Valid values are default, dedicated, and host.
    userData string
    User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    userDataBase64 string
    Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    userDataReplaceOnChange boolean
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    validFrom string
    The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
    validUntil string
    The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
    volumeTags {[key: string]: string}

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpcSecurityGroupIds string[]
    List of security group IDs to associate with.
    waitForFulfillment boolean
    If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
    ami str
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    arn str
    associate_public_ip_address bool
    Whether to associate a public IP address with an instance in a VPC.
    availability_zone str
    AZ to start the instance in.
    block_duration_minutes int
    The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
    capacity_reservation_specification SpotInstanceRequestCapacityReservationSpecificationArgs

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpu_core_count int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated:use 'cpu_options' argument instead

    cpu_options SpotInstanceRequestCpuOptionsArgs
    The CPU options for the instance. See CPU Options below for more details.
    cpu_threads_per_core int
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated:use 'cpu_options' argument instead

    credit_specification SpotInstanceRequestCreditSpecificationArgs
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disable_api_stop bool
    If true, enables EC2 Instance Stop Protection.
    disable_api_termination bool
    If true, enables EC2 Instance Termination Protection.
    ebs_block_devices Sequence[SpotInstanceRequestEbsBlockDeviceArgs]
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebs_optimized bool
    If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.
    enclave_options SpotInstanceRequestEnclaveOptionsArgs
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeral_block_devices Sequence[SpotInstanceRequestEphemeralBlockDeviceArgs]
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    get_password_data bool
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation bool
    If true, the launched EC2 instance will support hibernation.
    host_id str
    ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
    host_resource_group_arn str
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iam_instance_profile str
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instance_initiated_shutdown_behavior str
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instance_interruption_behavior str
    Indicates Spot instance behavior when it is interrupted. Valid values are terminate, stop, or hibernate. Default value is terminate.
    instance_state str
    instance_type str
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6_address_count int
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6_addresses Sequence[str]
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    key_name str
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launch_group str
    A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
    launch_template SpotInstanceRequestLaunchTemplateArgs
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenance_options SpotInstanceRequestMaintenanceOptionsArgs
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadata_options SpotInstanceRequestMetadataOptionsArgs
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring bool
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    network_interfaces Sequence[SpotInstanceRequestNetworkInterfaceArgs]
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    outpost_arn str
    password_data str
    placement_group str
    Placement Group to start the instance in.
    placement_partition_number int
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    primary_network_interface_id str
    private_dns str
    The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC
    private_dns_name_options SpotInstanceRequestPrivateDnsNameOptionsArgs
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    private_ip str
    Private IP address to associate with the instance in a VPC.
    public_dns str
    The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC
    public_ip str
    The public IP address assigned to the instance, if applicable.
    root_block_device SpotInstanceRequestRootBlockDeviceArgs
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondary_private_ips Sequence[str]
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    security_groups Sequence[str]

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    source_dest_check bool
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    spot_bid_status str
    The current bid status of the Spot Instance Request.
    spot_instance_id str
    The Instance ID (if any) that is currently fulfilling the Spot Instance request.
    spot_price str
    The maximum price to request on the spot market.
    spot_request_state str
    The current request state of the Spot Instance Request.
    spot_type str
    If set to one-time, after the instance is terminated, the spot request will be closed.
    subnet_id str
    VPC Subnet ID to launch in.
    tags Mapping[str, str]
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    tenancy str
    Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. Valid values are default, dedicated, and host.
    user_data str
    User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    user_data_base64 str
    Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    user_data_replace_on_change bool
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    valid_from str
    The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
    valid_until str
    The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
    volume_tags Mapping[str, str]

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpc_security_group_ids Sequence[str]
    List of security group IDs to associate with.
    wait_for_fulfillment bool
    If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
    ami String
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    arn String
    associatePublicIpAddress Boolean
    Whether to associate a public IP address with an instance in a VPC.
    availabilityZone String
    AZ to start the instance in.
    blockDurationMinutes Number
    The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
    capacityReservationSpecification Property Map

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpuCoreCount Number
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated:use 'cpu_options' argument instead

    cpuOptions Property Map
    The CPU options for the instance. See CPU Options below for more details.
    cpuThreadsPerCore Number
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated:use 'cpu_options' argument instead

    creditSpecification Property Map
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disableApiStop Boolean
    If true, enables EC2 Instance Stop Protection.
    disableApiTermination Boolean
    If true, enables EC2 Instance Termination Protection.
    ebsBlockDevices List<Property Map>
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebsOptimized Boolean
    If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then there is no need to set this and there is no effect to disabling it. See the EBS Optimized section of the AWS User Guide for more information.
    enclaveOptions Property Map
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeralBlockDevices List<Property Map>
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    getPasswordData Boolean
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation Boolean
    If true, the launched EC2 instance will support hibernation.
    hostId String
    ID of a dedicated host that the instance will be assigned to. Use when an instance is to be launched on a specific dedicated host.
    hostResourceGroupArn String
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iamInstanceProfile String
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instanceInitiatedShutdownBehavior String
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instanceInterruptionBehavior String
    Indicates Spot instance behavior when it is interrupted. Valid values are terminate, stop, or hibernate. Default value is terminate.
    instanceState String
    instanceType String
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6AddressCount Number
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6Addresses List<String>
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    keyName String
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launchGroup String
    A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually.
    launchTemplate Property Map
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenanceOptions Property Map
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadataOptions Property Map
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring Boolean
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    networkInterfaces List<Property Map>
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    outpostArn String
    passwordData String
    placementGroup String
    Placement Group to start the instance in.
    placementPartitionNumber Number
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    primaryNetworkInterfaceId String
    privateDns String
    The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC
    privateDnsNameOptions Property Map
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    privateIp String
    Private IP address to associate with the instance in a VPC.
    publicDns String
    The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC
    publicIp String
    The public IP address assigned to the instance, if applicable.
    rootBlockDevice Property Map
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondaryPrivateIps List<String>
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    securityGroups List<String>

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    sourceDestCheck Boolean
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    spotBidStatus String
    The current bid status of the Spot Instance Request.
    spotInstanceId String
    The Instance ID (if any) that is currently fulfilling the Spot Instance request.
    spotPrice String
    The maximum price to request on the spot market.
    spotRequestState String
    The current request state of the Spot Instance Request.
    spotType String
    If set to one-time, after the instance is terminated, the spot request will be closed.
    subnetId String
    VPC Subnet ID to launch in.
    tags Map<String>
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    tenancy String
    Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. Valid values are default, dedicated, and host.
    userData String
    User data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    userDataBase64 String
    Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. Updates to this field will trigger a stop/start of the EC2 instance by default. If the user_data_replace_on_change is set then updates to this field will trigger a destroy and recreate.
    userDataReplaceOnChange Boolean
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    validFrom String
    The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
    validUntil String
    The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date.
    volumeTags Map<String>

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpcSecurityGroupIds List<String>
    List of security group IDs to associate with.
    waitForFulfillment Boolean
    If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.

    Supporting Types

    SpotInstanceRequestCapacityReservationSpecification, SpotInstanceRequestCapacityReservationSpecificationArgs

    CapacityReservationPreference string
    Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
    CapacityReservationTarget SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTarget

    Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.

    For more information, see the documentation on Capacity Reservations.

    CapacityReservationPreference string
    Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
    CapacityReservationTarget SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTarget

    Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.

    For more information, see the documentation on Capacity Reservations.

    capacityReservationPreference String
    Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
    capacityReservationTarget SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTarget

    Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.

    For more information, see the documentation on Capacity Reservations.

    capacityReservationPreference string
    Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
    capacityReservationTarget SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTarget

    Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.

    For more information, see the documentation on Capacity Reservations.

    capacity_reservation_preference str
    Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
    capacity_reservation_target SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTarget

    Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.

    For more information, see the documentation on Capacity Reservations.

    capacityReservationPreference String
    Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
    capacityReservationTarget Property Map

    Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.

    For more information, see the documentation on Capacity Reservations.

    SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTarget, SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetArgs

    CapacityReservationId string
    ID of the Capacity Reservation in which to run the instance.
    CapacityReservationResourceGroupArn string
    ARN of the Capacity Reservation resource group in which to run the instance.
    CapacityReservationId string
    ID of the Capacity Reservation in which to run the instance.
    CapacityReservationResourceGroupArn string
    ARN of the Capacity Reservation resource group in which to run the instance.
    capacityReservationId String
    ID of the Capacity Reservation in which to run the instance.
    capacityReservationResourceGroupArn String
    ARN of the Capacity Reservation resource group in which to run the instance.
    capacityReservationId string
    ID of the Capacity Reservation in which to run the instance.
    capacityReservationResourceGroupArn string
    ARN of the Capacity Reservation resource group in which to run the instance.
    capacity_reservation_id str
    ID of the Capacity Reservation in which to run the instance.
    capacity_reservation_resource_group_arn str
    ARN of the Capacity Reservation resource group in which to run the instance.
    capacityReservationId String
    ID of the Capacity Reservation in which to run the instance.
    capacityReservationResourceGroupArn String
    ARN of the Capacity Reservation resource group in which to run the instance.

    SpotInstanceRequestCpuOptions, SpotInstanceRequestCpuOptionsArgs

    AmdSevSnp string
    Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
    CoreCount int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.
    ThreadsPerCore int

    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    For more information, see the documentation on Optimizing CPU options.

    AmdSevSnp string
    Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
    CoreCount int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.
    ThreadsPerCore int

    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    For more information, see the documentation on Optimizing CPU options.

    amdSevSnp String
    Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
    coreCount Integer
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.
    threadsPerCore Integer

    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    For more information, see the documentation on Optimizing CPU options.

    amdSevSnp string
    Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
    coreCount number
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.
    threadsPerCore number

    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    For more information, see the documentation on Optimizing CPU options.

    amd_sev_snp str
    Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
    core_count int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.
    threads_per_core int

    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    For more information, see the documentation on Optimizing CPU options.

    amdSevSnp String
    Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
    coreCount Number
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.
    threadsPerCore Number

    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    For more information, see the documentation on Optimizing CPU options.

    SpotInstanceRequestCreditSpecification, SpotInstanceRequestCreditSpecificationArgs

    CpuCredits string
    Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
    CpuCredits string
    Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
    cpuCredits String
    Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
    cpuCredits string
    Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
    cpu_credits str
    Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
    cpuCredits String
    Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.

    SpotInstanceRequestEbsBlockDevice, SpotInstanceRequestEbsBlockDeviceArgs

    DeviceName string
    Name of the device to mount.
    DeleteOnTermination bool
    Whether the volume should be destroyed on instance termination. Defaults to true.
    Encrypted bool
    Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
    Iops int
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    KmsKeyId string
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    SnapshotId string
    Snapshot ID to mount.
    Tags Dictionary<string, string>
    Map of tags to assign to the device.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Throughput int
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    VolumeId string
    VolumeSize int
    Size of the volume in gibibytes (GiB).
    VolumeType string

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.

    NOTE: Currently, changes to the ebs_block_device configuration of existing resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the aws.ebs.Volume and aws.ec2.VolumeAttachment resources instead. If you use ebs_block_device on an aws.ec2.Instance, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, ebs_block_device cannot be mixed with external aws.ebs.Volume and aws.ec2.VolumeAttachment resources for a given instance.

    DeviceName string
    Name of the device to mount.
    DeleteOnTermination bool
    Whether the volume should be destroyed on instance termination. Defaults to true.
    Encrypted bool
    Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
    Iops int
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    KmsKeyId string
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    SnapshotId string
    Snapshot ID to mount.
    Tags map[string]string
    Map of tags to assign to the device.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Throughput int
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    VolumeId string
    VolumeSize int
    Size of the volume in gibibytes (GiB).
    VolumeType string

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.

    NOTE: Currently, changes to the ebs_block_device configuration of existing resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the aws.ebs.Volume and aws.ec2.VolumeAttachment resources instead. If you use ebs_block_device on an aws.ec2.Instance, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, ebs_block_device cannot be mixed with external aws.ebs.Volume and aws.ec2.VolumeAttachment resources for a given instance.

    deviceName String
    Name of the device to mount.
    deleteOnTermination Boolean
    Whether the volume should be destroyed on instance termination. Defaults to true.
    encrypted Boolean
    Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
    iops Integer
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kmsKeyId String
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    snapshotId String
    Snapshot ID to mount.
    tags Map<String,String>
    Map of tags to assign to the device.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput Integer
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volumeId String
    volumeSize Integer
    Size of the volume in gibibytes (GiB).
    volumeType String

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.

    NOTE: Currently, changes to the ebs_block_device configuration of existing resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the aws.ebs.Volume and aws.ec2.VolumeAttachment resources instead. If you use ebs_block_device on an aws.ec2.Instance, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, ebs_block_device cannot be mixed with external aws.ebs.Volume and aws.ec2.VolumeAttachment resources for a given instance.

    deviceName string
    Name of the device to mount.
    deleteOnTermination boolean
    Whether the volume should be destroyed on instance termination. Defaults to true.
    encrypted boolean
    Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
    iops number
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kmsKeyId string
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    snapshotId string
    Snapshot ID to mount.
    tags {[key: string]: string}
    Map of tags to assign to the device.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput number
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volumeId string
    volumeSize number
    Size of the volume in gibibytes (GiB).
    volumeType string

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.

    NOTE: Currently, changes to the ebs_block_device configuration of existing resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the aws.ebs.Volume and aws.ec2.VolumeAttachment resources instead. If you use ebs_block_device on an aws.ec2.Instance, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, ebs_block_device cannot be mixed with external aws.ebs.Volume and aws.ec2.VolumeAttachment resources for a given instance.

    device_name str
    Name of the device to mount.
    delete_on_termination bool
    Whether the volume should be destroyed on instance termination. Defaults to true.
    encrypted bool
    Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
    iops int
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kms_key_id str
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    snapshot_id str
    Snapshot ID to mount.
    tags Mapping[str, str]
    Map of tags to assign to the device.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput int
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volume_id str
    volume_size int
    Size of the volume in gibibytes (GiB).
    volume_type str

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.

    NOTE: Currently, changes to the ebs_block_device configuration of existing resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the aws.ebs.Volume and aws.ec2.VolumeAttachment resources instead. If you use ebs_block_device on an aws.ec2.Instance, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, ebs_block_device cannot be mixed with external aws.ebs.Volume and aws.ec2.VolumeAttachment resources for a given instance.

    deviceName String
    Name of the device to mount.
    deleteOnTermination Boolean
    Whether the volume should be destroyed on instance termination. Defaults to true.
    encrypted Boolean
    Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
    iops Number
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kmsKeyId String
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    snapshotId String
    Snapshot ID to mount.
    tags Map<String>
    Map of tags to assign to the device.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput Number
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volumeId String
    volumeSize Number
    Size of the volume in gibibytes (GiB).
    volumeType String

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.

    NOTE: Currently, changes to the ebs_block_device configuration of existing resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the aws.ebs.Volume and aws.ec2.VolumeAttachment resources instead. If you use ebs_block_device on an aws.ec2.Instance, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, ebs_block_device cannot be mixed with external aws.ebs.Volume and aws.ec2.VolumeAttachment resources for a given instance.

    SpotInstanceRequestEnclaveOptions, SpotInstanceRequestEnclaveOptionsArgs

    Enabled bool

    Whether Nitro Enclaves will be enabled on the instance. Defaults to false.

    For more information, see the documentation on Nitro Enclaves.

    Enabled bool

    Whether Nitro Enclaves will be enabled on the instance. Defaults to false.

    For more information, see the documentation on Nitro Enclaves.

    enabled Boolean

    Whether Nitro Enclaves will be enabled on the instance. Defaults to false.

    For more information, see the documentation on Nitro Enclaves.

    enabled boolean

    Whether Nitro Enclaves will be enabled on the instance. Defaults to false.

    For more information, see the documentation on Nitro Enclaves.

    enabled bool

    Whether Nitro Enclaves will be enabled on the instance. Defaults to false.

    For more information, see the documentation on Nitro Enclaves.

    enabled Boolean

    Whether Nitro Enclaves will be enabled on the instance. Defaults to false.

    For more information, see the documentation on Nitro Enclaves.

    SpotInstanceRequestEphemeralBlockDevice, SpotInstanceRequestEphemeralBlockDeviceArgs

    DeviceName string
    Name of the block device to mount on the instance.
    NoDevice bool
    Suppresses the specified device included in the AMI's block device mapping.
    VirtualName string

    Instance Store Device Name (e.g., ephemeral0).

    Each AWS Instance type has a different set of Instance Store block devices available for attachment. AWS publishes a list of which ephemeral devices are available on each type. The devices are always identified by the virtual_name in the format ephemeral{0..N}.

    DeviceName string
    Name of the block device to mount on the instance.
    NoDevice bool
    Suppresses the specified device included in the AMI's block device mapping.
    VirtualName string

    Instance Store Device Name (e.g., ephemeral0).

    Each AWS Instance type has a different set of Instance Store block devices available for attachment. AWS publishes a list of which ephemeral devices are available on each type. The devices are always identified by the virtual_name in the format ephemeral{0..N}.

    deviceName String
    Name of the block device to mount on the instance.
    noDevice Boolean
    Suppresses the specified device included in the AMI's block device mapping.
    virtualName String

    Instance Store Device Name (e.g., ephemeral0).

    Each AWS Instance type has a different set of Instance Store block devices available for attachment. AWS publishes a list of which ephemeral devices are available on each type. The devices are always identified by the virtual_name in the format ephemeral{0..N}.

    deviceName string
    Name of the block device to mount on the instance.
    noDevice boolean
    Suppresses the specified device included in the AMI's block device mapping.
    virtualName string

    Instance Store Device Name (e.g., ephemeral0).

    Each AWS Instance type has a different set of Instance Store block devices available for attachment. AWS publishes a list of which ephemeral devices are available on each type. The devices are always identified by the virtual_name in the format ephemeral{0..N}.

    device_name str
    Name of the block device to mount on the instance.
    no_device bool
    Suppresses the specified device included in the AMI's block device mapping.
    virtual_name str

    Instance Store Device Name (e.g., ephemeral0).

    Each AWS Instance type has a different set of Instance Store block devices available for attachment. AWS publishes a list of which ephemeral devices are available on each type. The devices are always identified by the virtual_name in the format ephemeral{0..N}.

    deviceName String
    Name of the block device to mount on the instance.
    noDevice Boolean
    Suppresses the specified device included in the AMI's block device mapping.
    virtualName String

    Instance Store Device Name (e.g., ephemeral0).

    Each AWS Instance type has a different set of Instance Store block devices available for attachment. AWS publishes a list of which ephemeral devices are available on each type. The devices are always identified by the virtual_name in the format ephemeral{0..N}.

    SpotInstanceRequestLaunchTemplate, SpotInstanceRequestLaunchTemplateArgs

    Id string
    ID of the launch template. Conflicts with name.
    Name string
    Name of the launch template. Conflicts with id.
    Version string
    Template version. Can be a specific version number, $Latest or $Default. The default value is $Default.
    Id string
    ID of the launch template. Conflicts with name.
    Name string
    Name of the launch template. Conflicts with id.
    Version string
    Template version. Can be a specific version number, $Latest or $Default. The default value is $Default.
    id String
    ID of the launch template. Conflicts with name.
    name String
    Name of the launch template. Conflicts with id.
    version String
    Template version. Can be a specific version number, $Latest or $Default. The default value is $Default.
    id string
    ID of the launch template. Conflicts with name.
    name string
    Name of the launch template. Conflicts with id.
    version string
    Template version. Can be a specific version number, $Latest or $Default. The default value is $Default.
    id str
    ID of the launch template. Conflicts with name.
    name str
    Name of the launch template. Conflicts with id.
    version str
    Template version. Can be a specific version number, $Latest or $Default. The default value is $Default.
    id String
    ID of the launch template. Conflicts with name.
    name String
    Name of the launch template. Conflicts with id.
    version String
    Template version. Can be a specific version number, $Latest or $Default. The default value is $Default.

    SpotInstanceRequestMaintenanceOptions, SpotInstanceRequestMaintenanceOptionsArgs

    AutoRecovery string
    Automatic recovery behavior of the Instance. Can be "default" or "disabled". See Recover your instance for more details.
    AutoRecovery string
    Automatic recovery behavior of the Instance. Can be "default" or "disabled". See Recover your instance for more details.
    autoRecovery String
    Automatic recovery behavior of the Instance. Can be "default" or "disabled". See Recover your instance for more details.
    autoRecovery string
    Automatic recovery behavior of the Instance. Can be "default" or "disabled". See Recover your instance for more details.
    auto_recovery str
    Automatic recovery behavior of the Instance. Can be "default" or "disabled". See Recover your instance for more details.
    autoRecovery String
    Automatic recovery behavior of the Instance. Can be "default" or "disabled". See Recover your instance for more details.

    SpotInstanceRequestMetadataOptions, SpotInstanceRequestMetadataOptionsArgs

    HttpEndpoint string
    Whether the metadata service is available. Valid values include enabled or disabled. Defaults to enabled.
    HttpProtocolIpv6 string
    Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to disabled.
    HttpPutResponseHopLimit int
    Desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Valid values are integer from 1 to 64. Defaults to 1.
    HttpTokens string
    Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include optional or required. Defaults to optional.
    InstanceMetadataTags string

    Enables or disables access to instance tags from the instance metadata service. Valid values include enabled or disabled. Defaults to disabled.

    For more information, see the documentation on the Instance Metadata Service.

    HttpEndpoint string
    Whether the metadata service is available. Valid values include enabled or disabled. Defaults to enabled.
    HttpProtocolIpv6 string
    Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to disabled.
    HttpPutResponseHopLimit int
    Desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Valid values are integer from 1 to 64. Defaults to 1.
    HttpTokens string
    Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include optional or required. Defaults to optional.
    InstanceMetadataTags string

    Enables or disables access to instance tags from the instance metadata service. Valid values include enabled or disabled. Defaults to disabled.

    For more information, see the documentation on the Instance Metadata Service.

    httpEndpoint String
    Whether the metadata service is available. Valid values include enabled or disabled. Defaults to enabled.
    httpProtocolIpv6 String
    Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to disabled.
    httpPutResponseHopLimit Integer
    Desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Valid values are integer from 1 to 64. Defaults to 1.
    httpTokens String
    Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include optional or required. Defaults to optional.
    instanceMetadataTags String

    Enables or disables access to instance tags from the instance metadata service. Valid values include enabled or disabled. Defaults to disabled.

    For more information, see the documentation on the Instance Metadata Service.

    httpEndpoint string
    Whether the metadata service is available. Valid values include enabled or disabled. Defaults to enabled.
    httpProtocolIpv6 string
    Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to disabled.
    httpPutResponseHopLimit number
    Desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Valid values are integer from 1 to 64. Defaults to 1.
    httpTokens string
    Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include optional or required. Defaults to optional.
    instanceMetadataTags string

    Enables or disables access to instance tags from the instance metadata service. Valid values include enabled or disabled. Defaults to disabled.

    For more information, see the documentation on the Instance Metadata Service.

    http_endpoint str
    Whether the metadata service is available. Valid values include enabled or disabled. Defaults to enabled.
    http_protocol_ipv6 str
    Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to disabled.
    http_put_response_hop_limit int
    Desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Valid values are integer from 1 to 64. Defaults to 1.
    http_tokens str
    Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include optional or required. Defaults to optional.
    instance_metadata_tags str

    Enables or disables access to instance tags from the instance metadata service. Valid values include enabled or disabled. Defaults to disabled.

    For more information, see the documentation on the Instance Metadata Service.

    httpEndpoint String
    Whether the metadata service is available. Valid values include enabled or disabled. Defaults to enabled.
    httpProtocolIpv6 String
    Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to disabled.
    httpPutResponseHopLimit Number
    Desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Valid values are integer from 1 to 64. Defaults to 1.
    httpTokens String
    Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include optional or required. Defaults to optional.
    instanceMetadataTags String

    Enables or disables access to instance tags from the instance metadata service. Valid values include enabled or disabled. Defaults to disabled.

    For more information, see the documentation on the Instance Metadata Service.

    SpotInstanceRequestNetworkInterface, SpotInstanceRequestNetworkInterfaceArgs

    DeviceIndex int
    Integer index of the network interface attachment. Limited by instance type.
    NetworkInterfaceId string
    ID of the network interface to attach.
    DeleteOnTermination bool
    Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
    NetworkCardIndex int
    Integer index of the network card. Limited by instance type. The default index is 0.
    DeviceIndex int
    Integer index of the network interface attachment. Limited by instance type.
    NetworkInterfaceId string
    ID of the network interface to attach.
    DeleteOnTermination bool
    Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
    NetworkCardIndex int
    Integer index of the network card. Limited by instance type. The default index is 0.
    deviceIndex Integer
    Integer index of the network interface attachment. Limited by instance type.
    networkInterfaceId String
    ID of the network interface to attach.
    deleteOnTermination Boolean
    Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
    networkCardIndex Integer
    Integer index of the network card. Limited by instance type. The default index is 0.
    deviceIndex number
    Integer index of the network interface attachment. Limited by instance type.
    networkInterfaceId string
    ID of the network interface to attach.
    deleteOnTermination boolean
    Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
    networkCardIndex number
    Integer index of the network card. Limited by instance type. The default index is 0.
    device_index int
    Integer index of the network interface attachment. Limited by instance type.
    network_interface_id str
    ID of the network interface to attach.
    delete_on_termination bool
    Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
    network_card_index int
    Integer index of the network card. Limited by instance type. The default index is 0.
    deviceIndex Number
    Integer index of the network interface attachment. Limited by instance type.
    networkInterfaceId String
    ID of the network interface to attach.
    deleteOnTermination Boolean
    Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
    networkCardIndex Number
    Integer index of the network card. Limited by instance type. The default index is 0.

    SpotInstanceRequestPrivateDnsNameOptions, SpotInstanceRequestPrivateDnsNameOptionsArgs

    EnableResourceNameDnsARecord bool
    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
    EnableResourceNameDnsAaaaRecord bool
    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
    HostnameType string
    Type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name and resource-name.
    EnableResourceNameDnsARecord bool
    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
    EnableResourceNameDnsAaaaRecord bool
    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
    HostnameType string
    Type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name and resource-name.
    enableResourceNameDnsARecord Boolean
    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
    enableResourceNameDnsAaaaRecord Boolean
    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
    hostnameType String
    Type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name and resource-name.
    enableResourceNameDnsARecord boolean
    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
    enableResourceNameDnsAaaaRecord boolean
    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
    hostnameType string
    Type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name and resource-name.
    enable_resource_name_dns_a_record bool
    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
    enable_resource_name_dns_aaaa_record bool
    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
    hostname_type str
    Type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name and resource-name.
    enableResourceNameDnsARecord Boolean
    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
    enableResourceNameDnsAaaaRecord Boolean
    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
    hostnameType String
    Type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name and resource-name.

    SpotInstanceRequestRootBlockDevice, SpotInstanceRequestRootBlockDeviceArgs

    DeleteOnTermination bool
    Whether the volume should be destroyed on instance termination. Defaults to true.
    DeviceName string
    Name of the device to mount.
    Encrypted bool
    Whether to enable volume encryption. Defaults to false. Must be configured to perform drift detection.
    Iops int
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    KmsKeyId string
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    Tags Dictionary<string, string>
    Map of tags to assign to the device.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Throughput int
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    VolumeId string
    VolumeSize int
    Size of the volume in gibibytes (GiB).
    VolumeType string

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to the volume type that the AMI uses.

    Modifying the encrypted or kms_key_id settings of the root_block_device requires resource replacement.

    DeleteOnTermination bool
    Whether the volume should be destroyed on instance termination. Defaults to true.
    DeviceName string
    Name of the device to mount.
    Encrypted bool
    Whether to enable volume encryption. Defaults to false. Must be configured to perform drift detection.
    Iops int
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    KmsKeyId string
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    Tags map[string]string
    Map of tags to assign to the device.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Throughput int
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    VolumeId string
    VolumeSize int
    Size of the volume in gibibytes (GiB).
    VolumeType string

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to the volume type that the AMI uses.

    Modifying the encrypted or kms_key_id settings of the root_block_device requires resource replacement.

    deleteOnTermination Boolean
    Whether the volume should be destroyed on instance termination. Defaults to true.
    deviceName String
    Name of the device to mount.
    encrypted Boolean
    Whether to enable volume encryption. Defaults to false. Must be configured to perform drift detection.
    iops Integer
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kmsKeyId String
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    tags Map<String,String>
    Map of tags to assign to the device.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput Integer
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volumeId String
    volumeSize Integer
    Size of the volume in gibibytes (GiB).
    volumeType String

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to the volume type that the AMI uses.

    Modifying the encrypted or kms_key_id settings of the root_block_device requires resource replacement.

    deleteOnTermination boolean
    Whether the volume should be destroyed on instance termination. Defaults to true.
    deviceName string
    Name of the device to mount.
    encrypted boolean
    Whether to enable volume encryption. Defaults to false. Must be configured to perform drift detection.
    iops number
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kmsKeyId string
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    tags {[key: string]: string}
    Map of tags to assign to the device.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput number
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volumeId string
    volumeSize number
    Size of the volume in gibibytes (GiB).
    volumeType string

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to the volume type that the AMI uses.

    Modifying the encrypted or kms_key_id settings of the root_block_device requires resource replacement.

    delete_on_termination bool
    Whether the volume should be destroyed on instance termination. Defaults to true.
    device_name str
    Name of the device to mount.
    encrypted bool
    Whether to enable volume encryption. Defaults to false. Must be configured to perform drift detection.
    iops int
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kms_key_id str
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    tags Mapping[str, str]
    Map of tags to assign to the device.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput int
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volume_id str
    volume_size int
    Size of the volume in gibibytes (GiB).
    volume_type str

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to the volume type that the AMI uses.

    Modifying the encrypted or kms_key_id settings of the root_block_device requires resource replacement.

    deleteOnTermination Boolean
    Whether the volume should be destroyed on instance termination. Defaults to true.
    deviceName String
    Name of the device to mount.
    encrypted Boolean
    Whether to enable volume encryption. Defaults to false. Must be configured to perform drift detection.
    iops Number
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kmsKeyId String
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    tags Map<String>
    Map of tags to assign to the device.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput Number
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volumeId String
    volumeSize Number
    Size of the volume in gibibytes (GiB).
    volumeType String

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to the volume type that the AMI uses.

    Modifying the encrypted or kms_key_id settings of the root_block_device requires resource replacement.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi