aws.ec2.SpotInstanceRequest
Explore with Pulumi AI
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) {
// Request a spot instance at $0.03
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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SpotInstanceRequest(name: string, args?: SpotInstanceRequestArgs, opts?: CustomResourceOptions);
@overload
def SpotInstanceRequest(resource_name: str,
args: Optional[SpotInstanceRequestArgs] = None,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var spotInstanceRequestResource = new Aws.Ec2.SpotInstanceRequest("spotInstanceRequestResource", new()
{
Ami = "string",
AssociatePublicIpAddress = false,
AvailabilityZone = "string",
BlockDurationMinutes = 0,
CapacityReservationSpecification = new Aws.Ec2.Inputs.SpotInstanceRequestCapacityReservationSpecificationArgs
{
CapacityReservationPreference = "string",
CapacityReservationTarget = new Aws.Ec2.Inputs.SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetArgs
{
CapacityReservationId = "string",
CapacityReservationResourceGroupArn = "string",
},
},
CpuOptions = new Aws.Ec2.Inputs.SpotInstanceRequestCpuOptionsArgs
{
AmdSevSnp = "string",
CoreCount = 0,
ThreadsPerCore = 0,
},
CreditSpecification = new Aws.Ec2.Inputs.SpotInstanceRequestCreditSpecificationArgs
{
CpuCredits = "string",
},
DisableApiStop = false,
DisableApiTermination = false,
EbsBlockDevices = new[]
{
new Aws.Ec2.Inputs.SpotInstanceRequestEbsBlockDeviceArgs
{
DeviceName = "string",
DeleteOnTermination = false,
Encrypted = false,
Iops = 0,
KmsKeyId = "string",
SnapshotId = "string",
Tags =
{
{ "string", "string" },
},
TagsAll =
{
{ "string", "string" },
},
Throughput = 0,
VolumeId = "string",
VolumeSize = 0,
VolumeType = "string",
},
},
EbsOptimized = false,
EnclaveOptions = new Aws.Ec2.Inputs.SpotInstanceRequestEnclaveOptionsArgs
{
Enabled = false,
},
EphemeralBlockDevices = new[]
{
new Aws.Ec2.Inputs.SpotInstanceRequestEphemeralBlockDeviceArgs
{
DeviceName = "string",
NoDevice = false,
VirtualName = "string",
},
},
GetPasswordData = false,
Hibernation = false,
HostId = "string",
HostResourceGroupArn = "string",
IamInstanceProfile = "string",
InstanceInitiatedShutdownBehavior = "string",
InstanceInterruptionBehavior = "string",
InstanceType = "string",
Ipv6AddressCount = 0,
Ipv6Addresses = new[]
{
"string",
},
KeyName = "string",
LaunchGroup = "string",
LaunchTemplate = new Aws.Ec2.Inputs.SpotInstanceRequestLaunchTemplateArgs
{
Id = "string",
Name = "string",
Version = "string",
},
MaintenanceOptions = new Aws.Ec2.Inputs.SpotInstanceRequestMaintenanceOptionsArgs
{
AutoRecovery = "string",
},
MetadataOptions = new Aws.Ec2.Inputs.SpotInstanceRequestMetadataOptionsArgs
{
HttpEndpoint = "string",
HttpProtocolIpv6 = "string",
HttpPutResponseHopLimit = 0,
HttpTokens = "string",
InstanceMetadataTags = "string",
},
Monitoring = false,
NetworkInterfaces = new[]
{
new Aws.Ec2.Inputs.SpotInstanceRequestNetworkInterfaceArgs
{
DeviceIndex = 0,
NetworkInterfaceId = "string",
DeleteOnTermination = false,
NetworkCardIndex = 0,
},
},
PlacementGroup = "string",
PlacementPartitionNumber = 0,
PrivateDnsNameOptions = new Aws.Ec2.Inputs.SpotInstanceRequestPrivateDnsNameOptionsArgs
{
EnableResourceNameDnsARecord = false,
EnableResourceNameDnsAaaaRecord = false,
HostnameType = "string",
},
PrivateIp = "string",
RootBlockDevice = new Aws.Ec2.Inputs.SpotInstanceRequestRootBlockDeviceArgs
{
DeleteOnTermination = false,
DeviceName = "string",
Encrypted = false,
Iops = 0,
KmsKeyId = "string",
Tags =
{
{ "string", "string" },
},
TagsAll =
{
{ "string", "string" },
},
Throughput = 0,
VolumeId = "string",
VolumeSize = 0,
VolumeType = "string",
},
SecondaryPrivateIps = new[]
{
"string",
},
SecurityGroups = new[]
{
"string",
},
SourceDestCheck = false,
SpotPrice = "string",
SpotType = "string",
SubnetId = "string",
Tags =
{
{ "string", "string" },
},
Tenancy = "string",
UserData = "string",
UserDataBase64 = "string",
UserDataReplaceOnChange = false,
ValidFrom = "string",
ValidUntil = "string",
VolumeTags =
{
{ "string", "string" },
},
VpcSecurityGroupIds = new[]
{
"string",
},
WaitForFulfillment = false,
});
example, err := ec2.NewSpotInstanceRequest(ctx, "spotInstanceRequestResource", &ec2.SpotInstanceRequestArgs{
Ami: pulumi.String("string"),
AssociatePublicIpAddress: pulumi.Bool(false),
AvailabilityZone: pulumi.String("string"),
BlockDurationMinutes: pulumi.Int(0),
CapacityReservationSpecification: &ec2.SpotInstanceRequestCapacityReservationSpecificationArgs{
CapacityReservationPreference: pulumi.String("string"),
CapacityReservationTarget: &ec2.SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetArgs{
CapacityReservationId: pulumi.String("string"),
CapacityReservationResourceGroupArn: pulumi.String("string"),
},
},
CpuOptions: &ec2.SpotInstanceRequestCpuOptionsArgs{
AmdSevSnp: pulumi.String("string"),
CoreCount: pulumi.Int(0),
ThreadsPerCore: pulumi.Int(0),
},
CreditSpecification: &ec2.SpotInstanceRequestCreditSpecificationArgs{
CpuCredits: pulumi.String("string"),
},
DisableApiStop: pulumi.Bool(false),
DisableApiTermination: pulumi.Bool(false),
EbsBlockDevices: ec2.SpotInstanceRequestEbsBlockDeviceArray{
&ec2.SpotInstanceRequestEbsBlockDeviceArgs{
DeviceName: pulumi.String("string"),
DeleteOnTermination: pulumi.Bool(false),
Encrypted: pulumi.Bool(false),
Iops: pulumi.Int(0),
KmsKeyId: pulumi.String("string"),
SnapshotId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TagsAll: pulumi.StringMap{
"string": pulumi.String("string"),
},
Throughput: pulumi.Int(0),
VolumeId: pulumi.String("string"),
VolumeSize: pulumi.Int(0),
VolumeType: pulumi.String("string"),
},
},
EbsOptimized: pulumi.Bool(false),
EnclaveOptions: &ec2.SpotInstanceRequestEnclaveOptionsArgs{
Enabled: pulumi.Bool(false),
},
EphemeralBlockDevices: ec2.SpotInstanceRequestEphemeralBlockDeviceArray{
&ec2.SpotInstanceRequestEphemeralBlockDeviceArgs{
DeviceName: pulumi.String("string"),
NoDevice: pulumi.Bool(false),
VirtualName: pulumi.String("string"),
},
},
GetPasswordData: pulumi.Bool(false),
Hibernation: pulumi.Bool(false),
HostId: pulumi.String("string"),
HostResourceGroupArn: pulumi.String("string"),
IamInstanceProfile: pulumi.String("string"),
InstanceInitiatedShutdownBehavior: pulumi.String("string"),
InstanceInterruptionBehavior: pulumi.String("string"),
InstanceType: pulumi.String("string"),
Ipv6AddressCount: pulumi.Int(0),
Ipv6Addresses: pulumi.StringArray{
pulumi.String("string"),
},
KeyName: pulumi.String("string"),
LaunchGroup: pulumi.String("string"),
LaunchTemplate: &ec2.SpotInstanceRequestLaunchTemplateArgs{
Id: pulumi.String("string"),
Name: pulumi.String("string"),
Version: pulumi.String("string"),
},
MaintenanceOptions: &ec2.SpotInstanceRequestMaintenanceOptionsArgs{
AutoRecovery: pulumi.String("string"),
},
MetadataOptions: &ec2.SpotInstanceRequestMetadataOptionsArgs{
HttpEndpoint: pulumi.String("string"),
HttpProtocolIpv6: pulumi.String("string"),
HttpPutResponseHopLimit: pulumi.Int(0),
HttpTokens: pulumi.String("string"),
InstanceMetadataTags: pulumi.String("string"),
},
Monitoring: pulumi.Bool(false),
NetworkInterfaces: ec2.SpotInstanceRequestNetworkInterfaceArray{
&ec2.SpotInstanceRequestNetworkInterfaceArgs{
DeviceIndex: pulumi.Int(0),
NetworkInterfaceId: pulumi.String("string"),
DeleteOnTermination: pulumi.Bool(false),
NetworkCardIndex: pulumi.Int(0),
},
},
PlacementGroup: pulumi.String("string"),
PlacementPartitionNumber: pulumi.Int(0),
PrivateDnsNameOptions: &ec2.SpotInstanceRequestPrivateDnsNameOptionsArgs{
EnableResourceNameDnsARecord: pulumi.Bool(false),
EnableResourceNameDnsAaaaRecord: pulumi.Bool(false),
HostnameType: pulumi.String("string"),
},
PrivateIp: pulumi.String("string"),
RootBlockDevice: &ec2.SpotInstanceRequestRootBlockDeviceArgs{
DeleteOnTermination: pulumi.Bool(false),
DeviceName: pulumi.String("string"),
Encrypted: pulumi.Bool(false),
Iops: pulumi.Int(0),
KmsKeyId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TagsAll: pulumi.StringMap{
"string": pulumi.String("string"),
},
Throughput: pulumi.Int(0),
VolumeId: pulumi.String("string"),
VolumeSize: pulumi.Int(0),
VolumeType: pulumi.String("string"),
},
SecondaryPrivateIps: pulumi.StringArray{
pulumi.String("string"),
},
SecurityGroups: pulumi.StringArray{
pulumi.String("string"),
},
SourceDestCheck: pulumi.Bool(false),
SpotPrice: pulumi.String("string"),
SpotType: pulumi.String("string"),
SubnetId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Tenancy: pulumi.String("string"),
UserData: pulumi.String("string"),
UserDataBase64: pulumi.String("string"),
UserDataReplaceOnChange: pulumi.Bool(false),
ValidFrom: pulumi.String("string"),
ValidUntil: pulumi.String("string"),
VolumeTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
VpcSecurityGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
WaitForFulfillment: pulumi.Bool(false),
})
var spotInstanceRequestResource = new SpotInstanceRequest("spotInstanceRequestResource", SpotInstanceRequestArgs.builder()
.ami("string")
.associatePublicIpAddress(false)
.availabilityZone("string")
.blockDurationMinutes(0)
.capacityReservationSpecification(SpotInstanceRequestCapacityReservationSpecificationArgs.builder()
.capacityReservationPreference("string")
.capacityReservationTarget(SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetArgs.builder()
.capacityReservationId("string")
.capacityReservationResourceGroupArn("string")
.build())
.build())
.cpuOptions(SpotInstanceRequestCpuOptionsArgs.builder()
.amdSevSnp("string")
.coreCount(0)
.threadsPerCore(0)
.build())
.creditSpecification(SpotInstanceRequestCreditSpecificationArgs.builder()
.cpuCredits("string")
.build())
.disableApiStop(false)
.disableApiTermination(false)
.ebsBlockDevices(SpotInstanceRequestEbsBlockDeviceArgs.builder()
.deviceName("string")
.deleteOnTermination(false)
.encrypted(false)
.iops(0)
.kmsKeyId("string")
.snapshotId("string")
.tags(Map.of("string", "string"))
.tagsAll(Map.of("string", "string"))
.throughput(0)
.volumeId("string")
.volumeSize(0)
.volumeType("string")
.build())
.ebsOptimized(false)
.enclaveOptions(SpotInstanceRequestEnclaveOptionsArgs.builder()
.enabled(false)
.build())
.ephemeralBlockDevices(SpotInstanceRequestEphemeralBlockDeviceArgs.builder()
.deviceName("string")
.noDevice(false)
.virtualName("string")
.build())
.getPasswordData(false)
.hibernation(false)
.hostId("string")
.hostResourceGroupArn("string")
.iamInstanceProfile("string")
.instanceInitiatedShutdownBehavior("string")
.instanceInterruptionBehavior("string")
.instanceType("string")
.ipv6AddressCount(0)
.ipv6Addresses("string")
.keyName("string")
.launchGroup("string")
.launchTemplate(SpotInstanceRequestLaunchTemplateArgs.builder()
.id("string")
.name("string")
.version("string")
.build())
.maintenanceOptions(SpotInstanceRequestMaintenanceOptionsArgs.builder()
.autoRecovery("string")
.build())
.metadataOptions(SpotInstanceRequestMetadataOptionsArgs.builder()
.httpEndpoint("string")
.httpProtocolIpv6("string")
.httpPutResponseHopLimit(0)
.httpTokens("string")
.instanceMetadataTags("string")
.build())
.monitoring(false)
.networkInterfaces(SpotInstanceRequestNetworkInterfaceArgs.builder()
.deviceIndex(0)
.networkInterfaceId("string")
.deleteOnTermination(false)
.networkCardIndex(0)
.build())
.placementGroup("string")
.placementPartitionNumber(0)
.privateDnsNameOptions(SpotInstanceRequestPrivateDnsNameOptionsArgs.builder()
.enableResourceNameDnsARecord(false)
.enableResourceNameDnsAaaaRecord(false)
.hostnameType("string")
.build())
.privateIp("string")
.rootBlockDevice(SpotInstanceRequestRootBlockDeviceArgs.builder()
.deleteOnTermination(false)
.deviceName("string")
.encrypted(false)
.iops(0)
.kmsKeyId("string")
.tags(Map.of("string", "string"))
.tagsAll(Map.of("string", "string"))
.throughput(0)
.volumeId("string")
.volumeSize(0)
.volumeType("string")
.build())
.secondaryPrivateIps("string")
.securityGroups("string")
.sourceDestCheck(false)
.spotPrice("string")
.spotType("string")
.subnetId("string")
.tags(Map.of("string", "string"))
.tenancy("string")
.userData("string")
.userDataBase64("string")
.userDataReplaceOnChange(false)
.validFrom("string")
.validUntil("string")
.volumeTags(Map.of("string", "string"))
.vpcSecurityGroupIds("string")
.waitForFulfillment(false)
.build());
spot_instance_request_resource = aws.ec2.SpotInstanceRequest("spotInstanceRequestResource",
ami="string",
associate_public_ip_address=False,
availability_zone="string",
block_duration_minutes=0,
capacity_reservation_specification={
"capacity_reservation_preference": "string",
"capacity_reservation_target": {
"capacity_reservation_id": "string",
"capacity_reservation_resource_group_arn": "string",
},
},
cpu_options={
"amd_sev_snp": "string",
"core_count": 0,
"threads_per_core": 0,
},
credit_specification={
"cpu_credits": "string",
},
disable_api_stop=False,
disable_api_termination=False,
ebs_block_devices=[{
"device_name": "string",
"delete_on_termination": False,
"encrypted": False,
"iops": 0,
"kms_key_id": "string",
"snapshot_id": "string",
"tags": {
"string": "string",
},
"tags_all": {
"string": "string",
},
"throughput": 0,
"volume_id": "string",
"volume_size": 0,
"volume_type": "string",
}],
ebs_optimized=False,
enclave_options={
"enabled": False,
},
ephemeral_block_devices=[{
"device_name": "string",
"no_device": False,
"virtual_name": "string",
}],
get_password_data=False,
hibernation=False,
host_id="string",
host_resource_group_arn="string",
iam_instance_profile="string",
instance_initiated_shutdown_behavior="string",
instance_interruption_behavior="string",
instance_type="string",
ipv6_address_count=0,
ipv6_addresses=["string"],
key_name="string",
launch_group="string",
launch_template={
"id": "string",
"name": "string",
"version": "string",
},
maintenance_options={
"auto_recovery": "string",
},
metadata_options={
"http_endpoint": "string",
"http_protocol_ipv6": "string",
"http_put_response_hop_limit": 0,
"http_tokens": "string",
"instance_metadata_tags": "string",
},
monitoring=False,
network_interfaces=[{
"device_index": 0,
"network_interface_id": "string",
"delete_on_termination": False,
"network_card_index": 0,
}],
placement_group="string",
placement_partition_number=0,
private_dns_name_options={
"enable_resource_name_dns_a_record": False,
"enable_resource_name_dns_aaaa_record": False,
"hostname_type": "string",
},
private_ip="string",
root_block_device={
"delete_on_termination": False,
"device_name": "string",
"encrypted": False,
"iops": 0,
"kms_key_id": "string",
"tags": {
"string": "string",
},
"tags_all": {
"string": "string",
},
"throughput": 0,
"volume_id": "string",
"volume_size": 0,
"volume_type": "string",
},
secondary_private_ips=["string"],
security_groups=["string"],
source_dest_check=False,
spot_price="string",
spot_type="string",
subnet_id="string",
tags={
"string": "string",
},
tenancy="string",
user_data="string",
user_data_base64="string",
user_data_replace_on_change=False,
valid_from="string",
valid_until="string",
volume_tags={
"string": "string",
},
vpc_security_group_ids=["string"],
wait_for_fulfillment=False)
const spotInstanceRequestResource = new aws.ec2.SpotInstanceRequest("spotInstanceRequestResource", {
ami: "string",
associatePublicIpAddress: false,
availabilityZone: "string",
blockDurationMinutes: 0,
capacityReservationSpecification: {
capacityReservationPreference: "string",
capacityReservationTarget: {
capacityReservationId: "string",
capacityReservationResourceGroupArn: "string",
},
},
cpuOptions: {
amdSevSnp: "string",
coreCount: 0,
threadsPerCore: 0,
},
creditSpecification: {
cpuCredits: "string",
},
disableApiStop: false,
disableApiTermination: false,
ebsBlockDevices: [{
deviceName: "string",
deleteOnTermination: false,
encrypted: false,
iops: 0,
kmsKeyId: "string",
snapshotId: "string",
tags: {
string: "string",
},
tagsAll: {
string: "string",
},
throughput: 0,
volumeId: "string",
volumeSize: 0,
volumeType: "string",
}],
ebsOptimized: false,
enclaveOptions: {
enabled: false,
},
ephemeralBlockDevices: [{
deviceName: "string",
noDevice: false,
virtualName: "string",
}],
getPasswordData: false,
hibernation: false,
hostId: "string",
hostResourceGroupArn: "string",
iamInstanceProfile: "string",
instanceInitiatedShutdownBehavior: "string",
instanceInterruptionBehavior: "string",
instanceType: "string",
ipv6AddressCount: 0,
ipv6Addresses: ["string"],
keyName: "string",
launchGroup: "string",
launchTemplate: {
id: "string",
name: "string",
version: "string",
},
maintenanceOptions: {
autoRecovery: "string",
},
metadataOptions: {
httpEndpoint: "string",
httpProtocolIpv6: "string",
httpPutResponseHopLimit: 0,
httpTokens: "string",
instanceMetadataTags: "string",
},
monitoring: false,
networkInterfaces: [{
deviceIndex: 0,
networkInterfaceId: "string",
deleteOnTermination: false,
networkCardIndex: 0,
}],
placementGroup: "string",
placementPartitionNumber: 0,
privateDnsNameOptions: {
enableResourceNameDnsARecord: false,
enableResourceNameDnsAaaaRecord: false,
hostnameType: "string",
},
privateIp: "string",
rootBlockDevice: {
deleteOnTermination: false,
deviceName: "string",
encrypted: false,
iops: 0,
kmsKeyId: "string",
tags: {
string: "string",
},
tagsAll: {
string: "string",
},
throughput: 0,
volumeId: "string",
volumeSize: 0,
volumeType: "string",
},
secondaryPrivateIps: ["string"],
securityGroups: ["string"],
sourceDestCheck: false,
spotPrice: "string",
spotType: "string",
subnetId: "string",
tags: {
string: "string",
},
tenancy: "string",
userData: "string",
userDataBase64: "string",
userDataReplaceOnChange: false,
validFrom: "string",
validUntil: "string",
volumeTags: {
string: "string",
},
vpcSecurityGroupIds: ["string"],
waitForFulfillment: false,
});
type: aws:ec2:SpotInstanceRequest
properties:
ami: string
associatePublicIpAddress: false
availabilityZone: string
blockDurationMinutes: 0
capacityReservationSpecification:
capacityReservationPreference: string
capacityReservationTarget:
capacityReservationId: string
capacityReservationResourceGroupArn: string
cpuOptions:
amdSevSnp: string
coreCount: 0
threadsPerCore: 0
creditSpecification:
cpuCredits: string
disableApiStop: false
disableApiTermination: false
ebsBlockDevices:
- deleteOnTermination: false
deviceName: string
encrypted: false
iops: 0
kmsKeyId: string
snapshotId: string
tags:
string: string
tagsAll:
string: string
throughput: 0
volumeId: string
volumeSize: 0
volumeType: string
ebsOptimized: false
enclaveOptions:
enabled: false
ephemeralBlockDevices:
- deviceName: string
noDevice: false
virtualName: string
getPasswordData: false
hibernation: false
hostId: string
hostResourceGroupArn: string
iamInstanceProfile: string
instanceInitiatedShutdownBehavior: string
instanceInterruptionBehavior: string
instanceType: string
ipv6AddressCount: 0
ipv6Addresses:
- string
keyName: string
launchGroup: string
launchTemplate:
id: string
name: string
version: string
maintenanceOptions:
autoRecovery: string
metadataOptions:
httpEndpoint: string
httpProtocolIpv6: string
httpPutResponseHopLimit: 0
httpTokens: string
instanceMetadataTags: string
monitoring: false
networkInterfaces:
- deleteOnTermination: false
deviceIndex: 0
networkCardIndex: 0
networkInterfaceId: string
placementGroup: string
placementPartitionNumber: 0
privateDnsNameOptions:
enableResourceNameDnsARecord: false
enableResourceNameDnsAaaaRecord: false
hostnameType: string
privateIp: string
rootBlockDevice:
deleteOnTermination: false
deviceName: string
encrypted: false
iops: 0
kmsKeyId: string
tags:
string: string
tagsAll:
string: string
throughput: 0
volumeId: string
volumeSize: 0
volumeType: string
secondaryPrivateIps:
- string
securityGroups:
- string
sourceDestCheck: false
spotPrice: string
spotType: string
subnetId: string
tags:
string: string
tenancy: string
userData: string
userDataBase64: string
userDataReplaceOnChange: false
validFrom: string
validUntil: string
volumeTags:
string: string
vpcSecurityGroupIds:
- string
waitForFulfillment: false
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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, settingami
will override the AMI specified in the Launch Template. - Associate
Public boolIp Address - Whether to associate a public IP address with an instance in a VPC.
- Availability
Zone string - AZ to start the instance in.
- Block
Duration intMinutes - 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 SpotSpecification Instance Request Capacity Reservation Specification Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
NOTE: Changing
cpu_core_count
and/orcpu_threads_per_core
will cause the resource to be destroyed and re-created.- Cpu
Core intCount - 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.
- Cpu
Options SpotInstance Request Cpu Options - The CPU options for the instance. See CPU Options below for more details.
- Cpu
Threads intPer Core - If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
- Credit
Specification SpotInstance Request Credit Specification - 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 boolStop - If true, enables EC2 Instance Stop Protection.
- Disable
Api boolTermination - If true, enables EC2 Instance Termination Protection.
- Ebs
Block List<SpotDevices Instance Request Ebs Block Device> - 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 SpotInstance Request Enclave Options - Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
- Ephemeral
Block List<SpotDevices Instance Request Ephemeral Block Device> - 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 boolData - 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 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.
- Host
Resource stringGroup Arn - ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the
tenancy
parameter or set it tohost
. - Iam
Instance stringProfile - 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 stringShutdown Behavior - Shutdown behavior for the instance. Amazon defaults this to
stop
for EBS-backed instances andterminate
for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information. - Instance
Interruption stringBehavior - Indicates Spot instance behavior when it is interrupted. Valid values are
terminate
,stop
, orhibernate
. Default value isterminate
. - Instance
Type 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, settinginstance_type
will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance. - Ipv6Address
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.
- Ipv6Addresses List<string>
- Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
- Key
Name string - Key name of the Key Pair to use for the instance; which can be managed using the
aws.ec2.KeyPair
resource. - Launch
Group 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.
- Launch
Template SpotInstance Request Launch Template - 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 SpotInstance Request Maintenance Options - Maintenance and recovery options for the instance. See Maintenance Options below for more details.
- Metadata
Options SpotInstance Request Metadata Options - 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 List<SpotInstance Request Network Interface> - Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- Placement
Group string - Placement Group to start the instance in.
- Placement
Partition intNumber - Number of the partition the instance is in. Valid only if the
aws.ec2.PlacementGroup
resource'sstrategy
argument is set to"partition"
. - Private
Dns SpotName Options Instance Request Private Dns Name Options - Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
- Private
Ip string - Private IP address to associate with the instance in a VPC.
- Root
Block SpotDevice Instance Request Root Block Device - 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 List<string>Ips - 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 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.- Source
Dest boolCheck - 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 string - The maximum price to request on the spot market.
- Spot
Type string - If set to
one-time
, after the instance is terminated, the spot request will be closed. - Subnet
Id string - VPC Subnet ID to launch in.
- 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. Thehost
tenancy is not supported for the import-instance command. Valid values aredefault
,dedicated
, andhost
. - User
Data 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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - User
Data stringBase64 - Can be used instead of
user_data
to pass base64-encoded binary data directly. Use this instead ofuser_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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - User
Data boolReplace On Change - When used in combination with
user_data
oruser_data_base64
will trigger a destroy and recreate when set totrue
. Defaults tofalse
if not set. - Valid
From 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.
- Valid
Until 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.
- 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 theaws.ec2.Instance
configuration, such as usingtags
in anaws.ebs.Volume
resource attached viaaws.ec2.VolumeAttachment
. Doing so will result in resource cycling and inconsistent behavior.- Vpc
Security List<string>Group Ids - List of security group IDs to associate with.
- Wait
For boolFulfillment - 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, settingami
will override the AMI specified in the Launch Template. - Associate
Public boolIp Address - Whether to associate a public IP address with an instance in a VPC.
- Availability
Zone string - AZ to start the instance in.
- Block
Duration intMinutes - 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 SpotSpecification Instance Request Capacity Reservation Specification Args Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
NOTE: Changing
cpu_core_count
and/orcpu_threads_per_core
will cause the resource to be destroyed and re-created.- Cpu
Core intCount - 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.
- Cpu
Options SpotInstance Request Cpu Options Args - The CPU options for the instance. See CPU Options below for more details.
- Cpu
Threads intPer Core - If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
- Credit
Specification SpotInstance Request Credit Specification Args - 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 boolStop - If true, enables EC2 Instance Stop Protection.
- Disable
Api boolTermination - If true, enables EC2 Instance Termination Protection.
- Ebs
Block []SpotDevices Instance Request Ebs Block Device Args - 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 SpotInstance Request Enclave Options Args - Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
- Ephemeral
Block []SpotDevices Instance Request Ephemeral Block Device Args - 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 boolData - 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 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.
- Host
Resource stringGroup Arn - ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the
tenancy
parameter or set it tohost
. - Iam
Instance stringProfile - 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 stringShutdown Behavior - Shutdown behavior for the instance. Amazon defaults this to
stop
for EBS-backed instances andterminate
for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information. - Instance
Interruption stringBehavior - Indicates Spot instance behavior when it is interrupted. Valid values are
terminate
,stop
, orhibernate
. Default value isterminate
. - Instance
Type 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, settinginstance_type
will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance. - Ipv6Address
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.
- Ipv6Addresses []string
- Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
- Key
Name string - Key name of the Key Pair to use for the instance; which can be managed using the
aws.ec2.KeyPair
resource. - Launch
Group 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.
- Launch
Template SpotInstance Request Launch Template Args - 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 SpotInstance Request Maintenance Options Args - Maintenance and recovery options for the instance. See Maintenance Options below for more details.
- Metadata
Options SpotInstance Request Metadata Options Args - 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 []SpotInstance Request Network Interface Args - Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- Placement
Group string - Placement Group to start the instance in.
- Placement
Partition intNumber - Number of the partition the instance is in. Valid only if the
aws.ec2.PlacementGroup
resource'sstrategy
argument is set to"partition"
. - Private
Dns SpotName Options Instance Request Private Dns Name Options Args - Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
- Private
Ip string - Private IP address to associate with the instance in a VPC.
- Root
Block SpotDevice Instance Request Root Block Device Args - 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 []stringIps - 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 []string 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 boolCheck - 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 string - The maximum price to request on the spot market.
- Spot
Type string - If set to
one-time
, after the instance is terminated, the spot request will be closed. - Subnet
Id string - VPC Subnet ID to launch in.
- 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. Thehost
tenancy is not supported for the import-instance command. Valid values aredefault
,dedicated
, andhost
. - User
Data 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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - User
Data stringBase64 - Can be used instead of
user_data
to pass base64-encoded binary data directly. Use this instead ofuser_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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - User
Data boolReplace On Change - When used in combination with
user_data
oruser_data_base64
will trigger a destroy and recreate when set totrue
. Defaults tofalse
if not set. - Valid
From 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.
- Valid
Until 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.
- 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 theaws.ec2.Instance
configuration, such as usingtags
in anaws.ebs.Volume
resource attached viaaws.ec2.VolumeAttachment
. Doing so will result in resource cycling and inconsistent behavior.- Vpc
Security []stringGroup Ids - List of security group IDs to associate with.
- Wait
For boolFulfillment - 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, settingami
will override the AMI specified in the Launch Template. - associate
Public BooleanIp Address - Whether to associate a public IP address with an instance in a VPC.
- availability
Zone String - AZ to start the instance in.
- block
Duration IntegerMinutes - 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 SpotSpecification Instance Request Capacity Reservation Specification Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
NOTE: Changing
cpu_core_count
and/orcpu_threads_per_core
will cause the resource to be destroyed and re-created.- cpu
Core IntegerCount - 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.
- cpu
Options SpotInstance Request Cpu Options - The CPU options for the instance. See CPU Options below for more details.
- cpu
Threads IntegerPer Core - If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
- credit
Specification SpotInstance Request Credit Specification - 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 BooleanStop - If true, enables EC2 Instance Stop Protection.
- disable
Api BooleanTermination - If true, enables EC2 Instance Termination Protection.
- ebs
Block List<SpotDevices Instance Request Ebs Block Device> - 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 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.
- enclave
Options SpotInstance Request Enclave Options - Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
- ephemeral
Block List<SpotDevices Instance Request Ephemeral Block Device> - 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 BooleanData - 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.
- host
Id 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.
- host
Resource StringGroup Arn - ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the
tenancy
parameter or set it tohost
. - iam
Instance StringProfile - 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 StringShutdown Behavior - Shutdown behavior for the instance. Amazon defaults this to
stop
for EBS-backed instances andterminate
for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information. - instance
Interruption StringBehavior - Indicates Spot instance behavior when it is interrupted. Valid values are
terminate
,stop
, orhibernate
. Default value isterminate
. - instance
Type 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, settinginstance_type
will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance. - ipv6Address
Count 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
- key
Name String - Key name of the Key Pair to use for the instance; which can be managed using the
aws.ec2.KeyPair
resource. - launch
Group 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.
- launch
Template SpotInstance Request Launch Template - 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 SpotInstance Request Maintenance Options - Maintenance and recovery options for the instance. See Maintenance Options below for more details.
- metadata
Options SpotInstance Request Metadata Options - 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)
- network
Interfaces List<SpotInstance Request Network Interface> - Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- placement
Group String - Placement Group to start the instance in.
- placement
Partition IntegerNumber - Number of the partition the instance is in. Valid only if the
aws.ec2.PlacementGroup
resource'sstrategy
argument is set to"partition"
. - private
Dns SpotName Options Instance Request Private Dns Name Options - Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
- private
Ip String - Private IP address to associate with the instance in a VPC.
- root
Block SpotDevice Instance Request Root Block Device - 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 List<String>Ips - 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 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.- source
Dest BooleanCheck - 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 String - The maximum price to request on the spot market.
- spot
Type String - If set to
one-time
, after the instance is terminated, the spot request will be closed. - subnet
Id String - VPC Subnet ID to launch in.
- 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. Thehost
tenancy is not supported for the import-instance command. Valid values aredefault
,dedicated
, andhost
. - user
Data 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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user
Data StringBase64 - Can be used instead of
user_data
to pass base64-encoded binary data directly. Use this instead ofuser_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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user
Data BooleanReplace On Change - When used in combination with
user_data
oruser_data_base64
will trigger a destroy and recreate when set totrue
. Defaults tofalse
if not set. - valid
From 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.
- valid
Until 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.
- 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 theaws.ec2.Instance
configuration, such as usingtags
in anaws.ebs.Volume
resource attached viaaws.ec2.VolumeAttachment
. Doing so will result in resource cycling and inconsistent behavior.- vpc
Security List<String>Group Ids - List of security group IDs to associate with.
- wait
For BooleanFulfillment - 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, settingami
will override the AMI specified in the Launch Template. - associate
Public booleanIp Address - Whether to associate a public IP address with an instance in a VPC.
- availability
Zone string - AZ to start the instance in.
- block
Duration numberMinutes - 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 SpotSpecification Instance Request Capacity Reservation Specification Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
NOTE: Changing
cpu_core_count
and/orcpu_threads_per_core
will cause the resource to be destroyed and re-created.- cpu
Core numberCount - 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.
- cpu
Options SpotInstance Request Cpu Options - The CPU options for the instance. See CPU Options below for more details.
- cpu
Threads numberPer Core - If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
- credit
Specification SpotInstance Request Credit Specification - 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 booleanStop - If true, enables EC2 Instance Stop Protection.
- disable
Api booleanTermination - If true, enables EC2 Instance Termination Protection.
- ebs
Block SpotDevices Instance Request Ebs Block Device[] - 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 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.
- enclave
Options SpotInstance Request Enclave Options - Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
- ephemeral
Block SpotDevices Instance Request Ephemeral Block Device[] - 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 booleanData - 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.
- host
Id 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.
- host
Resource stringGroup Arn - ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the
tenancy
parameter or set it tohost
. - iam
Instance stringProfile - 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 stringShutdown Behavior - Shutdown behavior for the instance. Amazon defaults this to
stop
for EBS-backed instances andterminate
for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information. - instance
Interruption stringBehavior - Indicates Spot instance behavior when it is interrupted. Valid values are
terminate
,stop
, orhibernate
. Default value isterminate
. - instance
Type 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, settinginstance_type
will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance. - ipv6Address
Count 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
- key
Name string - Key name of the Key Pair to use for the instance; which can be managed using the
aws.ec2.KeyPair
resource. - launch
Group 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.
- launch
Template SpotInstance Request Launch Template - 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 SpotInstance Request Maintenance Options - Maintenance and recovery options for the instance. See Maintenance Options below for more details.
- metadata
Options SpotInstance Request Metadata Options - 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)
- network
Interfaces SpotInstance Request Network Interface[] - Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- placement
Group string - Placement Group to start the instance in.
- placement
Partition numberNumber - Number of the partition the instance is in. Valid only if the
aws.ec2.PlacementGroup
resource'sstrategy
argument is set to"partition"
. - private
Dns SpotName Options Instance Request Private Dns Name Options - Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
- private
Ip string - Private IP address to associate with the instance in a VPC.
- root
Block SpotDevice Instance Request Root Block Device - 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 string[]Ips - 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 string[] 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 booleanCheck - 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 string - The maximum price to request on the spot market.
- spot
Type string - If set to
one-time
, after the instance is terminated, the spot request will be closed. - subnet
Id string - VPC Subnet ID to launch in.
- {[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. Thehost
tenancy is not supported for the import-instance command. Valid values aredefault
,dedicated
, andhost
. - user
Data 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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user
Data stringBase64 - Can be used instead of
user_data
to pass base64-encoded binary data directly. Use this instead ofuser_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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user
Data booleanReplace On Change - When used in combination with
user_data
oruser_data_base64
will trigger a destroy and recreate when set totrue
. Defaults tofalse
if not set. - valid
From 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.
- valid
Until 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.
- {[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 theaws.ec2.Instance
configuration, such as usingtags
in anaws.ebs.Volume
resource attached viaaws.ec2.VolumeAttachment
. Doing so will result in resource cycling and inconsistent behavior.- vpc
Security string[]Group Ids - List of security group IDs to associate with.
- wait
For booleanFulfillment - 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, settingami
will override the AMI specified in the Launch Template. - associate_
public_ boolip_ address - Whether to associate a public IP address with an instance in a VPC.
- availability_
zone str - AZ to start the instance in.
- block_
duration_ intminutes - 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_ Spotspecification Instance Request Capacity Reservation Specification Args Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
NOTE: Changing
cpu_core_count
and/orcpu_threads_per_core
will cause the resource to be destroyed and re-created.- cpu_
core_ intcount - 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.
- cpu_
options SpotInstance Request Cpu Options Args - The CPU options for the instance. See CPU Options below for more details.
- cpu_
threads_ intper_ core - If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
- credit_
specification SpotInstance Request Credit Specification Args - 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_ boolstop - If true, enables EC2 Instance Stop Protection.
- disable_
api_ booltermination - If true, enables EC2 Instance Termination Protection.
- ebs_
block_ Sequence[Spotdevices Instance Request Ebs Block Device Args] - 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 SpotInstance Request Enclave Options Args - Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
- ephemeral_
block_ Sequence[Spotdevices Instance Request Ephemeral Block Device Args] - 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_ booldata - 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_ strgroup_ arn - ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the
tenancy
parameter or set it tohost
. - iam_
instance_ strprofile - 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_ strshutdown_ behavior - Shutdown behavior for the instance. Amazon defaults this to
stop
for EBS-backed instances andterminate
for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information. - instance_
interruption_ strbehavior - Indicates Spot instance behavior when it is interrupted. Valid values are
terminate
,stop
, orhibernate
. Default value isterminate
. - 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, settinginstance_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_ intcount - 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 SpotInstance Request Launch Template Args - 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 SpotInstance Request Maintenance Options Args - Maintenance and recovery options for the instance. See Maintenance Options below for more details.
- metadata_
options SpotInstance Request Metadata Options Args - 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[SpotInstance Request Network Interface Args] - 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_ intnumber - Number of the partition the instance is in. Valid only if the
aws.ec2.PlacementGroup
resource'sstrategy
argument is set to"partition"
. - private_
dns_ Spotname_ options Instance Request Private Dns Name Options Args - 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_ Spotdevice Instance Request Root Block Device Args - 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_ Sequence[str]ips - 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_ boolcheck - 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.
- 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. Thehost
tenancy is not supported for the import-instance command. Valid values aredefault
,dedicated
, andhost
. - 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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user_
data_ strbase64 - Can be used instead of
user_data
to pass base64-encoded binary data directly. Use this instead ofuser_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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user_
data_ boolreplace_ on_ change - When used in combination with
user_data
oruser_data_base64
will trigger a destroy and recreate when set totrue
. Defaults tofalse
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.
- 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 theaws.ec2.Instance
configuration, such as usingtags
in anaws.ebs.Volume
resource attached viaaws.ec2.VolumeAttachment
. Doing so will result in resource cycling and inconsistent behavior.- vpc_
security_ Sequence[str]group_ ids - List of security group IDs to associate with.
- wait_
for_ boolfulfillment - 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, settingami
will override the AMI specified in the Launch Template. - associate
Public BooleanIp Address - Whether to associate a public IP address with an instance in a VPC.
- availability
Zone String - AZ to start the instance in.
- block
Duration NumberMinutes - 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 Property MapSpecification Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
NOTE: Changing
cpu_core_count
and/orcpu_threads_per_core
will cause the resource to be destroyed and re-created.- cpu
Core NumberCount - 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.
- cpu
Options Property Map - The CPU options for the instance. See CPU Options below for more details.
- cpu
Threads NumberPer Core - If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
- credit
Specification 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.
- disable
Api BooleanStop - If true, enables EC2 Instance Stop Protection.
- disable
Api BooleanTermination - If true, enables EC2 Instance Termination Protection.
- ebs
Block List<Property Map>Devices - 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 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.
- enclave
Options Property Map - Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
- ephemeral
Block List<Property Map>Devices - 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 BooleanData - 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.
- host
Id 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.
- host
Resource StringGroup Arn - ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the
tenancy
parameter or set it tohost
. - iam
Instance StringProfile - 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 StringShutdown Behavior - Shutdown behavior for the instance. Amazon defaults this to
stop
for EBS-backed instances andterminate
for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information. - instance
Interruption StringBehavior - Indicates Spot instance behavior when it is interrupted. Valid values are
terminate
,stop
, orhibernate
. Default value isterminate
. - instance
Type 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, settinginstance_type
will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance. - ipv6Address
Count 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
- key
Name String - Key name of the Key Pair to use for the instance; which can be managed using the
aws.ec2.KeyPair
resource. - launch
Group 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.
- launch
Template 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.
- maintenance
Options Property Map - Maintenance and recovery options for the instance. See Maintenance Options below for more details.
- metadata
Options 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)
- network
Interfaces List<Property Map> - Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- placement
Group String - Placement Group to start the instance in.
- placement
Partition NumberNumber - Number of the partition the instance is in. Valid only if the
aws.ec2.PlacementGroup
resource'sstrategy
argument is set to"partition"
. - private
Dns Property MapName Options - Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
- private
Ip String - Private IP address to associate with the instance in a VPC.
- root
Block Property MapDevice - 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 List<String>Ips - 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 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.- source
Dest BooleanCheck - 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 String - The maximum price to request on the spot market.
- spot
Type String - If set to
one-time
, after the instance is terminated, the spot request will be closed. - subnet
Id String - VPC Subnet ID to launch in.
- 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. Thehost
tenancy is not supported for the import-instance command. Valid values aredefault
,dedicated
, andhost
. - user
Data 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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user
Data StringBase64 - Can be used instead of
user_data
to pass base64-encoded binary data directly. Use this instead ofuser_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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user
Data BooleanReplace On Change - When used in combination with
user_data
oruser_data_base64
will trigger a destroy and recreate when set totrue
. Defaults tofalse
if not set. - valid
From 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.
- valid
Until 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.
- 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 theaws.ec2.Instance
configuration, such as usingtags
in anaws.ebs.Volume
resource attached viaaws.ec2.VolumeAttachment
. Doing so will result in resource cycling and inconsistent behavior.- vpc
Security List<String>Group Ids - List of security group IDs to associate with.
- wait
For BooleanFulfillment - 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.
- Instance
State string - Outpost
Arn string - Password
Data string - Primary
Network stringInterface Id - Private
Dns 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
- Public
Dns 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
- Public
Ip string - The public IP address assigned to the instance, if applicable.
- Spot
Bid stringStatus - The current bid status of the Spot Instance Request.
- Spot
Instance stringId - The Instance ID (if any) that is currently fulfilling the Spot Instance request.
- Spot
Request stringState - The current request state of the Spot Instance Request.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
State string - Outpost
Arn string - Password
Data string - Primary
Network stringInterface Id - Private
Dns 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
- Public
Dns 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
- Public
Ip string - The public IP address assigned to the instance, if applicable.
- Spot
Bid stringStatus - The current bid status of the Spot Instance Request.
- Spot
Instance stringId - The Instance ID (if any) that is currently fulfilling the Spot Instance request.
- Spot
Request stringState - The current request state of the Spot Instance Request.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- id String
- The provider-assigned unique ID for this managed resource.
- instance
State String - outpost
Arn String - password
Data String - primary
Network StringInterface Id - private
Dns 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
- public
Dns 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
- public
Ip String - The public IP address assigned to the instance, if applicable.
- spot
Bid StringStatus - The current bid status of the Spot Instance Request.
- spot
Instance StringId - The Instance ID (if any) that is currently fulfilling the Spot Instance request.
- spot
Request StringState - The current request state of the Spot Instance Request.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- id string
- The provider-assigned unique ID for this managed resource.
- instance
State string - outpost
Arn string - password
Data string - primary
Network stringInterface Id - private
Dns 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
- public
Dns 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
- public
Ip string - The public IP address assigned to the instance, if applicable.
- spot
Bid stringStatus - The current bid status of the Spot Instance Request.
- spot
Instance stringId - The Instance ID (if any) that is currently fulfilling the Spot Instance request.
- spot
Request stringState - The current request state of the Spot Instance Request.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
state str - outpost_
arn str - password_
data str - primary_
network_ strinterface_ id - 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_ strstatus - The current bid status of the Spot Instance Request.
- spot_
instance_ strid - The Instance ID (if any) that is currently fulfilling the Spot Instance request.
- spot_
request_ strstate - The current request state of the Spot Instance Request.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- id String
- The provider-assigned unique ID for this managed resource.
- instance
State String - outpost
Arn String - password
Data String - primary
Network StringInterface Id - private
Dns 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
- public
Dns 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
- public
Ip String - The public IP address assigned to the instance, if applicable.
- spot
Bid StringStatus - The current bid status of the Spot Instance Request.
- spot
Instance StringId - The Instance ID (if any) that is currently fulfilling the Spot Instance request.
- spot
Request StringState - The current request state of the Spot Instance Request.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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.
- 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, settingami
will override the AMI specified in the Launch Template. - Arn string
- Associate
Public boolIp Address - Whether to associate a public IP address with an instance in a VPC.
- Availability
Zone string - AZ to start the instance in.
- Block
Duration intMinutes - 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 SpotSpecification Instance Request Capacity Reservation Specification Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
NOTE: Changing
cpu_core_count
and/orcpu_threads_per_core
will cause the resource to be destroyed and re-created.- Cpu
Core intCount - 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.
- Cpu
Options SpotInstance Request Cpu Options - The CPU options for the instance. See CPU Options below for more details.
- Cpu
Threads intPer Core - If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
- Credit
Specification SpotInstance Request Credit Specification - 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 boolStop - If true, enables EC2 Instance Stop Protection.
- Disable
Api boolTermination - If true, enables EC2 Instance Termination Protection.
- Ebs
Block List<SpotDevices Instance Request Ebs Block Device> - 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 SpotInstance Request Enclave Options - Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
- Ephemeral
Block List<SpotDevices Instance Request Ephemeral Block Device> - 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 boolData - 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 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.
- Host
Resource stringGroup Arn - ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the
tenancy
parameter or set it tohost
. - Iam
Instance stringProfile - 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 stringShutdown Behavior - Shutdown behavior for the instance. Amazon defaults this to
stop
for EBS-backed instances andterminate
for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information. - Instance
Interruption stringBehavior - Indicates Spot instance behavior when it is interrupted. Valid values are
terminate
,stop
, orhibernate
. Default value isterminate
. - Instance
State string - Instance
Type 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, settinginstance_type
will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance. - Ipv6Address
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.
- Ipv6Addresses List<string>
- Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
- Key
Name string - Key name of the Key Pair to use for the instance; which can be managed using the
aws.ec2.KeyPair
resource. - Launch
Group 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.
- Launch
Template SpotInstance Request Launch Template - 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 SpotInstance Request Maintenance Options - Maintenance and recovery options for the instance. See Maintenance Options below for more details.
- Metadata
Options SpotInstance Request Metadata Options - 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 List<SpotInstance Request Network Interface> - Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- Outpost
Arn string - Password
Data string - Placement
Group string - Placement Group to start the instance in.
- Placement
Partition intNumber - Number of the partition the instance is in. Valid only if the
aws.ec2.PlacementGroup
resource'sstrategy
argument is set to"partition"
. - Primary
Network stringInterface Id - Private
Dns 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
- Private
Dns SpotName Options Instance Request Private Dns Name Options - Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
- Private
Ip string - Private IP address to associate with the instance in a VPC.
- Public
Dns 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
- Public
Ip string - The public IP address assigned to the instance, if applicable.
- Root
Block SpotDevice Instance Request Root Block Device - 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 List<string>Ips - 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 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.- Source
Dest boolCheck - 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 stringStatus - The current bid status of the Spot Instance Request.
- Spot
Instance stringId - The Instance ID (if any) that is currently fulfilling the Spot Instance request.
- Spot
Price string - The maximum price to request on the spot market.
- Spot
Request stringState - The current request state of the Spot Instance Request.
- Spot
Type string - If set to
one-time
, after the instance is terminated, the spot request will be closed. - Subnet
Id string - VPC Subnet ID to launch in.
- 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. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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. Thehost
tenancy is not supported for the import-instance command. Valid values aredefault
,dedicated
, andhost
. - User
Data 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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - User
Data stringBase64 - Can be used instead of
user_data
to pass base64-encoded binary data directly. Use this instead ofuser_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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - User
Data boolReplace On Change - When used in combination with
user_data
oruser_data_base64
will trigger a destroy and recreate when set totrue
. Defaults tofalse
if not set. - Valid
From 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.
- Valid
Until 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.
- 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 theaws.ec2.Instance
configuration, such as usingtags
in anaws.ebs.Volume
resource attached viaaws.ec2.VolumeAttachment
. Doing so will result in resource cycling and inconsistent behavior.- Vpc
Security List<string>Group Ids - List of security group IDs to associate with.
- Wait
For boolFulfillment - 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, settingami
will override the AMI specified in the Launch Template. - Arn string
- Associate
Public boolIp Address - Whether to associate a public IP address with an instance in a VPC.
- Availability
Zone string - AZ to start the instance in.
- Block
Duration intMinutes - 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 SpotSpecification Instance Request Capacity Reservation Specification Args Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
NOTE: Changing
cpu_core_count
and/orcpu_threads_per_core
will cause the resource to be destroyed and re-created.- Cpu
Core intCount - 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.
- Cpu
Options SpotInstance Request Cpu Options Args - The CPU options for the instance. See CPU Options below for more details.
- Cpu
Threads intPer Core - If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
- Credit
Specification SpotInstance Request Credit Specification Args - 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 boolStop - If true, enables EC2 Instance Stop Protection.
- Disable
Api boolTermination - If true, enables EC2 Instance Termination Protection.
- Ebs
Block []SpotDevices Instance Request Ebs Block Device Args - 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 SpotInstance Request Enclave Options Args - Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
- Ephemeral
Block []SpotDevices Instance Request Ephemeral Block Device Args - 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 boolData - 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 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.
- Host
Resource stringGroup Arn - ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the
tenancy
parameter or set it tohost
. - Iam
Instance stringProfile - 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 stringShutdown Behavior - Shutdown behavior for the instance. Amazon defaults this to
stop
for EBS-backed instances andterminate
for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information. - Instance
Interruption stringBehavior - Indicates Spot instance behavior when it is interrupted. Valid values are
terminate
,stop
, orhibernate
. Default value isterminate
. - Instance
State string - Instance
Type 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, settinginstance_type
will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance. - Ipv6Address
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.
- Ipv6Addresses []string
- Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
- Key
Name string - Key name of the Key Pair to use for the instance; which can be managed using the
aws.ec2.KeyPair
resource. - Launch
Group 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.
- Launch
Template SpotInstance Request Launch Template Args - 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 SpotInstance Request Maintenance Options Args - Maintenance and recovery options for the instance. See Maintenance Options below for more details.
- Metadata
Options SpotInstance Request Metadata Options Args - 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 []SpotInstance Request Network Interface Args - Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- Outpost
Arn string - Password
Data string - Placement
Group string - Placement Group to start the instance in.
- Placement
Partition intNumber - Number of the partition the instance is in. Valid only if the
aws.ec2.PlacementGroup
resource'sstrategy
argument is set to"partition"
. - Primary
Network stringInterface Id - Private
Dns 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
- Private
Dns SpotName Options Instance Request Private Dns Name Options Args - Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
- Private
Ip string - Private IP address to associate with the instance in a VPC.
- Public
Dns 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
- Public
Ip string - The public IP address assigned to the instance, if applicable.
- Root
Block SpotDevice Instance Request Root Block Device Args - 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 []stringIps - 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 []string 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 boolCheck - 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 stringStatus - The current bid status of the Spot Instance Request.
- Spot
Instance stringId - The Instance ID (if any) that is currently fulfilling the Spot Instance request.
- Spot
Price string - The maximum price to request on the spot market.
- Spot
Request stringState - The current request state of the Spot Instance Request.
- Spot
Type string - If set to
one-time
, after the instance is terminated, the spot request will be closed. - Subnet
Id string - VPC Subnet ID to launch in.
- 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. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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. Thehost
tenancy is not supported for the import-instance command. Valid values aredefault
,dedicated
, andhost
. - User
Data 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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - User
Data stringBase64 - Can be used instead of
user_data
to pass base64-encoded binary data directly. Use this instead ofuser_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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - User
Data boolReplace On Change - When used in combination with
user_data
oruser_data_base64
will trigger a destroy and recreate when set totrue
. Defaults tofalse
if not set. - Valid
From 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.
- Valid
Until 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.
- 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 theaws.ec2.Instance
configuration, such as usingtags
in anaws.ebs.Volume
resource attached viaaws.ec2.VolumeAttachment
. Doing so will result in resource cycling and inconsistent behavior.- Vpc
Security []stringGroup Ids - List of security group IDs to associate with.
- Wait
For boolFulfillment - 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, settingami
will override the AMI specified in the Launch Template. - arn String
- associate
Public BooleanIp Address - Whether to associate a public IP address with an instance in a VPC.
- availability
Zone String - AZ to start the instance in.
- block
Duration IntegerMinutes - 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 SpotSpecification Instance Request Capacity Reservation Specification Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
NOTE: Changing
cpu_core_count
and/orcpu_threads_per_core
will cause the resource to be destroyed and re-created.- cpu
Core IntegerCount - 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.
- cpu
Options SpotInstance Request Cpu Options - The CPU options for the instance. See CPU Options below for more details.
- cpu
Threads IntegerPer Core - If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
- credit
Specification SpotInstance Request Credit Specification - 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 BooleanStop - If true, enables EC2 Instance Stop Protection.
- disable
Api BooleanTermination - If true, enables EC2 Instance Termination Protection.
- ebs
Block List<SpotDevices Instance Request Ebs Block Device> - 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 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.
- enclave
Options SpotInstance Request Enclave Options - Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
- ephemeral
Block List<SpotDevices Instance Request Ephemeral Block Device> - 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 BooleanData - 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.
- host
Id 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.
- host
Resource StringGroup Arn - ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the
tenancy
parameter or set it tohost
. - iam
Instance StringProfile - 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 StringShutdown Behavior - Shutdown behavior for the instance. Amazon defaults this to
stop
for EBS-backed instances andterminate
for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information. - instance
Interruption StringBehavior - Indicates Spot instance behavior when it is interrupted. Valid values are
terminate
,stop
, orhibernate
. Default value isterminate
. - instance
State String - instance
Type 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, settinginstance_type
will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance. - ipv6Address
Count 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
- key
Name String - Key name of the Key Pair to use for the instance; which can be managed using the
aws.ec2.KeyPair
resource. - launch
Group 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.
- launch
Template SpotInstance Request Launch Template - 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 SpotInstance Request Maintenance Options - Maintenance and recovery options for the instance. See Maintenance Options below for more details.
- metadata
Options SpotInstance Request Metadata Options - 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)
- network
Interfaces List<SpotInstance Request Network Interface> - Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- outpost
Arn String - password
Data String - placement
Group String - Placement Group to start the instance in.
- placement
Partition IntegerNumber - Number of the partition the instance is in. Valid only if the
aws.ec2.PlacementGroup
resource'sstrategy
argument is set to"partition"
. - primary
Network StringInterface Id - private
Dns 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
- private
Dns SpotName Options Instance Request Private Dns Name Options - Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
- private
Ip String - Private IP address to associate with the instance in a VPC.
- public
Dns 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
- public
Ip String - The public IP address assigned to the instance, if applicable.
- root
Block SpotDevice Instance Request Root Block Device - 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 List<String>Ips - 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 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.- source
Dest BooleanCheck - 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 StringStatus - The current bid status of the Spot Instance Request.
- spot
Instance StringId - The Instance ID (if any) that is currently fulfilling the Spot Instance request.
- spot
Price String - The maximum price to request on the spot market.
- spot
Request StringState - The current request state of the Spot Instance Request.
- spot
Type String - If set to
one-time
, after the instance is terminated, the spot request will be closed. - subnet
Id String - VPC Subnet ID to launch in.
- 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. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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. Thehost
tenancy is not supported for the import-instance command. Valid values aredefault
,dedicated
, andhost
. - user
Data 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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user
Data StringBase64 - Can be used instead of
user_data
to pass base64-encoded binary data directly. Use this instead ofuser_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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user
Data BooleanReplace On Change - When used in combination with
user_data
oruser_data_base64
will trigger a destroy and recreate when set totrue
. Defaults tofalse
if not set. - valid
From 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.
- valid
Until 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.
- 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 theaws.ec2.Instance
configuration, such as usingtags
in anaws.ebs.Volume
resource attached viaaws.ec2.VolumeAttachment
. Doing so will result in resource cycling and inconsistent behavior.- vpc
Security List<String>Group Ids - List of security group IDs to associate with.
- wait
For BooleanFulfillment - 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, settingami
will override the AMI specified in the Launch Template. - arn string
- associate
Public booleanIp Address - Whether to associate a public IP address with an instance in a VPC.
- availability
Zone string - AZ to start the instance in.
- block
Duration numberMinutes - 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 SpotSpecification Instance Request Capacity Reservation Specification Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
NOTE: Changing
cpu_core_count
and/orcpu_threads_per_core
will cause the resource to be destroyed and re-created.- cpu
Core numberCount - 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.
- cpu
Options SpotInstance Request Cpu Options - The CPU options for the instance. See CPU Options below for more details.
- cpu
Threads numberPer Core - If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
- credit
Specification SpotInstance Request Credit Specification - 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 booleanStop - If true, enables EC2 Instance Stop Protection.
- disable
Api booleanTermination - If true, enables EC2 Instance Termination Protection.
- ebs
Block SpotDevices Instance Request Ebs Block Device[] - 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 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.
- enclave
Options SpotInstance Request Enclave Options - Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
- ephemeral
Block SpotDevices Instance Request Ephemeral Block Device[] - 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 booleanData - 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.
- host
Id 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.
- host
Resource stringGroup Arn - ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the
tenancy
parameter or set it tohost
. - iam
Instance stringProfile - 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 stringShutdown Behavior - Shutdown behavior for the instance. Amazon defaults this to
stop
for EBS-backed instances andterminate
for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information. - instance
Interruption stringBehavior - Indicates Spot instance behavior when it is interrupted. Valid values are
terminate
,stop
, orhibernate
. Default value isterminate
. - instance
State string - instance
Type 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, settinginstance_type
will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance. - ipv6Address
Count 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
- key
Name string - Key name of the Key Pair to use for the instance; which can be managed using the
aws.ec2.KeyPair
resource. - launch
Group 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.
- launch
Template SpotInstance Request Launch Template - 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 SpotInstance Request Maintenance Options - Maintenance and recovery options for the instance. See Maintenance Options below for more details.
- metadata
Options SpotInstance Request Metadata Options - 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)
- network
Interfaces SpotInstance Request Network Interface[] - Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- outpost
Arn string - password
Data string - placement
Group string - Placement Group to start the instance in.
- placement
Partition numberNumber - Number of the partition the instance is in. Valid only if the
aws.ec2.PlacementGroup
resource'sstrategy
argument is set to"partition"
. - primary
Network stringInterface Id - private
Dns 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
- private
Dns SpotName Options Instance Request Private Dns Name Options - Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
- private
Ip string - Private IP address to associate with the instance in a VPC.
- public
Dns 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
- public
Ip string - The public IP address assigned to the instance, if applicable.
- root
Block SpotDevice Instance Request Root Block Device - 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 string[]Ips - 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 string[] 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 booleanCheck - 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 stringStatus - The current bid status of the Spot Instance Request.
- spot
Instance stringId - The Instance ID (if any) that is currently fulfilling the Spot Instance request.
- spot
Price string - The maximum price to request on the spot market.
- spot
Request stringState - The current request state of the Spot Instance Request.
- spot
Type string - If set to
one-time
, after the instance is terminated, the spot request will be closed. - subnet
Id string - VPC Subnet ID to launch in.
- {[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. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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. Thehost
tenancy is not supported for the import-instance command. Valid values aredefault
,dedicated
, andhost
. - user
Data 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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user
Data stringBase64 - Can be used instead of
user_data
to pass base64-encoded binary data directly. Use this instead ofuser_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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user
Data booleanReplace On Change - When used in combination with
user_data
oruser_data_base64
will trigger a destroy and recreate when set totrue
. Defaults tofalse
if not set. - valid
From 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.
- valid
Until 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.
- {[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 theaws.ec2.Instance
configuration, such as usingtags
in anaws.ebs.Volume
resource attached viaaws.ec2.VolumeAttachment
. Doing so will result in resource cycling and inconsistent behavior.- vpc
Security string[]Group Ids - List of security group IDs to associate with.
- wait
For booleanFulfillment - 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, settingami
will override the AMI specified in the Launch Template. - arn str
- associate_
public_ boolip_ address - Whether to associate a public IP address with an instance in a VPC.
- availability_
zone str - AZ to start the instance in.
- block_
duration_ intminutes - 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_ Spotspecification Instance Request Capacity Reservation Specification Args Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
NOTE: Changing
cpu_core_count
and/orcpu_threads_per_core
will cause the resource to be destroyed and re-created.- cpu_
core_ intcount - 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.
- cpu_
options SpotInstance Request Cpu Options Args - The CPU options for the instance. See CPU Options below for more details.
- cpu_
threads_ intper_ core - If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
- credit_
specification SpotInstance Request Credit Specification Args - 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_ boolstop - If true, enables EC2 Instance Stop Protection.
- disable_
api_ booltermination - If true, enables EC2 Instance Termination Protection.
- ebs_
block_ Sequence[Spotdevices Instance Request Ebs Block Device Args] - 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 SpotInstance Request Enclave Options Args - Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
- ephemeral_
block_ Sequence[Spotdevices Instance Request Ephemeral Block Device Args] - 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_ booldata - 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_ strgroup_ arn - ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the
tenancy
parameter or set it tohost
. - iam_
instance_ strprofile - 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_ strshutdown_ behavior - Shutdown behavior for the instance. Amazon defaults this to
stop
for EBS-backed instances andterminate
for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information. - instance_
interruption_ strbehavior - Indicates Spot instance behavior when it is interrupted. Valid values are
terminate
,stop
, orhibernate
. Default value isterminate
. - 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, settinginstance_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_ intcount - 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 SpotInstance Request Launch Template Args - 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 SpotInstance Request Maintenance Options Args - Maintenance and recovery options for the instance. See Maintenance Options below for more details.
- metadata_
options SpotInstance Request Metadata Options Args - 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[SpotInstance Request Network Interface Args] - 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_ intnumber - Number of the partition the instance is in. Valid only if the
aws.ec2.PlacementGroup
resource'sstrategy
argument is set to"partition"
. - primary_
network_ strinterface_ id - 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_ Spotname_ options Instance Request Private Dns Name Options Args - 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_ Spotdevice Instance Request Root Block Device Args - 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_ Sequence[str]ips - 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_ boolcheck - 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_ strstatus - The current bid status of the Spot Instance Request.
- spot_
instance_ strid - 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_ strstate - 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.
- 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. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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. Thehost
tenancy is not supported for the import-instance command. Valid values aredefault
,dedicated
, andhost
. - 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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user_
data_ strbase64 - Can be used instead of
user_data
to pass base64-encoded binary data directly. Use this instead ofuser_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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user_
data_ boolreplace_ on_ change - When used in combination with
user_data
oruser_data_base64
will trigger a destroy and recreate when set totrue
. Defaults tofalse
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.
- 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 theaws.ec2.Instance
configuration, such as usingtags
in anaws.ebs.Volume
resource attached viaaws.ec2.VolumeAttachment
. Doing so will result in resource cycling and inconsistent behavior.- vpc_
security_ Sequence[str]group_ ids - List of security group IDs to associate with.
- wait_
for_ boolfulfillment - 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, settingami
will override the AMI specified in the Launch Template. - arn String
- associate
Public BooleanIp Address - Whether to associate a public IP address with an instance in a VPC.
- availability
Zone String - AZ to start the instance in.
- block
Duration NumberMinutes - 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 Property MapSpecification Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.
NOTE: Changing
cpu_core_count
and/orcpu_threads_per_core
will cause the resource to be destroyed and re-created.- cpu
Core NumberCount - 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.
- cpu
Options Property Map - The CPU options for the instance. See CPU Options below for more details.
- cpu
Threads NumberPer Core - If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.
- credit
Specification 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.
- disable
Api BooleanStop - If true, enables EC2 Instance Stop Protection.
- disable
Api BooleanTermination - If true, enables EC2 Instance Termination Protection.
- ebs
Block List<Property Map>Devices - 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 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.
- enclave
Options Property Map - Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
- ephemeral
Block List<Property Map>Devices - 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 BooleanData - 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.
- host
Id 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.
- host
Resource StringGroup Arn - ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the
tenancy
parameter or set it tohost
. - iam
Instance StringProfile - 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 StringShutdown Behavior - Shutdown behavior for the instance. Amazon defaults this to
stop
for EBS-backed instances andterminate
for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information. - instance
Interruption StringBehavior - Indicates Spot instance behavior when it is interrupted. Valid values are
terminate
,stop
, orhibernate
. Default value isterminate
. - instance
State String - instance
Type 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, settinginstance_type
will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance. - ipv6Address
Count 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
- key
Name String - Key name of the Key Pair to use for the instance; which can be managed using the
aws.ec2.KeyPair
resource. - launch
Group 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.
- launch
Template 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.
- maintenance
Options Property Map - Maintenance and recovery options for the instance. See Maintenance Options below for more details.
- metadata
Options 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)
- network
Interfaces List<Property Map> - Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- outpost
Arn String - password
Data String - placement
Group String - Placement Group to start the instance in.
- placement
Partition NumberNumber - Number of the partition the instance is in. Valid only if the
aws.ec2.PlacementGroup
resource'sstrategy
argument is set to"partition"
. - primary
Network StringInterface Id - private
Dns 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
- private
Dns Property MapName Options - Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
- private
Ip String - Private IP address to associate with the instance in a VPC.
- public
Dns 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
- public
Ip String - The public IP address assigned to the instance, if applicable.
- root
Block Property MapDevice - 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 List<String>Ips - 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 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.- source
Dest BooleanCheck - 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 StringStatus - The current bid status of the Spot Instance Request.
- spot
Instance StringId - The Instance ID (if any) that is currently fulfilling the Spot Instance request.
- spot
Price String - The maximum price to request on the spot market.
- spot
Request StringState - The current request state of the Spot Instance Request.
- spot
Type String - If set to
one-time
, after the instance is terminated, the spot request will be closed. - subnet
Id String - VPC Subnet ID to launch in.
- 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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. Thehost
tenancy is not supported for the import-instance command. Valid values aredefault
,dedicated
, andhost
. - user
Data 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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user
Data StringBase64 - Can be used instead of
user_data
to pass base64-encoded binary data directly. Use this instead ofuser_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 theuser_data_replace_on_change
is set then updates to this field will trigger a destroy and recreate. - user
Data BooleanReplace On Change - When used in combination with
user_data
oruser_data_base64
will trigger a destroy and recreate when set totrue
. Defaults tofalse
if not set. - valid
From 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.
- valid
Until 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.
- 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 theaws.ec2.Instance
configuration, such as usingtags
in anaws.ebs.Volume
resource attached viaaws.ec2.VolumeAttachment
. Doing so will result in resource cycling and inconsistent behavior.- vpc
Security List<String>Group Ids - List of security group IDs to associate with.
- wait
For BooleanFulfillment - 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
- Capacity
Reservation stringPreference - Indicates the instance's Capacity Reservation preferences. Can be
"open"
or"none"
. (Default:"open"
). - Capacity
Reservation SpotTarget Instance Request Capacity Reservation Specification Capacity Reservation Target 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 stringPreference - Indicates the instance's Capacity Reservation preferences. Can be
"open"
or"none"
. (Default:"open"
). - Capacity
Reservation SpotTarget Instance Request Capacity Reservation Specification Capacity Reservation Target 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 StringPreference - Indicates the instance's Capacity Reservation preferences. Can be
"open"
or"none"
. (Default:"open"
). - capacity
Reservation SpotTarget Instance Request Capacity Reservation Specification Capacity Reservation Target 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 stringPreference - Indicates the instance's Capacity Reservation preferences. Can be
"open"
or"none"
. (Default:"open"
). - capacity
Reservation SpotTarget Instance Request Capacity Reservation Specification Capacity Reservation Target 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_ strpreference - Indicates the instance's Capacity Reservation preferences. Can be
"open"
or"none"
. (Default:"open"
). - capacity_
reservation_ Spottarget Instance Request Capacity Reservation Specification Capacity Reservation Target 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 StringPreference - Indicates the instance's Capacity Reservation preferences. Can be
"open"
or"none"
. (Default:"open"
). - capacity
Reservation Property MapTarget 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
- Capacity
Reservation stringId - ID of the Capacity Reservation in which to run the instance.
- Capacity
Reservation stringResource Group Arn - ARN of the Capacity Reservation resource group in which to run the instance.
- Capacity
Reservation stringId - ID of the Capacity Reservation in which to run the instance.
- Capacity
Reservation stringResource Group Arn - ARN of the Capacity Reservation resource group in which to run the instance.
- capacity
Reservation StringId - ID of the Capacity Reservation in which to run the instance.
- capacity
Reservation StringResource Group Arn - ARN of the Capacity Reservation resource group in which to run the instance.
- capacity
Reservation stringId - ID of the Capacity Reservation in which to run the instance.
- capacity
Reservation stringResource Group Arn - ARN of the Capacity Reservation resource group in which to run the instance.
- capacity_
reservation_ strid - ID of the Capacity Reservation in which to run the instance.
- capacity_
reservation_ strresource_ group_ arn - ARN of the Capacity Reservation resource group in which to run the instance.
- capacity
Reservation StringId - ID of the Capacity Reservation in which to run the instance.
- capacity
Reservation StringResource Group Arn - ARN of the Capacity Reservation resource group in which to run the instance.
SpotInstanceRequestCpuOptions, SpotInstanceRequestCpuOptionsArgs
- Amd
Sev stringSnp - 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
anddisabled
. - 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 intCore 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 stringSnp - 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
anddisabled
. - 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 intCore 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 StringSnp - 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
anddisabled
. - core
Count 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.
- threads
Per IntegerCore 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 stringSnp - 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
anddisabled
. - core
Count 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.
- threads
Per numberCore 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_ strsnp - 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
anddisabled
. - 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_ intcore 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 StringSnp - 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
anddisabled
. - core
Count 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.
- threads
Per NumberCore 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
- Cpu
Credits string - Credit option for CPU usage. Valid values include
standard
orunlimited
. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
- Cpu
Credits string - Credit option for CPU usage. Valid values include
standard
orunlimited
. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
- cpu
Credits String - Credit option for CPU usage. Valid values include
standard
orunlimited
. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
- cpu
Credits string - Credit option for CPU usage. Valid values include
standard
orunlimited
. 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
orunlimited
. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
- cpu
Credits String - Credit option for CPU usage. Valid values include
standard
orunlimited
. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
SpotInstanceRequestEbsBlockDevice, SpotInstanceRequestEbsBlockDeviceArgs
- Device
Name string - Name of the device to mount.
- Delete
On boolTermination - 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 withsnapshot_id
. Must be configured to perform drift detection. - Iops int
- Amount of provisioned IOPS. Only valid for volume_type of
io1
,io2
orgp3
. - Kms
Key stringId - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
- Snapshot
Id string - Snapshot ID to mount.
- Dictionary<string, string>
- Map of tags to assign to the device.
- 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
ofgp3
. - Volume
Id string - Volume
Size int - Size of the volume in gibibytes (GiB).
- Volume
Type string Type of volume. Valid values include
standard
,gp2
,gp3
,io1
,io2
,sc1
, orst1
. Defaults togp2
.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 theaws.ebs.Volume
andaws.ec2.VolumeAttachment
resources instead. If you useebs_block_device
on anaws.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 externalaws.ebs.Volume
andaws.ec2.VolumeAttachment
resources for a given instance.
- Device
Name string - Name of the device to mount.
- Delete
On boolTermination - 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 withsnapshot_id
. Must be configured to perform drift detection. - Iops int
- Amount of provisioned IOPS. Only valid for volume_type of
io1
,io2
orgp3
. - Kms
Key stringId - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
- Snapshot
Id string - Snapshot ID to mount.
- map[string]string
- Map of tags to assign to the device.
- 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
ofgp3
. - Volume
Id string - Volume
Size int - Size of the volume in gibibytes (GiB).
- Volume
Type string Type of volume. Valid values include
standard
,gp2
,gp3
,io1
,io2
,sc1
, orst1
. Defaults togp2
.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 theaws.ebs.Volume
andaws.ec2.VolumeAttachment
resources instead. If you useebs_block_device
on anaws.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 externalaws.ebs.Volume
andaws.ec2.VolumeAttachment
resources for a given instance.
- device
Name String - Name of the device to mount.
- delete
On BooleanTermination - 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 withsnapshot_id
. Must be configured to perform drift detection. - iops Integer
- Amount of provisioned IOPS. Only valid for volume_type of
io1
,io2
orgp3
. - kms
Key StringId - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
- snapshot
Id String - Snapshot ID to mount.
- Map<String,String>
- Map of tags to assign to the device.
- 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
ofgp3
. - volume
Id String - volume
Size Integer - Size of the volume in gibibytes (GiB).
- volume
Type String Type of volume. Valid values include
standard
,gp2
,gp3
,io1
,io2
,sc1
, orst1
. Defaults togp2
.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 theaws.ebs.Volume
andaws.ec2.VolumeAttachment
resources instead. If you useebs_block_device
on anaws.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 externalaws.ebs.Volume
andaws.ec2.VolumeAttachment
resources for a given instance.
- device
Name string - Name of the device to mount.
- delete
On booleanTermination - 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 withsnapshot_id
. Must be configured to perform drift detection. - iops number
- Amount of provisioned IOPS. Only valid for volume_type of
io1
,io2
orgp3
. - kms
Key stringId - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
- snapshot
Id string - Snapshot ID to mount.
- {[key: string]: string}
- Map of tags to assign to the device.
- {[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
ofgp3
. - volume
Id string - volume
Size number - Size of the volume in gibibytes (GiB).
- volume
Type string Type of volume. Valid values include
standard
,gp2
,gp3
,io1
,io2
,sc1
, orst1
. Defaults togp2
.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 theaws.ebs.Volume
andaws.ec2.VolumeAttachment
resources instead. If you useebs_block_device
on anaws.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 externalaws.ebs.Volume
andaws.ec2.VolumeAttachment
resources for a given instance.
- device_
name str - Name of the device to mount.
- delete_
on_ booltermination - 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 withsnapshot_id
. Must be configured to perform drift detection. - iops int
- Amount of provisioned IOPS. Only valid for volume_type of
io1
,io2
orgp3
. - kms_
key_ strid - 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.
- Mapping[str, str]
- Map of tags to assign to the device.
- 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
ofgp3
. - 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
, orst1
. Defaults togp2
.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 theaws.ebs.Volume
andaws.ec2.VolumeAttachment
resources instead. If you useebs_block_device
on anaws.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 externalaws.ebs.Volume
andaws.ec2.VolumeAttachment
resources for a given instance.
- device
Name String - Name of the device to mount.
- delete
On BooleanTermination - 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 withsnapshot_id
. Must be configured to perform drift detection. - iops Number
- Amount of provisioned IOPS. Only valid for volume_type of
io1
,io2
orgp3
. - kms
Key StringId - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
- snapshot
Id String - Snapshot ID to mount.
- Map<String>
- Map of tags to assign to the device.
- 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
ofgp3
. - volume
Id String - volume
Size Number - Size of the volume in gibibytes (GiB).
- volume
Type String Type of volume. Valid values include
standard
,gp2
,gp3
,io1
,io2
,sc1
, orst1
. Defaults togp2
.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 theaws.ebs.Volume
andaws.ec2.VolumeAttachment
resources instead. If you useebs_block_device
on anaws.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 externalaws.ebs.Volume
andaws.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
- Device
Name string - 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 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 formatephemeral{0..N}
.
- Device
Name string - 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 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 formatephemeral{0..N}
.
- device
Name String - Name of the block device to mount on the instance.
- no
Device Boolean - Suppresses the specified device included in the AMI's block device mapping.
- virtual
Name 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 formatephemeral{0..N}
.
- device
Name string - Name of the block device to mount on the instance.
- no
Device boolean - Suppresses the specified device included in the AMI's block device mapping.
- virtual
Name 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 formatephemeral{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 formatephemeral{0..N}
.
- device
Name String - Name of the block device to mount on the instance.
- no
Device Boolean - Suppresses the specified device included in the AMI's block device mapping.
- virtual
Name 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 formatephemeral{0..N}
.
SpotInstanceRequestLaunchTemplate, SpotInstanceRequestLaunchTemplateArgs
SpotInstanceRequestMaintenanceOptions, SpotInstanceRequestMaintenanceOptionsArgs
- Auto
Recovery string - Automatic recovery behavior of the Instance. Can be
"default"
or"disabled"
. See Recover your instance for more details.
- Auto
Recovery string - Automatic recovery behavior of the Instance. Can be
"default"
or"disabled"
. See Recover your instance for more details.
- auto
Recovery String - Automatic recovery behavior of the Instance. Can be
"default"
or"disabled"
. See Recover your instance for more details.
- auto
Recovery 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.
- auto
Recovery String - Automatic recovery behavior of the Instance. Can be
"default"
or"disabled"
. See Recover your instance for more details.
SpotInstanceRequestMetadataOptions, SpotInstanceRequestMetadataOptionsArgs
- Http
Endpoint string - Whether the metadata service is available. Valid values include
enabled
ordisabled
. Defaults toenabled
. - Http
Protocol stringIpv6 - Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to
disabled
. - Http
Put intResponse Hop Limit - 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
to64
. Defaults to1
. - Http
Tokens string - Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include
optional
orrequired
. - string
Enables or disables access to instance tags from the instance metadata service. Valid values include
enabled
ordisabled
. Defaults todisabled
.For more information, see the documentation on the Instance Metadata Service.
- Http
Endpoint string - Whether the metadata service is available. Valid values include
enabled
ordisabled
. Defaults toenabled
. - Http
Protocol stringIpv6 - Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to
disabled
. - Http
Put intResponse Hop Limit - 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
to64
. Defaults to1
. - Http
Tokens string - Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include
optional
orrequired
. - string
Enables or disables access to instance tags from the instance metadata service. Valid values include
enabled
ordisabled
. Defaults todisabled
.For more information, see the documentation on the Instance Metadata Service.
- http
Endpoint String - Whether the metadata service is available. Valid values include
enabled
ordisabled
. Defaults toenabled
. - http
Protocol StringIpv6 - Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to
disabled
. - http
Put IntegerResponse Hop Limit - 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
to64
. Defaults to1
. - http
Tokens String - Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include
optional
orrequired
. - String
Enables or disables access to instance tags from the instance metadata service. Valid values include
enabled
ordisabled
. Defaults todisabled
.For more information, see the documentation on the Instance Metadata Service.
- http
Endpoint string - Whether the metadata service is available. Valid values include
enabled
ordisabled
. Defaults toenabled
. - http
Protocol stringIpv6 - Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to
disabled
. - http
Put numberResponse Hop Limit - 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
to64
. Defaults to1
. - http
Tokens string - Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include
optional
orrequired
. - string
Enables or disables access to instance tags from the instance metadata service. Valid values include
enabled
ordisabled
. Defaults todisabled
.For more information, see the documentation on the Instance Metadata Service.
- http_
endpoint str - Whether the metadata service is available. Valid values include
enabled
ordisabled
. Defaults toenabled
. - http_
protocol_ stripv6 - Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to
disabled
. - http_
put_ intresponse_ hop_ limit - 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
to64
. Defaults to1
. - 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
orrequired
. - str
Enables or disables access to instance tags from the instance metadata service. Valid values include
enabled
ordisabled
. Defaults todisabled
.For more information, see the documentation on the Instance Metadata Service.
- http
Endpoint String - Whether the metadata service is available. Valid values include
enabled
ordisabled
. Defaults toenabled
. - http
Protocol StringIpv6 - Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to
disabled
. - http
Put NumberResponse Hop Limit - 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
to64
. Defaults to1
. - http
Tokens String - Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include
optional
orrequired
. - String
Enables or disables access to instance tags from the instance metadata service. Valid values include
enabled
ordisabled
. Defaults todisabled
.For more information, see the documentation on the Instance Metadata Service.
SpotInstanceRequestNetworkInterface, SpotInstanceRequestNetworkInterfaceArgs
- Device
Index int - Integer index of the network interface attachment. Limited by instance type.
- Network
Interface stringId - ID of the network interface to attach.
- Delete
On boolTermination - Whether or not to delete the network interface on instance termination. Defaults to
false
. Currently, the only valid value isfalse
, as this is only supported when creating new network interfaces when launching an instance. - Network
Card intIndex - 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 stringId - ID of the network interface to attach.
- Delete
On boolTermination - Whether or not to delete the network interface on instance termination. Defaults to
false
. Currently, the only valid value isfalse
, as this is only supported when creating new network interfaces when launching an instance. - Network
Card intIndex - Integer index of the network card. Limited by instance type. The default index is
0
.
- device
Index Integer - Integer index of the network interface attachment. Limited by instance type.
- network
Interface StringId - ID of the network interface to attach.
- delete
On BooleanTermination - Whether or not to delete the network interface on instance termination. Defaults to
false
. Currently, the only valid value isfalse
, as this is only supported when creating new network interfaces when launching an instance. - network
Card IntegerIndex - Integer index of the network card. Limited by instance type. The default index is
0
.
- device
Index number - Integer index of the network interface attachment. Limited by instance type.
- network
Interface stringId - ID of the network interface to attach.
- delete
On booleanTermination - Whether or not to delete the network interface on instance termination. Defaults to
false
. Currently, the only valid value isfalse
, as this is only supported when creating new network interfaces when launching an instance. - network
Card numberIndex - 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_ strid - ID of the network interface to attach.
- delete_
on_ booltermination - Whether or not to delete the network interface on instance termination. Defaults to
false
. Currently, the only valid value isfalse
, as this is only supported when creating new network interfaces when launching an instance. - network_
card_ intindex - Integer index of the network card. Limited by instance type. The default index is
0
.
- device
Index Number - Integer index of the network interface attachment. Limited by instance type.
- network
Interface StringId - ID of the network interface to attach.
- delete
On BooleanTermination - Whether or not to delete the network interface on instance termination. Defaults to
false
. Currently, the only valid value isfalse
, as this is only supported when creating new network interfaces when launching an instance. - network
Card NumberIndex - Integer index of the network card. Limited by instance type. The default index is
0
.
SpotInstanceRequestPrivateDnsNameOptions, SpotInstanceRequestPrivateDnsNameOptionsArgs
- Enable
Resource boolName Dns ARecord - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
- Enable
Resource boolName Dns Aaaa Record - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
- Hostname
Type 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
andresource-name
.
- Enable
Resource boolName Dns ARecord - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
- Enable
Resource boolName Dns Aaaa Record - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
- Hostname
Type 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
andresource-name
.
- enable
Resource BooleanName Dns ARecord - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
- enable
Resource BooleanName Dns Aaaa Record - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
- hostname
Type 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
andresource-name
.
- enable
Resource booleanName Dns ARecord - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
- enable
Resource booleanName Dns Aaaa Record - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
- hostname
Type 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
andresource-name
.
- enable_
resource_ boolname_ dns_ a_ record - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
- enable_
resource_ boolname_ dns_ aaaa_ record - 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
andresource-name
.
- enable
Resource BooleanName Dns ARecord - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
- enable
Resource BooleanName Dns Aaaa Record - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
- hostname
Type 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
andresource-name
.
SpotInstanceRequestRootBlockDevice, SpotInstanceRequestRootBlockDeviceArgs
- Delete
On boolTermination - Whether the volume should be destroyed on instance termination. Defaults to
true
. - Device
Name string - 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
orgp3
. - Kms
Key stringId - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
- Dictionary<string, string>
- Map of tags to assign to the device.
- 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
ofgp3
. - Volume
Id string - Volume
Size int - Size of the volume in gibibytes (GiB).
- Volume
Type string Type of volume. Valid values include
standard
,gp2
,gp3
,io1
,io2
,sc1
, orst1
. Defaults to the volume type that the AMI uses.Modifying the
encrypted
orkms_key_id
settings of theroot_block_device
requires resource replacement.
- Delete
On boolTermination - Whether the volume should be destroyed on instance termination. Defaults to
true
. - Device
Name string - 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
orgp3
. - Kms
Key stringId - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
- map[string]string
- Map of tags to assign to the device.
- 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
ofgp3
. - Volume
Id string - Volume
Size int - Size of the volume in gibibytes (GiB).
- Volume
Type string Type of volume. Valid values include
standard
,gp2
,gp3
,io1
,io2
,sc1
, orst1
. Defaults to the volume type that the AMI uses.Modifying the
encrypted
orkms_key_id
settings of theroot_block_device
requires resource replacement.
- delete
On BooleanTermination - Whether the volume should be destroyed on instance termination. Defaults to
true
. - device
Name String - 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
orgp3
. - kms
Key StringId - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
- Map<String,String>
- Map of tags to assign to the device.
- 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
ofgp3
. - volume
Id String - volume
Size Integer - Size of the volume in gibibytes (GiB).
- volume
Type String Type of volume. Valid values include
standard
,gp2
,gp3
,io1
,io2
,sc1
, orst1
. Defaults to the volume type that the AMI uses.Modifying the
encrypted
orkms_key_id
settings of theroot_block_device
requires resource replacement.
- delete
On booleanTermination - Whether the volume should be destroyed on instance termination. Defaults to
true
. - device
Name string - 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
orgp3
. - kms
Key stringId - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
- {[key: string]: string}
- Map of tags to assign to the device.
- {[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
ofgp3
. - volume
Id string - volume
Size number - Size of the volume in gibibytes (GiB).
- volume
Type string Type of volume. Valid values include
standard
,gp2
,gp3
,io1
,io2
,sc1
, orst1
. Defaults to the volume type that the AMI uses.Modifying the
encrypted
orkms_key_id
settings of theroot_block_device
requires resource replacement.
- delete_
on_ booltermination - Whether the volume should be destroyed on instance termination. Defaults to
true
. - device_
name str - 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
orgp3
. - kms_
key_ strid - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
- Mapping[str, str]
- Map of tags to assign to the device.
- 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
ofgp3
. - 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
, orst1
. Defaults to the volume type that the AMI uses.Modifying the
encrypted
orkms_key_id
settings of theroot_block_device
requires resource replacement.
- delete
On BooleanTermination - Whether the volume should be destroyed on instance termination. Defaults to
true
. - device
Name String - 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
orgp3
. - kms
Key StringId - Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
- Map<String>
- Map of tags to assign to the device.
- 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
ofgp3
. - volume
Id String - volume
Size Number - Size of the volume in gibibytes (GiB).
- volume
Type String Type of volume. Valid values include
standard
,gp2
,gp3
,io1
,io2
,sc1
, orst1
. Defaults to the volume type that the AMI uses.Modifying the
encrypted
orkms_key_id
settings of theroot_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.