LaunchTemplate

Provides an EC2 launch template resource. Can be used to create instances or auto scaling groups.

Create a LaunchTemplate Resource

new LaunchTemplate(name: string, args?: LaunchTemplateArgs, opts?: CustomResourceOptions);
@overload
def LaunchTemplate(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   block_device_mappings: Optional[Sequence[LaunchTemplateBlockDeviceMappingArgs]] = None,
                   capacity_reservation_specification: Optional[LaunchTemplateCapacityReservationSpecificationArgs] = None,
                   cpu_options: Optional[LaunchTemplateCpuOptionsArgs] = None,
                   credit_specification: Optional[LaunchTemplateCreditSpecificationArgs] = None,
                   default_version: Optional[int] = None,
                   description: Optional[str] = None,
                   disable_api_termination: Optional[bool] = None,
                   ebs_optimized: Optional[str] = None,
                   elastic_gpu_specifications: Optional[Sequence[LaunchTemplateElasticGpuSpecificationArgs]] = None,
                   elastic_inference_accelerator: Optional[LaunchTemplateElasticInferenceAcceleratorArgs] = None,
                   enclave_options: Optional[LaunchTemplateEnclaveOptionsArgs] = None,
                   hibernation_options: Optional[LaunchTemplateHibernationOptionsArgs] = None,
                   iam_instance_profile: Optional[LaunchTemplateIamInstanceProfileArgs] = None,
                   image_id: Optional[str] = None,
                   instance_initiated_shutdown_behavior: Optional[str] = None,
                   instance_market_options: Optional[LaunchTemplateInstanceMarketOptionsArgs] = None,
                   instance_type: Optional[str] = None,
                   kernel_id: Optional[str] = None,
                   key_name: Optional[str] = None,
                   license_specifications: Optional[Sequence[LaunchTemplateLicenseSpecificationArgs]] = None,
                   metadata_options: Optional[LaunchTemplateMetadataOptionsArgs] = None,
                   monitoring: Optional[LaunchTemplateMonitoringArgs] = None,
                   name: Optional[str] = None,
                   name_prefix: Optional[str] = None,
                   network_interfaces: Optional[Sequence[LaunchTemplateNetworkInterfaceArgs]] = None,
                   placement: Optional[LaunchTemplatePlacementArgs] = None,
                   ram_disk_id: Optional[str] = None,
                   security_group_names: Optional[Sequence[str]] = None,
                   tag_specifications: Optional[Sequence[LaunchTemplateTagSpecificationArgs]] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   tags_all: Optional[Mapping[str, str]] = None,
                   update_default_version: Optional[bool] = None,
                   user_data: Optional[str] = None,
                   vpc_security_group_ids: Optional[Sequence[str]] = None)
@overload
def LaunchTemplate(resource_name: str,
                   args: Optional[LaunchTemplateArgs] = None,
                   opts: Optional[ResourceOptions] = None)
