Specifies the properties for creating a launch template. The minimum required properties for specifying a launch template are as follows:
A launch template can contain some or all of the configuration information to launch an instance. When you launch an instance using a launch template, instance properties that are not specified in the launch template use default values, except the ImageId
property, which has no default value. If you do not specify an AMI ID for the launch template ImageId
property, you must specify an AMI ID for the instance ImageId
property.
For more information, see Launch an instance from a launch template in the Amazon EC2 User Guide.
To use awscc_ec2_launch_template to launch the latest Amazon Linux AMI
resource "awscc_ec2_launch_template" "amazon_linux" {
launch_template_data = {
image_id = data.aws_ami.amazon_linux.id
instance_type = "t2.micro"
}
launch_template_name = "latest_amazon_linux"
}
data "aws_ami" "amazon_linux" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["amzn2-ami-hvm-*-gp2"]
}
filter {
name = "root-device-type"
values = ["ebs"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
filter {
name = "architecture"
values = ["x86_64"]
}
}
The following awscc_ec2_launch_template with block device mapping and detailed monitoring enabled
resource "awscc_ec2_launch_template" "block_device" {
launch_template_data = {
image_id = data.aws_ami.amazon_linux.id
block_device_mappings = [
{
ebs = {
volume_size = 30
volume_type = "gp3"
delete_on_terminate = true
encrypted = true
}
device_name = "/dev/xvdcz"
}
]
monitoring = {
enabled = true
}
instance_type = "t2.micro"
}
launch_template_name = "with_block_device"
}
The following awscc_ec2_launch_template with public IP assigned for EC2 Auto Scaling Group. Note that when you specify a network interface for Amazon EC2 Auto Scaling, specify the VPC subnets as properties of the Auto Scaling group, and not in the launch template (because they will be ignored).
resource "awscc_ec2_launch_template" "with eip" {
launch_template_data = {
image_id = data.aws_ami.amazon_linux.id
network_interfaces = [
{
device_index = 0
associate_public_ip_address = true
delete_on_termination = true
groups = [
"sg-example1",
"sg-example2"
]
}
]
monitoring = {
enabled = true
}
instance_type = "t2.micro"
}
launch_template_name = "with_eip"
}
launch_template_data
(Attributes) The information for the launch template. (see below for nested schema)launch_template_name
(String) A name for the launch template.tag_specifications
(Attributes List) The tags to apply to the launch template on creation. To tag the launch template, the resource type must be launch-template
.
To specify the tags for the resources that are created when an instance is launched, you must use TagSpecifications. (see below for nested schema)version_description
(String) A description for the first version of the launch template.default_version_number
(String)id
(String) Uniquely identifies the resource.latest_version_number
(String)launch_template_id
(String)launch_template_data
Optional:
block_device_mappings
(Attributes List) The block device mapping. (see below for nested schema)capacity_reservation_specification
(Attributes) The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to open
, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone). (see below for nested schema)cpu_options
(Attributes) The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide. (see below for nested schema)credit_specification
(Attributes) The credit option for CPU usage of the instance. Valid only for T instances. (see below for nested schema)disable_api_stop
(Boolean) Indicates whether to enable the instance for stop protection. For more information, see Stop protection in the Amazon Elastic Compute Cloud User Guide.disable_api_termination
(Boolean) If you set this parameter to true
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior
to terminate
, you can terminate the instance by running the shutdown command from the instance.ebs_optimized
(Boolean) Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.elastic_gpu_specifications
(Attributes List) Deprecated.
Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, G4dn, or G5 instances. (see below for nested schema)elastic_inference_accelerators
(Attributes List) An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.
You cannot specify accelerators from different generations in the same request.
Starting April 15, 2023, AWS will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. (see below for nested schema)enclave_options
(Attributes) Indicates whether the instance is enabled for AWS Nitro Enclaves. For more information, see What is Nitro Enclaves? in the Nitro Enclaves User Guide.
You can't enable AWS Nitro Enclaves and hibernation on the same instance. (see below for nested schema)hibernation_options
(Attributes) Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide. (see below for nested schema)iam_instance_profile
(Attributes) The name or Amazon Resource Name (ARN) of an IAM instance profile. (see below for nested schema)image_id
(String) The ID of the AMI. Alternatively, you can specify a Systems Manager parameter, which will resolve to an AMI ID on launch.
Valid formats:
ami-17characters00000
resolve:ssm:parameter-name
resolve:ssm:parameter-name:version-number
resolve:ssm:parameter-name:label
For more information, see Use a Systems Manager parameter to find an AMI in the Amazon Elastic Compute Cloud User Guide.
instance_initiated_shutdown_behavior
(String) Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
instance_market_options
(Attributes) The market (purchasing) option for the instances. (see below for nested schema)instance_requirements
(Attributes) The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.
You must specify VCpuCount
and MemoryMiB
. All other attributes are optional. Any unspecified optional attribute is set to its default.
When you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you specify multiple values for an attribute, you get instance types that satisfy any of the specified values.
To limit the list of instance types from which Amazon EC2 can identify matching instance types, you can use one of the following parameters, but not both in the same request:
AllowedInstanceTypes
- The instance types to include in the list. All other instance types are ignored, even if they match your specified attributes.ExcludedInstanceTypes
- The instance types to exclude from the list, even if they match your specified attributes.If you specify InstanceRequirements
, you can't specify InstanceType
.
Attribute-based instance type selection is only supported when using Auto Scaling groups, EC2 Fleet, and Spot Fleet to launch instances. If you plan to use the launch template in the launch instance wizard, or with the RunInstances API or AWS::EC2::Instance AWS CloudFormation resource, you can't specify InstanceRequirements
.
For more information, see Attribute-based instance type selection for EC2 Fleet, Attribute-based instance type selection for Spot Fleet, and Spot placement score in the Amazon EC2 User Guide. (see below for nested schema)
instance_type
(String) The instance type. For more information, see Instance types in the Amazon Elastic Compute Cloud User Guide.
If you specify InstanceType
, you can't specify InstanceRequirements
.kernel_id
(String) The ID of the kernel.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon EC2 User Guide.key_name
(String) The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.license_specifications
(Attributes List) The license configurations. (see below for nested schema)maintenance_options
(Attributes) The maintenance options of your instance. (see below for nested schema)metadata_options
(Attributes) The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide. (see below for nested schema)monitoring
(Attributes) The monitoring for the instance. (see below for nested schema)network_interfaces
(Attributes List) The network interfaces for the instance. (see below for nested schema)placement
(Attributes) The placement for the instance. (see below for nested schema)private_dns_name_options
(Attributes) The hostname type for EC2 instances launched into this subnet and how DNS A and AAAA record queries should be handled. For more information, see Amazon EC2 instance hostname types in the User Guide. (see below for nested schema)ram_disk_id
(String) The ID of the RAM disk.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User provided kernels in the Amazon Elastic Compute Cloud User Guide.security_group_ids
(List of String) The IDs of the security groups. You can specify the IDs of existing security groups and references to resources created by the stack template.
If you specify a network interface, you must specify any security groups as part of the network interface instead.security_groups
(List of String) The names of the security groups. For a nondefault VPC, you must use security group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.tag_specifications
(Attributes List) The tags to apply to the resources that are created during instance launch.
To tag a resource after it has been created, see CreateTags.
To tag the launch template itself, use TagSpecifications. (see below for nested schema)user_data
(String) The user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see Run commands on your Linux instance at launch (Linux) or Work with instance user data (Windows) in the Amazon Elastic Compute Cloud User Guide.
If you are creating the launch template for use with BATCH, the user data must be provided in the MIME multi-part archive format. For more information, see Amazon EC2 user data in launch templates in the User Guide.launch_template_data.block_device_mappings
launch_template_data.block_device_mappings.ebs
For io2
volumes, you can achieve up to 256,000 IOPS on instances built on the Nitro System. On other instances, you can achieve performance up to 32,000 IOPS.
This parameter is supported for io1
, io2
, and gp3
volumes only.
kms_key_id
(String) The ARN of the symmetric KMSlong (KMS) CMK used for encryption.snapshot_id
(String) The ID of the snapshot.throughput
(Number) The throughput to provision for a gp3
volume, with a maximum of 1,000 MiB/s.
Valid Range: Minimum value of 125. Maximum value of 1000.volume_size
(Number) The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. The following are the supported volumes sizes for each volume type:
md5-7a5a0db446dd5621a08c29fa481dcfdc
launch_template_data.capacity_reservation_specification
launch_template_data.capacity_reservation_specification.capacity_reservation_target
launch_template_data.cpu_options
launch_template_data.credit_specification
launch_template_data.elastic_gpu_specifications
launch_template_data.elastic_inference_accelerators
launch_template_data.enclave_options
launch_template_data.hibernation_options
launch_template_data.iam_instance_profile
launch_template_data.instance_market_options
launch_template_data.instance_market_options.spot_options
Default: 7 days from the current date
launch_template_data.instance_requirements
Default: Any manufacturer
accelerator_names
(List of String) The accelerators that must be on the instance type.
a10g
.a100
.h100
.inferentia
.k520
.k80
.m60
.radeon-pro-v520
.t4
.t4g
.vu9p
.v100
.Default: Any accelerator
accelerator_total_memory_mi_b
(Attributes) The minimum and maximum amount of total accelerator memory, in MiB.
Default: No minimum or maximum limits (see below for nested schema)accelerator_types
(List of String) The accelerator types that must be on the instance type.
gpu
.fpga
.inference
.Default: Any accelerator type
allowed_instance_types
(List of String) The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.
You can use strings with one or more wild cards, represented by an asterisk (*
), to allow an instance type, size, or generation. The following are examples: m5.8xlarge
, c5*.*
, m5a.*
, r*
, *3*
.
For example, if you specify c5*
,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*
, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.
If you specify AllowedInstanceTypes
, you can't specify ExcludedInstanceTypes
.
Default: All instance typesbare_metal
(String) Indicates whether bare metal instance types must be included, excluded, or required.
included
.required
.excluded
.Default: excluded
baseline_ebs_bandwidth_mbps
(Attributes) The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.
Default: No minimum or maximum limits (see below for nested schema)burstable_performance
(String) Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.
included
.required
.excluded
.Default: excluded
cpu_manufacturers
(List of String) The CPU manufacturers to include.
intel
.amd
.amazon-web-services
.Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template. Default: Any manufacturer
excluded_instance_types
(List of String) The instance types to exclude.
You can use strings with one or more wild cards, represented by an asterisk (*
), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge
, c5*.*
, m5a.*
, r*
, *3*
.
For example, if you specify c5*
,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*
, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.
If you specify ExcludedInstanceTypes
, you can't specify AllowedInstanceTypes
.
Default: No excluded instance typesinstance_generations
(List of String) Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide.
For current generation instance types, specify current
.
For previous generation instance types, specify previous
.
Default: Current and previous generation instance typeslocal_storage
(String) Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.
included
.required
.excluded
.Default: included
local_storage_types
(List of String) The type of local storage that is required.
hdd
.ssd
.Default: hdd
and ssd
max_spot_price_as_percentage_of_optimal_on_demand_price
(Number) [Price protection] The price protection threshold for Spot Instances, as a percentage of an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.
The parameter accepts an integer, which Amazon EC2 interprets as a percentage.
If you set DesiredCapacityType
to vcpu
or memory-mib
, the price protection threshold is based on the per vCPU or per memory price instead of the per instance price.
Only one of SpotMaxPricePercentageOverLowestPrice
or MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as 999999
.memory_gi_b_per_v_cpu
(Attributes) The minimum and maximum amount of memory per vCPU, in GiB.
Default: No minimum or maximum limits (see below for nested schema)memory_mi_b
(Attributes) The minimum and maximum amount of memory, in MiB. (see below for nested schema)network_bandwidth_gbps
(Attributes) The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).
Default: No minimum or maximum limits (see below for nested schema)network_interface_count
(Attributes) The minimum and maximum number of network interfaces.
Default: No minimum or maximum limits (see below for nested schema)on_demand_max_price_percentage_over_lowest_price
(Number) [Price protection] The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.
The parameter accepts an integer, which Amazon EC2 interprets as a percentage.
To turn off price protection, specify a high value, such as 999999
.
This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.
If you set TargetCapacityUnitType
to vcpu
or memory-mib
, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.
Default: 20
require_hibernate_support
(Boolean) Indicates whether instance types must support hibernation for On-Demand Instances.
This parameter is not supported for GetSpotPlacementScores.
Default: false
spot_max_price_percentage_over_lowest_price
(Number) [Price protection] The price protection threshold for Spot Instances, as a percentage higher than an identified Spot price. The identified Spot price is the Spot price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified Spot price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose Spot price exceeds your specified threshold.
The parameter accepts an integer, which Amazon EC2 interprets as a percentage.
If you set TargetCapacityUnitType
to vcpu
or memory-mib
, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.
This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.
Only one of SpotMaxPricePercentageOverLowestPrice
or MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as 999999
.
Default: 100
total_local_storage_gb
(Attributes) The minimum and maximum amount of total local storage, in GB.
Default: No minimum or maximum limits (see below for nested schema)v_cpu_count
(Attributes) The minimum and maximum number of vCPUs. (see below for nested schema)launch_template_data.instance_requirements.accelerator_count
Optional:
max
(Number) The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max
to 0
.min
(Number) The minimum number of accelerators. To specify no minimum limit, omit this parameter.launch_template_data.instance_requirements.accelerator_total_memory_mi_b
Optional:
max
(Number) The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.min
(Number) The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.launch_template_data.instance_requirements.baseline_ebs_bandwidth_mbps
Optional:
max
(Number) The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.min
(Number) The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.launch_template_data.instance_requirements.memory_gi_b_per_v_cpu
Optional:
max
(Number) The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.min
(Number) The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.launch_template_data.instance_requirements.memory_mi_b
Optional:
max
(Number) The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.min
(Number) The minimum amount of memory, in MiB. To specify no minimum limit, specify 0
.launch_template_data.instance_requirements.network_bandwidth_gbps
Optional:
max
(Number) The maximum amount of network bandwidth, in Gbps. To specify no maximum limit, omit this parameter.min
(Number) The minimum amount of network bandwidth, in Gbps. If this parameter is not specified, there is no minimum limit.launch_template_data.instance_requirements.network_interface_count
Optional:
max
(Number) The maximum number of network interfaces. To specify no maximum limit, omit this parameter.min
(Number) The minimum number of network interfaces. To specify no minimum limit, omit this parameter.launch_template_data.instance_requirements.total_local_storage_gb
Optional:
max
(Number) The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.min
(Number) The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.launch_template_data.instance_requirements.v_cpu_count
Optional:
max
(Number) The maximum number of vCPUs. To specify no maximum limit, omit this parameter.min
(Number) The minimum number of vCPUs. To specify no minimum limit, specify 0
.launch_template_data.license_specifications
Optional:
license_configuration_arn
(String) The Amazon Resource Name (ARN) of the license configuration.launch_template_data.maintenance_options
Optional:
auto_recovery
(String) Disables the automatic recovery behavior of your instance or sets it to default.launch_template_data.metadata_options
Optional:
http_endpoint
(String) Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled
.
If you specify a value of disabled
, you will not be able to access your instance metadata.http_protocol_ipv_6
(String) Enables or disables the IPv6 endpoint for the instance metadata service.
Default: disabled
http_put_response_hop_limit
(Number) The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.
Default: 1
Possible values: Integers from 1 to 64http_tokens
(String) Indicates whether IMDSv2 is required.
optional
- IMDSv2 is optional. You can choose whether to send a session token in your instance metadata retrieval requests. If you retrieve IAM role credentials without a session token, you receive the IMDSv1 role credentials. If you retrieve IAM role credentials using a valid session token, you receive the IMDSv2 role credentials.required
- IMDSv2 is required. You must send a session token in your instance metadata retrieval requests. With this option, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.Default: If the value of ImdsSupport
for the Amazon Machine Image (AMI) for your instance is v2.0
, the default is required
.
instance_metadata_tags
(String) Set to enabled
to allow access to instance tags from the instance metadata. Set to disabled
to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata.
Default: disabled
launch_template_data.monitoring
Optional:
enabled
(Boolean) Specify true
to enable detailed monitoring. Otherwise, basic monitoring is enabled.launch_template_data.network_interfaces
Optional:
associate_carrier_ip_address
(Boolean) Associates a Carrier IP address with eth0 for a new network interface.
Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the Developer Guide.associate_public_ip_address
(Boolean) Associates a public IPv4 address with eth0 for a new network interface.
AWS charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the Amazon VPC pricing page.connection_tracking_specification
(Attributes) A connection tracking specification for the network interface. (see below for nested schema)delete_on_termination
(Boolean) Indicates whether the network interface is deleted when the instance is terminated.description
(String) A description for the network interface.device_index
(Number) The device index for the network interface attachment.ena_srd_specification
(Attributes) The ENA Express configuration for the network interface. (see below for nested schema)groups
(List of String) The IDs of one or more security groups.interface_type
(String) The type of network interface. To create an Elastic Fabric Adapter (EFA), specify efa
. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide.
If you are not creating an EFA, specify interface
or omit this parameter.
Valid values: interface
| efa
ipv_4_prefix_count
(Number) The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix
option.ipv_4_prefixes
(Attributes List) One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount
option. (see below for nested schema)ipv_6_address_count
(Number) The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.ipv_6_addresses
(Attributes List) One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses. (see below for nested schema)ipv_6_prefix_count
(Number) The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix
option.ipv_6_prefixes
(Attributes List) One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount
option. (see below for nested schema)network_card_index
(Number) The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.network_interface_id
(String) The ID of the network interface.primary_ipv_6
(Boolean) The primary IPv6 address of the network interface. When you enable an IPv6 GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address until the instance is terminated or the network interface is detached. For more information about primary IPv6 addresses, see RunInstances.private_ip_address
(String) The primary private IPv4 address of the network interface.private_ip_addresses
(Attributes List) One or more private IPv4 addresses. (see below for nested schema)secondary_private_ip_address_count
(Number) The number of secondary private IPv4 addresses to assign to a network interface.subnet_id
(String) The ID of the subnet for the network interface.launch_template_data.network_interfaces.connection_tracking_specification
Optional:
tcp_established_timeout
(Number) Timeout (in seconds) for idle TCP connections in an established state. Min: 60 seconds. Max: 432000 seconds (5 days). Default: 432000 seconds. Recommended: Less than 432000 seconds.udp_stream_timeout
(Number) Timeout (in seconds) for idle UDP flows classified as streams which have seen more than one request-response transaction. Min: 60 seconds. Max: 180 seconds (3 minutes). Default: 180 seconds.udp_timeout
(Number) Timeout (in seconds) for idle UDP flows that have seen traffic only in a single direction or a single request-response transaction. Min: 30 seconds. Max: 60 seconds. Default: 30 seconds.launch_template_data.network_interfaces.ena_srd_specification
Optional:
ena_srd_enabled
(Boolean) Indicates whether ENA Express is enabled for the network interface.ena_srd_udp_specification
(Attributes) Configures ENA Express for UDP network traffic. (see below for nested schema)launch_template_data.network_interfaces.ena_srd_specification.ena_srd_udp_specification
Optional:
ena_srd_udp_enabled
(Boolean) Indicates whether UDP traffic to and from the instance uses ENA Express. To specify this setting, you must first enable ENA Express.launch_template_data.network_interfaces.ipv_4_prefixes
Optional:
ipv_4_prefix
(String) The IPv4 prefix. For information, see Assigning prefixes to Amazon EC2 network interfaces in the Amazon Elastic Compute Cloud User Guide.launch_template_data.network_interfaces.ipv_6_addresses
Optional:
ipv_6_address
(String) One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.launch_template_data.network_interfaces.ipv_6_prefixes
Optional:
ipv_6_prefix
(String) The IPv6 prefix.launch_template_data.network_interfaces.private_ip_addresses
Optional:
primary
(Boolean) Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.private_ip_address
(String) The private IPv4 address.launch_template_data.placement
Optional:
affinity
(String) The affinity setting for an instance on a Dedicated Host.availability_zone
(String) The Availability Zone for the instance.group_id
(String) The Group Id of a placement group. You must specify the Placement Group Group Id to launch an instance in a shared placement group.group_name
(String) The name of the placement group for the instance.host_id
(String) The ID of the Dedicated Host for the instance.host_resource_group_arn
(String) The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host
.partition_number
(Number) The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition
.spread_domain
(String) Reserved for future use.tenancy
(String) The tenancy of the instance. An instance with a tenancy of dedicated runs on single-tenant hardware.launch_template_data.private_dns_name_options
Optional:
enable_resource_name_dns_a_record
(Boolean) Indicates whether to respond to DNS queries for instance hostnames with DNS A records.enable_resource_name_dns_aaaa_record
(Boolean) Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.hostname_type
(String) The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only 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. For more information, see Amazon EC2 instance hostname types in the User Guide.launch_template_data.tag_specifications
Optional:
resource_type
(String) The type of resource to tag.
Valid Values lists all resource types for Amazon EC2 that can be tagged. When you create a launch template, you can specify tags for the following resource types only: instance
| volume
| network-interface
| spot-instances-request
. If the instance does not include the resource type that you specify, the instance launch fails. For example, not all instance types include a volume.
To tag a resource after it has been created, see CreateTags.tags
(Attributes List) The tags to apply to the resource. (see below for nested schema)launch_template_data.tag_specifications.tags
Required:
key
(String) The tag key.value
(String) The tag value.tag_specifications
Optional:
resource_type
(String) The type of resource. To tag the launch template, ResourceType
must be launch-template
.tags
(Attributes List) The tags for the resource. (see below for nested schema)tag_specifications.tags
Required:
key
(String) The tag key.value
(String) The tag value.Import is supported using the following syntax:
$ terraform import awscc_ec2_launch_template.example <resource ID>