func NewLaunchTemplate(ctx *Context, name string, args *LaunchTemplateArgs, opts ...ResourceOption) (*LaunchTemplate, error)
public LaunchTemplate(string name, LaunchTemplateArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args LaunchTemplateArgs
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 LaunchTemplateArgs
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 LaunchTemplateArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LaunchTemplateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

LaunchTemplate Resource Properties

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

Inputs

The LaunchTemplate resource accepts the following input properties:

BlockDeviceMappings List<LaunchTemplateBlockDeviceMappingArgs>
Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
CapacityReservationSpecification LaunchTemplateCapacityReservationSpecificationArgs
Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
CpuOptions LaunchTemplateCpuOptionsArgs
The CPU options for the instance. See CPU Options below for more details.
CreditSpecification LaunchTemplateCreditSpecificationArgs
Customize the credit specification of the instance. See Credit Specification below for more details.
DefaultVersion int
Default Version of the launch template.
Description string
Description of the launch template.
DisableApiTermination bool
If true, enables EC2 Instance Termination Protection
EbsOptimized string
If true, the launched EC2 instance will be EBS-optimized.
ElasticGpuSpecifications List<LaunchTemplateElasticGpuSpecificationArgs>
The elastic GPU to attach to the instance. See Elastic GPU below for more details.
ElasticInferenceAccelerator LaunchTemplateElasticInferenceAcceleratorArgs
Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
EnclaveOptions LaunchTemplateEnclaveOptionsArgs
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
HibernationOptions LaunchTemplateHibernationOptionsArgs
The hibernation options for the instance. See Hibernation Options below for more details.
IamInstanceProfile LaunchTemplateIamInstanceProfileArgs
The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
ImageId string
The AMI from which to launch the instance.
InstanceInitiatedShutdownBehavior string
Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).
InstanceMarketOptions LaunchTemplateInstanceMarketOptionsArgs
The market (purchasing) option for the instance. See Market Options below for details.
InstanceType string
The type of the instance.
KernelId string
The kernel ID.
KeyName string
The key name to use for the instance.
LicenseSpecifications List<LaunchTemplateLicenseSpecificationArgs>
A list of license specifications to associate with. See License Specification below for more details.
MetadataOptions LaunchTemplateMetadataOptionsArgs
Customize the metadata options for the instance. See Metadata Options below for more details.
Monitoring LaunchTemplateMonitoringArgs
The monitoring option for the instance. See Monitoring below for more details.
Name string
The name of the launch template. If you leave this blank, this provider will auto-generate a unique name.
NamePrefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
NetworkInterfaces List<LaunchTemplateNetworkInterfaceArgs>
Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
Placement LaunchTemplatePlacementArgs
The placement of the instance. See Placement below for more details.
RamDiskId string
The ID of the RAM disk.
SecurityGroupNames List<string>
A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.
TagSpecifications List<LaunchTemplateTagSpecificationArgs>
The tags to apply to the resources during launch. See Tag Specifications below for more details.
Tags Dictionary<string, string>
A map of tags to assign to the launch template. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider .
UpdateDefaultVersion bool
Whether to update Default Version each update. Conflicts with default_version.
UserData string
The Base64-encoded user data to provide when launching the instance.
VpcSecurityGroupIds List<string>
A list of security group IDs to associate with.
BlockDeviceMappings []LaunchTemplateBlockDeviceMapping
Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
CapacityReservationSpecification LaunchTemplateCapacityReservationSpecification
Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
CpuOptions LaunchTemplateCpuOptions
The CPU options for the instance. See CPU Options below for more details.
CreditSpecification LaunchTemplateCreditSpecification
Customize the credit specification of the instance. See Credit Specification below for more details.
DefaultVersion int
Default Version of the launch template.
Description string
Description of the launch template.
DisableApiTermination bool
If true, enables EC2 Instance Termination Protection
EbsOptimized string
If true, the launched EC2 instance will be EBS-optimized.
ElasticGpuSpecifications []LaunchTemplateElasticGpuSpecification
The elastic GPU to attach to the instance. See Elastic GPU below for more details.
ElasticInferenceAccelerator LaunchTemplateElasticInferenceAccelerator
Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
EnclaveOptions LaunchTemplateEnclaveOptions
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
HibernationOptions LaunchTemplateHibernationOptions
The hibernation options for the instance. See Hibernation Options below for more details.
IamInstanceProfile LaunchTemplateIamInstanceProfile
The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
ImageId string
The AMI from which to launch the instance.
InstanceInitiatedShutdownBehavior string
Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).
InstanceMarketOptions LaunchTemplateInstanceMarketOptions
The market (purchasing) option for the instance. See Market Options below for details.
InstanceType string
The type of the instance.
KernelId string
The kernel ID.
KeyName string
The key name to use for the instance.
LicenseSpecifications []LaunchTemplateLicenseSpecification
A list of license specifications to associate with. See License Specification below for more details.
MetadataOptions LaunchTemplateMetadataOptions
Customize the metadata options for the instance. See Metadata Options below for more details.
Monitoring LaunchTemplateMonitoring
The monitoring option for the instance. See Monitoring below for more details.
Name string
The name of the launch template. If you leave this blank, this provider will auto-generate a unique name.
NamePrefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
NetworkInterfaces []LaunchTemplateNetworkInterface
Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
Placement LaunchTemplatePlacement
The placement of the instance. See Placement below for more details.
RamDiskId string
The ID of the RAM disk.
SecurityGroupNames []string
A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.
TagSpecifications []LaunchTemplateTagSpecification
The tags to apply to the resources during launch. See Tag Specifications below for more details.
Tags map[string]string
A map of tags to assign to the launch template. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider .
UpdateDefaultVersion bool
Whether to update Default Version each update. Conflicts with default_version.
UserData string
The Base64-encoded user data to provide when launching the instance.
VpcSecurityGroupIds []string
A list of security group IDs to associate with.
blockDeviceMappings LaunchTemplateBlockDeviceMappingArgs[]
Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
capacityReservationSpecification LaunchTemplateCapacityReservationSpecificationArgs
Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
cpuOptions LaunchTemplateCpuOptionsArgs
The CPU options for the instance. See CPU Options below for more details.
creditSpecification LaunchTemplateCreditSpecificationArgs
Customize the credit specification of the instance. See Credit Specification below for more details.
defaultVersion number
Default Version of the launch template.
description string
Description of the launch template.
disableApiTermination boolean
If true, enables EC2 Instance Termination Protection
ebsOptimized string
If true, the launched EC2 instance will be EBS-optimized.
elasticGpuSpecifications LaunchTemplateElasticGpuSpecificationArgs[]
The elastic GPU to attach to the instance. See Elastic GPU below for more details.
elasticInferenceAccelerator LaunchTemplateElasticInferenceAcceleratorArgs
Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
enclaveOptions LaunchTemplateEnclaveOptionsArgs
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
hibernationOptions LaunchTemplateHibernationOptionsArgs
The hibernation options for the instance. See Hibernation Options below for more details.
iamInstanceProfile LaunchTemplateIamInstanceProfileArgs
The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
imageId string
The AMI from which to launch the instance.
instanceInitiatedShutdownBehavior string
Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).
instanceMarketOptions LaunchTemplateInstanceMarketOptionsArgs
The market (purchasing) option for the instance. See Market Options below for details.
instanceType string
The type of the instance.
kernelId string
The kernel ID.
keyName string
The key name to use for the instance.
licenseSpecifications LaunchTemplateLicenseSpecificationArgs[]
A list of license specifications to associate with. See License Specification below for more details.
metadataOptions LaunchTemplateMetadataOptionsArgs
Customize the metadata options for the instance. See Metadata Options below for more details.
monitoring LaunchTemplateMonitoringArgs
The monitoring option for the instance. See Monitoring below for more details.
name string
The name of the launch template. If you leave this blank, this provider will auto-generate a unique name.
namePrefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
networkInterfaces LaunchTemplateNetworkInterfaceArgs[]
Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
placement LaunchTemplatePlacementArgs
The placement of the instance. See Placement below for more details.
ramDiskId string
The ID of the RAM disk.
securityGroupNames string[]
A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.
tagSpecifications LaunchTemplateTagSpecificationArgs[]
The tags to apply to the resources during launch. See Tag Specifications below for more details.
tags {[key: string]: string}
A map of tags to assign to the launch template. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider .
updateDefaultVersion boolean
Whether to update Default Version each update. Conflicts with default_version.
userData string
The Base64-encoded user data to provide when launching the instance.
vpcSecurityGroupIds string[]
A list of security group IDs to associate with.
block_device_mappings Sequence[LaunchTemplateBlockDeviceMappingArgs]
Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
capacity_reservation_specification LaunchTemplateCapacityReservationSpecificationArgs
Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
cpu_options LaunchTemplateCpuOptionsArgs
The CPU options for the instance. See CPU Options below for more details.
credit_specification LaunchTemplateCreditSpecificationArgs
Customize the credit specification of the instance. See Credit Specification below for more details.
default_version int
Default Version of the launch template.
description str
Description of the launch template.
disable_api_termination bool
If true, enables EC2 Instance Termination Protection
ebs_optimized str
If true, the launched EC2 instance will be EBS-optimized.
elastic_gpu_specifications Sequence[LaunchTemplateElasticGpuSpecificationArgs]
The elastic GPU to attach to the instance. See Elastic GPU below for more details.
elastic_inference_accelerator LaunchTemplateElasticInferenceAcceleratorArgs
Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
enclave_options LaunchTemplateEnclaveOptionsArgs
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
hibernation_options LaunchTemplateHibernationOptionsArgs
The hibernation options for the instance. See Hibernation Options below for more details.
iam_instance_profile LaunchTemplateIamInstanceProfileArgs
The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
image_id str
The AMI from which to launch the instance.
instance_initiated_shutdown_behavior str
Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).
instance_market_options LaunchTemplateInstanceMarketOptionsArgs
The market (purchasing) option for the instance. See Market Options below for details.
instance_type str
The type of the instance.
kernel_id str
The kernel ID.
key_name str
The key name to use for the instance.
license_specifications Sequence[LaunchTemplateLicenseSpecificationArgs]
A list of license specifications to associate with. See License Specification below for more details.
metadata_options LaunchTemplateMetadataOptionsArgs
Customize the metadata options for the instance. See Metadata Options below for more details.
monitoring LaunchTemplateMonitoringArgs
The monitoring option for the instance. See Monitoring below for more details.
name str
The name of the launch template. If you leave this blank, this provider will auto-generate a unique name.
name_prefix str
Creates a unique name beginning with the specified prefix. Conflicts with name.
network_interfaces Sequence[LaunchTemplateNetworkInterfaceArgs]
Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
placement LaunchTemplatePlacementArgs
The placement of the instance. See Placement below for more details.
ram_disk_id str
The ID of the RAM disk.
security_group_names Sequence[str]
A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.
tag_specifications Sequence[LaunchTemplateTagSpecificationArgs]
The tags to apply to the resources during launch. See Tag Specifications below for more details.
tags Mapping[str, str]
A map of tags to assign to the launch template. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider .
update_default_version bool
Whether to update Default Version each update. Conflicts with default_version.
user_data str
The Base64-encoded user data to provide when launching the instance.
vpc_security_group_ids Sequence[str]
A list of security group IDs to associate with.

Outputs

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

Arn string
The Amazon Resource Name (ARN) of the instance profile.
Id string
The provider-assigned unique ID for this managed resource.
LatestVersion int
The latest version of the launch template.
Arn string
The Amazon Resource Name (ARN) of the instance profile.
Id string
The provider-assigned unique ID for this managed resource.
LatestVersion int
The latest version of the launch template.
arn string
The Amazon Resource Name (ARN) of the instance profile.
id string
The provider-assigned unique ID for this managed resource.
latestVersion number
The latest version of the launch template.
arn str
The Amazon Resource Name (ARN) of the instance profile.
id str
The provider-assigned unique ID for this managed resource.
latest_version int
The latest version of the launch template.

Look up an Existing LaunchTemplate Resource

Get an existing LaunchTemplate 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?: LaunchTemplateState, opts?: CustomResourceOptions): LaunchTemplate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        block_device_mappings: Optional[Sequence[LaunchTemplateBlockDeviceMappingArgs]] = None,
        capacity_reservation_specification: Optional[LaunchTemplateCapacityReservationSpecificationArgs] = None,
        cpu_options: Optional[LaunchTemplateCpuOptionsArgs] = None,
        credit_specification: Optional[LaunchTemplateCreditSpecificationArgs] = None,
        default_version: Optional[int] = None,
        description: Optional[str] = None,
        disable_api_termination: Optional[bool] = None,
        ebs_optimized: Optional[str] = None,
        elastic_gpu_specifications: Optional[Sequence[LaunchTemplateElasticGpuSpecificationArgs]] = None,
        elastic_inference_accelerator: Optional[LaunchTemplateElasticInferenceAcceleratorArgs] = None,
        enclave_options: Optional[LaunchTemplateEnclaveOptionsArgs] = None,
        hibernation_options: Optional[LaunchTemplateHibernationOptionsArgs] = None,
        iam_instance_profile: Optional[LaunchTemplateIamInstanceProfileArgs] = None,
        image_id: Optional[str] = None,
        instance_initiated_shutdown_behavior: Optional[str] = None,
        instance_market_options: Optional[LaunchTemplateInstanceMarketOptionsArgs] = None,
        instance_type: Optional[str] = None,
        kernel_id: Optional[str] = None,
        key_name: Optional[str] = None,
        latest_version: Optional[int] = None,
        license_specifications: Optional[Sequence[LaunchTemplateLicenseSpecificationArgs]] = None,
        metadata_options: Optional[LaunchTemplateMetadataOptionsArgs] = None,
        monitoring: Optional[LaunchTemplateMonitoringArgs] = None,
        name: Optional[str] = None,
        name_prefix: Optional[str] = None,
        network_interfaces: Optional[Sequence[LaunchTemplateNetworkInterfaceArgs]] = None,
        placement: Optional[LaunchTemplatePlacementArgs] = None,
        ram_disk_id: Optional[str] = None,
        security_group_names: Optional[Sequence[str]] = None,
        tag_specifications: Optional[Sequence[LaunchTemplateTagSpecificationArgs]] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        update_default_version: Optional[bool] = None,
        user_data: Optional[str] = None,
        vpc_security_group_ids: Optional[Sequence[str]] = None) -> LaunchTemplate
func GetLaunchTemplate(ctx *Context, name string, id IDInput, state *LaunchTemplateState, opts ...ResourceOption) (*LaunchTemplate, error)
public static LaunchTemplate Get(string name, Input<string> id, LaunchTemplateState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Arn string
The Amazon Resource Name (ARN) of the instance profile.
BlockDeviceMappings List<LaunchTemplateBlockDeviceMappingArgs>
Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
CapacityReservationSpecification LaunchTemplateCapacityReservationSpecificationArgs
Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
CpuOptions LaunchTemplateCpuOptionsArgs
The CPU options for the instance. See CPU Options below for more details.
CreditSpecification LaunchTemplateCreditSpecificationArgs
Customize the credit specification of the instance. See Credit Specification below for more details.
DefaultVersion int
Default Version of the launch template.
Description string
Description of the launch template.
DisableApiTermination bool
If true, enables EC2 Instance Termination Protection
EbsOptimized string
If true, the launched EC2 instance will be EBS-optimized.
ElasticGpuSpecifications List<LaunchTemplateElasticGpuSpecificationArgs>
The elastic GPU to attach to the instance. See Elastic GPU below for more details.
ElasticInferenceAccelerator LaunchTemplateElasticInferenceAcceleratorArgs
Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
EnclaveOptions LaunchTemplateEnclaveOptionsArgs
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
HibernationOptions LaunchTemplateHibernationOptionsArgs
The hibernation options for the instance. See Hibernation Options below for more details.
IamInstanceProfile LaunchTemplateIamInstanceProfileArgs
The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
ImageId string
The AMI from which to launch the instance.
InstanceInitiatedShutdownBehavior string
Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).
InstanceMarketOptions LaunchTemplateInstanceMarketOptionsArgs
The market (purchasing) option for the instance. See Market Options below for details.
InstanceType string
The type of the instance.
KernelId string
The kernel ID.
KeyName string
The key name to use for the instance.
LatestVersion int
The latest version of the launch template.
LicenseSpecifications List<LaunchTemplateLicenseSpecificationArgs>
A list of license specifications to associate with. See License Specification below for more details.
MetadataOptions LaunchTemplateMetadataOptionsArgs
Customize the metadata options for the instance. See Metadata Options below for more details.
Monitoring LaunchTemplateMonitoringArgs
The monitoring option for the instance. See Monitoring below for more details.
Name string
The name of the launch template. If you leave this blank, this provider will auto-generate a unique name.
NamePrefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
NetworkInterfaces List<LaunchTemplateNetworkInterfaceArgs>
Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
Placement LaunchTemplatePlacementArgs
The placement of the instance. See Placement below for more details.
RamDiskId string
The ID of the RAM disk.
SecurityGroupNames List<string>
A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.
TagSpecifications List<LaunchTemplateTagSpecificationArgs>
The tags to apply to the resources during launch. See Tag Specifications below for more details.
Tags Dictionary<string, string>
A map of tags to assign to the launch template. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider .
UpdateDefaultVersion bool
Whether to update Default Version each update. Conflicts with default_version.
UserData string
The Base64-encoded user data to provide when launching the instance.
VpcSecurityGroupIds List<string>
A list of security group IDs to associate with.
Arn string
The Amazon Resource Name (ARN) of the instance profile.
BlockDeviceMappings []LaunchTemplateBlockDeviceMapping
Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
CapacityReservationSpecification LaunchTemplateCapacityReservationSpecification
Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
CpuOptions LaunchTemplateCpuOptions
The CPU options for the instance. See CPU Options below for more details.
CreditSpecification LaunchTemplateCreditSpecification
Customize the credit specification of the instance. See Credit Specification below for more details.
DefaultVersion int
Default Version of the launch template.
Description string
Description of the launch template.
DisableApiTermination bool
If true, enables EC2 Instance Termination Protection
EbsOptimized string
If true, the launched EC2 instance will be EBS-optimized.
ElasticGpuSpecifications []LaunchTemplateElasticGpuSpecification
The elastic GPU to attach to the instance. See Elastic GPU below for more details.
ElasticInferenceAccelerator LaunchTemplateElasticInferenceAccelerator
Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
EnclaveOptions LaunchTemplateEnclaveOptions
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
HibernationOptions LaunchTemplateHibernationOptions
The hibernation options for the instance. See Hibernation Options below for more details.
IamInstanceProfile LaunchTemplateIamInstanceProfile
The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
ImageId string
The AMI from which to launch the instance.
InstanceInitiatedShutdownBehavior string
Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).
InstanceMarketOptions LaunchTemplateInstanceMarketOptions
The market (purchasing) option for the instance. See Market Options below for details.
InstanceType string
The type of the instance.
KernelId string
The kernel ID.
KeyName string
The key name to use for the instance.
LatestVersion int
The latest version of the launch template.
LicenseSpecifications []LaunchTemplateLicenseSpecification
A list of license specifications to associate with. See License Specification below for more details.
MetadataOptions LaunchTemplateMetadataOptions
Customize the metadata options for the instance. See Metadata Options below for more details.
Monitoring LaunchTemplateMonitoring
The monitoring option for the instance. See Monitoring below for more details.
Name string
The name of the launch template. If you leave this blank, this provider will auto-generate a unique name.
NamePrefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
NetworkInterfaces []LaunchTemplateNetworkInterface
Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
Placement LaunchTemplatePlacement
The placement of the instance. See Placement below for more details.
RamDiskId string
The ID of the RAM disk.
SecurityGroupNames []string
A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.
TagSpecifications []LaunchTemplateTagSpecification
The tags to apply to the resources during launch. See Tag Specifications below for more details.
Tags map[string]string
A map of tags to assign to the launch template. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider .
UpdateDefaultVersion bool
Whether to update Default Version each update. Conflicts with default_version.
UserData string
The Base64-encoded user data to provide when launching the instance.
VpcSecurityGroupIds []string
A list of security group IDs to associate with.
arn string
The Amazon Resource Name (ARN) of the instance profile.
blockDeviceMappings LaunchTemplateBlockDeviceMappingArgs[]
Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
capacityReservationSpecification LaunchTemplateCapacityReservationSpecificationArgs
Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
cpuOptions LaunchTemplateCpuOptionsArgs
The CPU options for the instance. See CPU Options below for more details.
creditSpecification LaunchTemplateCreditSpecificationArgs
Customize the credit specification of the instance. See Credit Specification below for more details.
defaultVersion number
Default Version of the launch template.
description string
Description of the launch template.
disableApiTermination boolean
If true, enables EC2 Instance Termination Protection
ebsOptimized string
If true, the launched EC2 instance will be EBS-optimized.
elasticGpuSpecifications LaunchTemplateElasticGpuSpecificationArgs[]
The elastic GPU to attach to the instance. See Elastic GPU below for more details.
elasticInferenceAccelerator LaunchTemplateElasticInferenceAcceleratorArgs
Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
enclaveOptions LaunchTemplateEnclaveOptionsArgs
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
hibernationOptions LaunchTemplateHibernationOptionsArgs
The hibernation options for the instance. See Hibernation Options below for more details.
iamInstanceProfile LaunchTemplateIamInstanceProfileArgs
The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
imageId string
The AMI from which to launch the instance.
instanceInitiatedShutdownBehavior string
Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).
instanceMarketOptions LaunchTemplateInstanceMarketOptionsArgs
The market (purchasing) option for the instance. See Market Options below for details.
instanceType string
The type of the instance.
kernelId string
The kernel ID.
keyName string
The key name to use for the instance.
latestVersion number
The latest version of the launch template.
licenseSpecifications LaunchTemplateLicenseSpecificationArgs[]
A list of license specifications to associate with. See License Specification below for more details.
metadataOptions LaunchTemplateMetadataOptionsArgs
Customize the metadata options for the instance. See Metadata Options below for more details.
monitoring LaunchTemplateMonitoringArgs
The monitoring option for the instance. See Monitoring below for more details.
name string
The name of the launch template. If you leave this blank, this provider will auto-generate a unique name.
namePrefix string
Creates a unique name beginning with the specified prefix. Conflicts with name.
networkInterfaces LaunchTemplateNetworkInterfaceArgs[]
Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
placement LaunchTemplatePlacementArgs
The placement of the instance. See Placement below for more details.
ramDiskId string
The ID of the RAM disk.
securityGroupNames string[]
A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.
tagSpecifications LaunchTemplateTagSpecificationArgs[]
The tags to apply to the resources during launch. See Tag Specifications below for more details.
tags {[key: string]: string}
A map of tags to assign to the launch template. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider .
updateDefaultVersion boolean
Whether to update Default Version each update. Conflicts with default_version.
userData string
The Base64-encoded user data to provide when launching the instance.
vpcSecurityGroupIds string[]
A list of security group IDs to associate with.
arn str
The Amazon Resource Name (ARN) of the instance profile.
block_device_mappings Sequence[LaunchTemplateBlockDeviceMappingArgs]
Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
capacity_reservation_specification LaunchTemplateCapacityReservationSpecificationArgs
Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
cpu_options LaunchTemplateCpuOptionsArgs
The CPU options for the instance. See CPU Options below for more details.
credit_specification LaunchTemplateCreditSpecificationArgs
Customize the credit specification of the instance. See Credit Specification below for more details.
default_version int
Default Version of the launch template.
description str
Description of the launch template.
disable_api_termination bool
If true, enables EC2 Instance Termination Protection
ebs_optimized str
If true, the launched EC2 instance will be EBS-optimized.
elastic_gpu_specifications Sequence[LaunchTemplateElasticGpuSpecificationArgs]
The elastic GPU to attach to the instance. See Elastic GPU below for more details.
elastic_inference_accelerator LaunchTemplateElasticInferenceAcceleratorArgs
Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
enclave_options LaunchTemplateEnclaveOptionsArgs
Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
hibernation_options LaunchTemplateHibernationOptionsArgs
The hibernation options for the instance. See Hibernation Options below for more details.
iam_instance_profile LaunchTemplateIamInstanceProfileArgs
The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
image_id str
The AMI from which to launch the instance.
instance_initiated_shutdown_behavior str
Shutdown behavior for the instance. Can be stop or terminate. (Default: stop).
instance_market_options LaunchTemplateInstanceMarketOptionsArgs
The market (purchasing) option for the instance. See Market Options below for details.
instance_type str
The type of the instance.
kernel_id str
The kernel ID.
key_name str
The key name to use for the instance.
latest_version int
The latest version of the launch template.
license_specifications Sequence[LaunchTemplateLicenseSpecificationArgs]
A list of license specifications to associate with. See License Specification below for more details.
metadata_options LaunchTemplateMetadataOptionsArgs
Customize the metadata options for the instance. See Metadata Options below for more details.
monitoring LaunchTemplateMonitoringArgs
The monitoring option for the instance. See Monitoring below for more details.
name str
The name of the launch template. If you leave this blank, this provider will auto-generate a unique name.
name_prefix str
Creates a unique name beginning with the specified prefix. Conflicts with name.
network_interfaces Sequence[LaunchTemplateNetworkInterfaceArgs]
Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
placement LaunchTemplatePlacementArgs
The placement of the instance. See Placement below for more details.
ram_disk_id str
The ID of the RAM disk.
security_group_names Sequence[str]
A list of security group names to associate with. If you are creating Instances in a VPC, use vpc_security_group_ids instead.
tag_specifications Sequence[LaunchTemplateTagSpecificationArgs]
The tags to apply to the resources during launch. See Tag Specifications below for more details.
tags Mapping[str, str]
A map of tags to assign to the launch template. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider .
update_default_version bool
Whether to update Default Version each update. Conflicts with default_version.
user_data str
The Base64-encoded user data to provide when launching the instance.
vpc_security_group_ids Sequence[str]
A list of security group IDs to associate with.

Supporting Types

LaunchTemplateBlockDeviceMapping

DeviceName string
The name of the device to mount.
Ebs LaunchTemplateBlockDeviceMappingEbsArgs
Configure EBS volume properties.
NoDevice string
Suppresses the specified device included in the AMI’s block device mapping.
VirtualName string
The Instance Store Device Name (e.g. "ephemeral0").
DeviceName string
The name of the device to mount.
Ebs LaunchTemplateBlockDeviceMappingEbs
Configure EBS volume properties.
NoDevice string
Suppresses the specified device included in the AMI’s block device mapping.
VirtualName string
The Instance Store Device Name (e.g. "ephemeral0").
deviceName string
The name of the device to mount.
ebs LaunchTemplateBlockDeviceMappingEbsArgs
Configure EBS volume properties.
noDevice string
Suppresses the specified device included in the AMI’s block device mapping.
virtualName string
The Instance Store Device Name (e.g. "ephemeral0").
device_name str
The name of the device to mount.
ebs LaunchTemplateBlockDeviceMappingEbsArgs
Configure EBS volume properties.
no_device str
Suppresses the specified device included in the AMI’s block device mapping.
virtual_name str
The Instance Store Device Name (e.g. "ephemeral0").

LaunchTemplateBlockDeviceMappingEbs

DeleteOnTermination string
Whether the volume should be destroyed on instance termination. Defaults to false if not set. See Preserving Amazon EBS Volumes on Instance Termination for more information.
Encrypted string
Enables EBS encryption on the volume (Default: false). Cannot be used with snapshot_id.
Iops int
The amount of provisioned IOPS. This must be set with a volume_type of "io1/io2".
KmsKeyId string
The ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. encrypted must be set to true when this is set.
SnapshotId string
The Snapshot ID to mount.
Throughput int
The throughput to provision for a gp3 volume in MiB/s (specified as an integer, e.g. 500), with a maximum of 1,000 MiB/s.
VolumeSize int
The size of the volume in gigabytes.
VolumeType string
The volume type. Can be standard, gp2, gp3, io1, io2, sc1 or st1 (Default: gp2).
DeleteOnTermination string
Whether the volume should be destroyed on instance termination. Defaults to false if not set. See Preserving Amazon EBS Volumes on Instance Termination for more information.
Encrypted string
Enables EBS encryption on the volume (Default: false). Cannot be used with snapshot_id.
Iops int
The amount of provisioned IOPS. This must be set with a volume_type of "io1/io2".
KmsKeyId string
The ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. encrypted must be set to true when this is set.
SnapshotId string
The Snapshot ID to mount.
Throughput int
The throughput to provision for a gp3 volume in MiB/s (specified as an integer, e.g. 500), with a maximum of 1,000 MiB/s.
VolumeSize int
The size of the volume in gigabytes.
VolumeType string
The volume type. Can be standard, gp2, gp3, io1, io2, sc1 or st1 (Default: gp2).
deleteOnTermination string
Whether the volume should be destroyed on instance termination. Defaults to false if not set. See Preserving Amazon EBS Volumes on Instance Termination for more information.
encrypted string
Enables EBS encryption on the volume (Default: false). Cannot be used with snapshot_id.
iops number
The amount of provisioned IOPS. This must be set with a volume_type of "io1/io2".
kmsKeyId string
The ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. encrypted must be set to true when this is set.
snapshotId string
The Snapshot ID to mount.
throughput number
The throughput to provision for a gp3 volume in MiB/s (specified as an integer, e.g. 500), with a maximum of 1,000 MiB/s.
volumeSize number
The size of the volume in gigabytes.
volumeType string
The volume type. Can be standard, gp2, gp3, io1, io2, sc1 or st1 (Default: gp2).
delete_on_termination str
Whether the volume should be destroyed on instance termination. Defaults to false if not set. See Preserving Amazon EBS Volumes on Instance Termination for more information.
encrypted str
Enables EBS encryption on the volume (Default: false). Cannot be used with snapshot_id.
iops int
The amount of provisioned IOPS. This must be set with a volume_type of "io1/io2".
kms_key_id str
The ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. encrypted must be set to true when this is set.
snapshot_id str
The Snapshot ID to mount.
throughput int
The throughput to provision for a gp3 volume in MiB/s (specified as an integer, e.g. 500), with a maximum of 1,000 MiB/s.
volume_size int
The size of the volume in gigabytes.
volume_type str
The volume type. Can be standard, gp2, gp3, io1, io2, sc1 or st1 (Default: gp2).

LaunchTemplateCapacityReservationSpecification

CapacityReservationPreference string
Indicates the instance’s Capacity Reservation preferences. Can be open or none. (Default none).
CapacityReservationTarget LaunchTemplateCapacityReservationSpecificationCapacityReservationTargetArgs
Used to target a specific Capacity Reservation:
CapacityReservationPreference string
Indicates the instance’s Capacity Reservation preferences. Can be open or none. (Default none).
CapacityReservationTarget LaunchTemplateCapacityReservationSpecificationCapacityReservationTarget
Used to target a specific Capacity Reservation:
capacityReservationPreference string
Indicates the instance’s Capacity Reservation preferences. Can be open or none. (Default none).
capacityReservationTarget LaunchTemplateCapacityReservationSpecificationCapacityReservationTargetArgs
Used to target a specific Capacity Reservation:
capacity_reservation_preference str
Indicates the instance’s Capacity Reservation preferences. Can be open or none. (Default none).
capacity_reservation_target LaunchTemplateCapacityReservationSpecificationCapacityReservationTargetArgs
Used to target a specific Capacity Reservation:

LaunchTemplateCapacityReservationSpecificationCapacityReservationTarget

CapacityReservationId string
The ID of the Capacity Reservation to target.
CapacityReservationId string
The ID of the Capacity Reservation to target.
capacityReservationId string
The ID of the Capacity Reservation to target.
capacity_reservation_id str
The ID of the Capacity Reservation to target.

LaunchTemplateCpuOptions

CoreCount int
The number of CPU cores for the instance.
ThreadsPerCore int
The number of threads per CPU core. To disable Intel Hyper-Threading Technology for the instance, specify a value of 1. Otherwise, specify the default value of 2.
CoreCount int
The number of CPU cores for the instance.
ThreadsPerCore int
The number of threads per CPU core. To disable Intel Hyper-Threading Technology for the instance, specify a value of 1. Otherwise, specify the default value of 2.
coreCount number
The number of CPU cores for the instance.
threadsPerCore number
The number of threads per CPU core. To disable Intel Hyper-Threading Technology for the instance, specify a value of 1. Otherwise, specify the default value of 2.
core_count int
The number of CPU cores for the instance.
threads_per_core int
The number of threads per CPU core. To disable Intel Hyper-Threading Technology for the instance, specify a value of 1. Otherwise, specify the default value of 2.

LaunchTemplateCreditSpecification

CpuCredits string
The credit option for CPU usage. Can be "standard" or "unlimited". T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
CpuCredits string
The credit option for CPU usage. Can be "standard" or "unlimited". T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
cpuCredits string
The credit option for CPU usage. Can be "standard" or "unlimited". T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
cpu_credits str
The credit option for CPU usage. Can be "standard" or "unlimited". T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.

LaunchTemplateElasticGpuSpecification

LaunchTemplateElasticInferenceAccelerator

Type string
Accelerator type.
Type string
Accelerator type.
type string
Accelerator type.
type str
Accelerator type.

LaunchTemplateEnclaveOptions

Enabled bool
If set to true, Nitro Enclaves will be enabled on the instance.
Enabled bool
If set to true, Nitro Enclaves will be enabled on the instance.
enabled boolean
If set to true, Nitro Enclaves will be enabled on the instance.
enabled bool
If set to true, Nitro Enclaves will be enabled on the instance.

LaunchTemplateHibernationOptions

Configured bool
If set to true, the launched EC2 instance will hibernation enabled.
Configured bool
If set to true, the launched EC2 instance will hibernation enabled.
configured boolean
If set to true, the launched EC2 instance will hibernation enabled.
configured bool
If set to true, the launched EC2 instance will hibernation enabled.

LaunchTemplateIamInstanceProfile

Arn string
The Amazon Resource Name (ARN) of the instance profile.
Name string
The name of the instance profile.
Arn string
The Amazon Resource Name (ARN) of the instance profile.
Name string
The name of the instance profile.
arn string
The Amazon Resource Name (ARN) of the instance profile.
name string
The name of the instance profile.
arn str
The Amazon Resource Name (ARN) of the instance profile.
name str
The name of the instance profile.

LaunchTemplateInstanceMarketOptions

LaunchTemplateInstanceMarketOptionsSpotOptions

BlockDurationMinutes int
The required duration in minutes. This value must be a multiple of 60.
InstanceInterruptionBehavior string
The behavior when a Spot Instance is interrupted. Can be hibernate, stop, or terminate. (Default: terminate).
MaxPrice string
The maximum hourly price you’re willing to pay for the Spot Instances.
SpotInstanceType string
The Spot Instance request type. Can be one-time, or persistent.
ValidUntil string
The end date of the request.
BlockDurationMinutes int
The required duration in minutes. This value must be a multiple of 60.
InstanceInterruptionBehavior string
The behavior when a Spot Instance is interrupted. Can be hibernate, stop, or terminate. (Default: terminate).
MaxPrice string
The maximum hourly price you’re willing to pay for the Spot Instances.
SpotInstanceType string
The Spot Instance request type. Can be one-time, or persistent.
ValidUntil string
The end date of the request.
blockDurationMinutes number
The required duration in minutes. This value must be a multiple of 60.
instanceInterruptionBehavior string
The behavior when a Spot Instance is interrupted. Can be hibernate, stop, or terminate. (Default: terminate).
maxPrice string
The maximum hourly price you’re willing to pay for the Spot Instances.
spotInstanceType string
The Spot Instance request type. Can be one-time, or persistent.
validUntil string
The end date of the request.
block_duration_minutes int
The required duration in minutes. This value must be a multiple of 60.
instance_interruption_behavior str
The behavior when a Spot Instance is interrupted. Can be hibernate, stop, or terminate. (Default: terminate).
max_price str
The maximum hourly price you’re willing to pay for the Spot Instances.
spot_instance_type str
The Spot Instance request type. Can be one-time, or persistent.
valid_until str
The end date of the request.

LaunchTemplateLicenseSpecification

LicenseConfigurationArn string
ARN of the license configuration.
LicenseConfigurationArn string
ARN of the license configuration.
licenseConfigurationArn string
ARN of the license configuration.
license_configuration_arn str
ARN of the license configuration.

LaunchTemplateMetadataOptions

HttpEndpoint string
Whether the metadata service is available. Can be "enabled" or "disabled". (Default: "enabled").
HttpPutResponseHopLimit int
The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Can be an integer from 1 to 64. (Default: 1).
HttpTokens string
Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Can be "optional" or "required". (Default: "optional").
HttpEndpoint string
Whether the metadata service is available. Can be "enabled" or "disabled". (Default: "enabled").
HttpPutResponseHopLimit int
The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Can be an integer from 1 to 64. (Default: 1).
HttpTokens string
Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Can be "optional" or "required". (Default: "optional").
httpEndpoint string
Whether the metadata service is available. Can be "enabled" or "disabled". (Default: "enabled").
httpPutResponseHopLimit number
The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Can be an integer from 1 to 64. (Default: 1).
httpTokens string
Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Can be "optional" or "required". (Default: "optional").
http_endpoint str
Whether the metadata service is available. Can be "enabled" or "disabled". (Default: "enabled").
http_put_response_hop_limit int
The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Can be an integer from 1 to 64. (Default: 1).
http_tokens str
Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Can be "optional" or "required". (Default: "optional").

LaunchTemplateMonitoring

Enabled bool
If true, the launched EC2 instance will have detailed monitoring enabled.
Enabled bool
If true, the launched EC2 instance will have detailed monitoring enabled.
enabled boolean
If true, the launched EC2 instance will have detailed monitoring enabled.
enabled bool
If true, the launched EC2 instance will have detailed monitoring enabled.

LaunchTemplateNetworkInterface

AssociateCarrierIpAddress string
Associate 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. Boolean value.
AssociatePublicIpAddress string
Associate a public ip address with the network interface. Boolean value.
DeleteOnTermination string
Whether the network interface should be destroyed on instance termination. Defaults to false if not set.
Description string
Description of the network interface.
DeviceIndex int
The integer index of the network interface attachment.
Ipv4AddressCount int
The number of secondary private IPv4 addresses to assign to a network interface. Conflicts with ipv4_addresses
Ipv4Addresses List<string>
One or more private IPv4 addresses to associate. Conflicts with ipv4_address_count
Ipv6AddressCount int
The number of IPv6 addresses to assign to a network interface. Conflicts with ipv6_addresses
Ipv6Addresses List<string>
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with ipv6_address_count
NetworkInterfaceId string
The ID of the network interface to attach.
PrivateIpAddress string
The primary private IPv4 address.
SecurityGroups List<string>
A list of security group IDs to associate.
SubnetId string
The VPC Subnet ID to associate.
AssociateCarrierIpAddress string
Associate 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. Boolean value.
AssociatePublicIpAddress string
Associate a public ip address with the network interface. Boolean value.
DeleteOnTermination string
Whether the network interface should be destroyed on instance termination. Defaults to false if not set.
Description string
Description of the network interface.
DeviceIndex int
The integer index of the network interface attachment.
Ipv4AddressCount int
The number of secondary private IPv4 addresses to assign to a network interface. Conflicts with ipv4_addresses
Ipv4Addresses []string
One or more private IPv4 addresses to associate. Conflicts with ipv4_address_count
Ipv6AddressCount int
The number of IPv6 addresses to assign to a network interface. Conflicts with ipv6_addresses
Ipv6Addresses []string
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with ipv6_address_count
NetworkInterfaceId string
The ID of the network interface to attach.
PrivateIpAddress string
The primary private IPv4 address.
SecurityGroups []string
A list of security group IDs to associate.
SubnetId string
The VPC Subnet ID to associate.
associateCarrierIpAddress string
Associate 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. Boolean value.
associatePublicIpAddress string
Associate a public ip address with the network interface. Boolean value.
deleteOnTermination string
Whether the network interface should be destroyed on instance termination. Defaults to false if not set.
description string
Description of the network interface.
deviceIndex number
The integer index of the network interface attachment.
ipv4AddressCount number
The number of secondary private IPv4 addresses to assign to a network interface. Conflicts with ipv4_addresses
ipv4Addresses string[]
One or more private IPv4 addresses to associate. Conflicts with ipv4_address_count
ipv6AddressCount number
The number of IPv6 addresses to assign to a network interface. Conflicts with ipv6_addresses
ipv6Addresses string[]
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with ipv6_address_count
networkInterfaceId string
The ID of the network interface to attach.
privateIpAddress string
The primary private IPv4 address.
securityGroups string[]
A list of security group IDs to associate.
subnetId string
The VPC Subnet ID to associate.
associate_carrier_ip_address str
Associate 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. Boolean value.
associate_public_ip_address str
Associate a public ip address with the network interface. Boolean value.
delete_on_termination str
Whether the network interface should be destroyed on instance termination. Defaults to false if not set.
description str
Description of the network interface.
device_index int
The integer index of the network interface attachment.
ipv4_address_count int
The number of secondary private IPv4 addresses to assign to a network interface. Conflicts with ipv4_addresses
ipv4_addresses Sequence[str]
One or more private IPv4 addresses to associate. Conflicts with ipv4_address_count
ipv6_address_count int
The number of IPv6 addresses to assign to a network interface. Conflicts with ipv6_addresses
ipv6_addresses Sequence[str]
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with ipv6_address_count
network_interface_id str
The ID of the network interface to attach.
private_ip_address str
The primary private IPv4 address.
security_groups Sequence[str]
A list of security group IDs to associate.
subnet_id str
The VPC Subnet ID to associate.

LaunchTemplatePlacement

Affinity string
The affinity setting for an instance on a Dedicated Host.
AvailabilityZone string
The Availability Zone for the instance.
GroupName string
The name of the placement group for the instance.
HostId string
The ID of the Dedicated Host for the instance.
HostResourceGroupArn string
The ARN of the Host Resource Group in which to launch instances.
PartitionNumber int
The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition.
SpreadDomain string
Reserved for future use.
Tenancy string
The tenancy of the instance (if the instance is running in a VPC). Can be default, dedicated, or host.
Affinity string
The affinity setting for an instance on a Dedicated Host.
AvailabilityZone string
The Availability Zone for the instance.
GroupName string
The name of the placement group for the instance.
HostId string
The ID of the Dedicated Host for the instance.
HostResourceGroupArn string
The ARN of the Host Resource Group in which to launch instances.
PartitionNumber int
The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition.
SpreadDomain string
Reserved for future use.
Tenancy string
The tenancy of the instance (if the instance is running in a VPC). Can be default, dedicated, or host.
affinity string
The affinity setting for an instance on a Dedicated Host.
availabilityZone string
The Availability Zone for the instance.
groupName string
The name of the placement group for the instance.
hostId string
The ID of the Dedicated Host for the instance.
hostResourceGroupArn string
The ARN of the Host Resource Group in which to launch instances.
partitionNumber number
The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition.
spreadDomain string
Reserved for future use.
tenancy string
The tenancy of the instance (if the instance is running in a VPC). Can be default, dedicated, or host.
affinity str
The affinity setting for an instance on a Dedicated Host.
availability_zone str
The Availability Zone for the instance.
group_name str
The name of the placement group for the instance.
host_id str
The ID of the Dedicated Host for the instance.
host_resource_group_arn str
The ARN of the Host Resource Group in which to launch instances.
partition_number int
The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition.
spread_domain str
Reserved for future use.
tenancy str
The tenancy of the instance (if the instance is running in a VPC). Can be default, dedicated, or host.

LaunchTemplateTagSpecification

ResourceType string
The type of resource to tag. Valid values are instance, volume, elastic-gpu and spot-instances-request.
Tags Dictionary<string, string>
A map of tags to assign to the resource.
ResourceType string
The type of resource to tag. Valid values are instance, volume, elastic-gpu and spot-instances-request.
Tags map[string]string
A map of tags to assign to the resource.
resourceType string
The type of resource to tag. Valid values are instance, volume, elastic-gpu and spot-instances-request.
tags {[key: string]: string}
A map of tags to assign to the resource.
resource_type str
The type of resource to tag. Valid values are instance, volume, elastic-gpu and spot-instances-request.
tags Mapping[str, str]
A map of tags to assign to the resource.

Import

Launch Templates can be imported using the id, e.g.

 $ pulumi import aws:ec2/launchTemplate:LaunchTemplate web lt-12345678

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.