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);def LaunchTemplate(resource_name, opts=None, block_device_mappings=None, capacity_reservation_specification=None, cpu_options=None, credit_specification=None, description=None, disable_api_termination=None, ebs_optimized=None, elastic_gpu_specifications=None, elastic_inference_accelerator=None, hibernation_options=None, iam_instance_profile=None, image_id=None, instance_initiated_shutdown_behavior=None, instance_market_options=None, instance_type=None, kernel_id=None, key_name=None, license_specifications=None, metadata_options=None, monitoring=None, name=None, name_prefix=None, network_interfaces=None, placement=None, ram_disk_id=None, security_group_names=None, tag_specifications=None, tags=None, user_data=None, vpc_security_group_ids=None, __props__=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.
- opts ResourceOptions
- A bag of options that control this 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:
- Block
Device List<LaunchMappings Template Block Device Mapping Args> Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
- Capacity
Reservation LaunchSpecification Template Capacity Reservation Specification Args Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
- Cpu
Options LaunchTemplate Cpu Options Args The CPU options for the instance. See CPU Options below for more details.
- Credit
Specification LaunchTemplate Credit Specification Args Customize the credit specification of the instance. See Credit Specification below for more details.
- Description string
Description of the launch template.
- Disable
Api boolTermination If
true, enables EC2 Instance Termination Protection- Ebs
Optimized string If
true, the launched EC2 instance will be EBS-optimized.- Elastic
Gpu List<LaunchSpecifications Template Elastic Gpu Specification Args> The elastic GPU to attach to the instance. See Elastic GPU below for more details.
- Elastic
Inference LaunchAccelerator Template Elastic Inference Accelerator Args Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
- Hibernation
Options LaunchTemplate Hibernation Options Args The hibernation options for the instance. See Hibernation Options below for more details.
- Iam
Instance LaunchProfile Template Iam Instance Profile Args The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
- Image
Id string The AMI from which to launch the instance.
- Instance
Initiated stringShutdown Behavior Shutdown behavior for the instance. Can be
stoporterminate. (Default:stop).- Instance
Market LaunchOptions Template Instance Market Options Args The market (purchasing) option for the instance. See Market Options below for details.
- Instance
Type string The type of the instance.
- Kernel
Id string The kernel ID.
- Key
Name string The key name to use for the instance.
- License
Specifications List<LaunchTemplate License Specification Args> A list of license specifications to associate with. See License Specification below for more details.
- Metadata
Options LaunchTemplate Metadata Options Args Customize the metadata options for the instance. See Metadata Options below for more details.
- Monitoring
Launch
Template Monitoring Args 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Network
Interfaces List<LaunchTemplate Network Interface Args> Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- Placement
Launch
Template Placement Args The placement of the instance. See Placement below for more details.
- Ram
Disk stringId The ID of the RAM disk.
- Security
Group List<string>Names A list of security group names to associate with. If you are creating Instances in a VPC, use
vpc_security_group_idsinstead.-
List<Launch
Template Tag Specification Args> The tags to apply to the resources during launch. See Tag Specifications below for more details.
- Dictionary<string, string>
A map of tags to assign to the launch template.
- User
Data string The Base64-encoded user data to provide when launching the instance.
- Vpc
Security List<string>Group Ids A list of security group IDs to associate with.
- Block
Device []LaunchMappings Template Block Device Mapping Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
- Capacity
Reservation LaunchSpecification Template Capacity Reservation Specification Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
- Cpu
Options LaunchTemplate Cpu Options The CPU options for the instance. See CPU Options below for more details.
- Credit
Specification LaunchTemplate Credit Specification Customize the credit specification of the instance. See Credit Specification below for more details.
- Description string
Description of the launch template.
- Disable
Api boolTermination If
true, enables EC2 Instance Termination Protection- Ebs
Optimized string If
true, the launched EC2 instance will be EBS-optimized.- Elastic
Gpu []LaunchSpecifications Template Elastic Gpu Specification The elastic GPU to attach to the instance. See Elastic GPU below for more details.
- Elastic
Inference LaunchAccelerator Template Elastic Inference Accelerator Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
- Hibernation
Options LaunchTemplate Hibernation Options The hibernation options for the instance. See Hibernation Options below for more details.
- Iam
Instance LaunchProfile Template Iam Instance Profile The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
- Image
Id string The AMI from which to launch the instance.
- Instance
Initiated stringShutdown Behavior Shutdown behavior for the instance. Can be
stoporterminate. (Default:stop).- Instance
Market LaunchOptions Template Instance Market Options The market (purchasing) option for the instance. See Market Options below for details.
- Instance
Type string The type of the instance.
- Kernel
Id string The kernel ID.
- Key
Name string The key name to use for the instance.
- License
Specifications []LaunchTemplate License Specification A list of license specifications to associate with. See License Specification below for more details.
- Metadata
Options LaunchTemplate Metadata Options Customize the metadata options for the instance. See Metadata Options below for more details.
- Monitoring
Launch
Template Monitoring 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Network
Interfaces []LaunchTemplate Network Interface Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- Placement
Launch
Template Placement The placement of the instance. See Placement below for more details.
- Ram
Disk stringId The ID of the RAM disk.
- Security
Group []stringNames A list of security group names to associate with. If you are creating Instances in a VPC, use
vpc_security_group_idsinstead.-
[]Launch
Template Tag Specification The tags to apply to the resources during launch. See Tag Specifications below for more details.
- map[string]string
A map of tags to assign to the launch template.
- User
Data string The Base64-encoded user data to provide when launching the instance.
- Vpc
Security []stringGroup Ids A list of security group IDs to associate with.
- block
Device LaunchMappings Template Block Device Mapping[] Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
- capacity
Reservation LaunchSpecification Template Capacity Reservation Specification Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
- cpu
Options LaunchTemplate Cpu Options The CPU options for the instance. See CPU Options below for more details.
- credit
Specification LaunchTemplate Credit Specification Customize the credit specification of the instance. See Credit Specification below for more details.
- description string
Description of the launch template.
- disable
Api booleanTermination If
true, enables EC2 Instance Termination Protection- ebs
Optimized string If
true, the launched EC2 instance will be EBS-optimized.- elastic
Gpu LaunchSpecifications Template Elastic Gpu Specification[] The elastic GPU to attach to the instance. See Elastic GPU below for more details.
- elastic
Inference LaunchAccelerator Template Elastic Inference Accelerator Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
- hibernation
Options LaunchTemplate Hibernation Options The hibernation options for the instance. See Hibernation Options below for more details.
- iam
Instance LaunchProfile Template Iam Instance Profile The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
- image
Id string The AMI from which to launch the instance.
- instance
Initiated stringShutdown Behavior Shutdown behavior for the instance. Can be
stoporterminate. (Default:stop).- instance
Market LaunchOptions Template Instance Market Options The market (purchasing) option for the instance. See Market Options below for details.
- instance
Type string The type of the instance.
- kernel
Id string The kernel ID.
- key
Name string The key name to use for the instance.
- license
Specifications LaunchTemplate License Specification[] A list of license specifications to associate with. See License Specification below for more details.
- metadata
Options LaunchTemplate Metadata Options Customize the metadata options for the instance. See Metadata Options below for more details.
- monitoring
Launch
Template Monitoring 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.
- name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- network
Interfaces LaunchTemplate Network Interface[] Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- placement
Launch
Template Placement The placement of the instance. See Placement below for more details.
- ram
Disk stringId The ID of the RAM disk.
- security
Group string[]Names A list of security group names to associate with. If you are creating Instances in a VPC, use
vpc_security_group_idsinstead.-
Launch
Template Tag Specification[] The tags to apply to the resources during launch. See Tag Specifications below for more details.
- {[key: string]: string}
A map of tags to assign to the launch template.
- user
Data string The Base64-encoded user data to provide when launching the instance.
- vpc
Security string[]Group Ids A list of security group IDs to associate with.
- block_
device_ List[Launchmappings Template Block Device Mapping] Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
- capacity_
reservation_ Dict[Launchspecification Template Capacity Reservation Specification] Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
- cpu_
options Dict[LaunchTemplate Cpu Options] The CPU options for the instance. See CPU Options below for more details.
- credit_
specification Dict[LaunchTemplate Credit Specification] Customize the credit specification of the instance. See Credit Specification below for more details.
- description str
Description of the launch template.
- disable_
api_ booltermination If
true, enables EC2 Instance Termination Protection- ebs_
optimized str If
true, the launched EC2 instance will be EBS-optimized.- elastic_
gpu_ List[Launchspecifications Template Elastic Gpu Specification] The elastic GPU to attach to the instance. See Elastic GPU below for more details.
- elastic_
inference_ Dict[Launchaccelerator Template Elastic Inference Accelerator] Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
- hibernation_
options Dict[LaunchTemplate Hibernation Options] The hibernation options for the instance. See Hibernation Options below for more details.
- iam_
instance_ Dict[Launchprofile Template Iam Instance Profile] 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_ strshutdown_ behavior Shutdown behavior for the instance. Can be
stoporterminate. (Default:stop).- instance_
market_ Dict[Launchoptions Template Instance Market Options] 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 List[LaunchTemplate License Specification] A list of license specifications to associate with. See License Specification below for more details.
- metadata_
options Dict[LaunchTemplate Metadata Options] Customize the metadata options for the instance. See Metadata Options below for more details.
- monitoring
Dict[Launch
Template Monitoring] 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 List[LaunchTemplate Network Interface] Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- placement
Dict[Launch
Template Placement] The placement of the instance. See Placement below for more details.
- ram_
disk_ strid The ID of the RAM disk.
- security_
group_ List[str]names A list of security group names to associate with. If you are creating Instances in a VPC, use
vpc_security_group_idsinstead.- tag_
specifications List[LaunchTemplate Tag Specification] The tags to apply to the resources during launch. See Tag Specifications below for more details.
- Dict[str, str]
A map of tags to assign to the launch template.
- user_
data str The Base64-encoded user data to provide when launching the instance.
- vpc_
security_ List[str]group_ ids 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.
- Default
Version int The default version of the launch template.
- Id string
- The provider-assigned unique ID for this managed resource.
- Latest
Version int The latest version of the launch template.
- Arn string
The Amazon Resource Name (ARN) of the instance profile.
- Default
Version int The default version of the launch template.
- Id string
- The provider-assigned unique ID for this managed resource.
- Latest
Version int The latest version of the launch template.
- arn string
The Amazon Resource Name (ARN) of the instance profile.
- default
Version number The default version of the launch template.
- id string
- The provider-assigned unique ID for this managed resource.
- latest
Version number The latest version of the launch template.
- arn str
The Amazon Resource Name (ARN) of the instance profile.
- default_
version float The default version of the launch template.
- id str
- The provider-assigned unique ID for this managed resource.
- latest_
version float 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): LaunchTemplatestatic get(resource_name, id, opts=None, arn=None, block_device_mappings=None, capacity_reservation_specification=None, cpu_options=None, credit_specification=None, default_version=None, description=None, disable_api_termination=None, ebs_optimized=None, elastic_gpu_specifications=None, elastic_inference_accelerator=None, hibernation_options=None, iam_instance_profile=None, image_id=None, instance_initiated_shutdown_behavior=None, instance_market_options=None, instance_type=None, kernel_id=None, key_name=None, latest_version=None, license_specifications=None, metadata_options=None, monitoring=None, name=None, name_prefix=None, network_interfaces=None, placement=None, ram_disk_id=None, security_group_names=None, tag_specifications=None, tags=None, user_data=None, vpc_security_group_ids=None, __props__=None);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.
- Block
Device List<LaunchMappings Template Block Device Mapping Args> Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
- Capacity
Reservation LaunchSpecification Template Capacity Reservation Specification Args Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
- Cpu
Options LaunchTemplate Cpu Options Args The CPU options for the instance. See CPU Options below for more details.
- Credit
Specification LaunchTemplate Credit Specification Args Customize the credit specification of the instance. See Credit Specification below for more details.
- Default
Version int The default version of the launch template.
- Description string
Description of the launch template.
- Disable
Api boolTermination If
true, enables EC2 Instance Termination Protection- Ebs
Optimized string If
true, the launched EC2 instance will be EBS-optimized.- Elastic
Gpu List<LaunchSpecifications Template Elastic Gpu Specification Args> The elastic GPU to attach to the instance. See Elastic GPU below for more details.
- Elastic
Inference LaunchAccelerator Template Elastic Inference Accelerator Args Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
- Hibernation
Options LaunchTemplate Hibernation Options Args The hibernation options for the instance. See Hibernation Options below for more details.
- Iam
Instance LaunchProfile Template Iam Instance Profile Args The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
- Image
Id string The AMI from which to launch the instance.
- Instance
Initiated stringShutdown Behavior Shutdown behavior for the instance. Can be
stoporterminate. (Default:stop).- Instance
Market LaunchOptions Template Instance Market Options Args The market (purchasing) option for the instance. See Market Options below for details.
- Instance
Type string The type of the instance.
- Kernel
Id string The kernel ID.
- Key
Name string The key name to use for the instance.
- Latest
Version int The latest version of the launch template.
- License
Specifications List<LaunchTemplate License Specification Args> A list of license specifications to associate with. See License Specification below for more details.
- Metadata
Options LaunchTemplate Metadata Options Args Customize the metadata options for the instance. See Metadata Options below for more details.
- Monitoring
Launch
Template Monitoring Args 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Network
Interfaces List<LaunchTemplate Network Interface Args> Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- Placement
Launch
Template Placement Args The placement of the instance. See Placement below for more details.
- Ram
Disk stringId The ID of the RAM disk.
- Security
Group List<string>Names A list of security group names to associate with. If you are creating Instances in a VPC, use
vpc_security_group_idsinstead.-
List<Launch
Template Tag Specification Args> The tags to apply to the resources during launch. See Tag Specifications below for more details.
- Dictionary<string, string>
A map of tags to assign to the launch template.
- User
Data string The Base64-encoded user data to provide when launching the instance.
- Vpc
Security List<string>Group Ids A list of security group IDs to associate with.
- Arn string
The Amazon Resource Name (ARN) of the instance profile.
- Block
Device []LaunchMappings Template Block Device Mapping Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
- Capacity
Reservation LaunchSpecification Template Capacity Reservation Specification Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
- Cpu
Options LaunchTemplate Cpu Options The CPU options for the instance. See CPU Options below for more details.
- Credit
Specification LaunchTemplate Credit Specification Customize the credit specification of the instance. See Credit Specification below for more details.
- Default
Version int The default version of the launch template.
- Description string
Description of the launch template.
- Disable
Api boolTermination If
true, enables EC2 Instance Termination Protection- Ebs
Optimized string If
true, the launched EC2 instance will be EBS-optimized.- Elastic
Gpu []LaunchSpecifications Template Elastic Gpu Specification The elastic GPU to attach to the instance. See Elastic GPU below for more details.
- Elastic
Inference LaunchAccelerator Template Elastic Inference Accelerator Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
- Hibernation
Options LaunchTemplate Hibernation Options The hibernation options for the instance. See Hibernation Options below for more details.
- Iam
Instance LaunchProfile Template Iam Instance Profile The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
- Image
Id string The AMI from which to launch the instance.
- Instance
Initiated stringShutdown Behavior Shutdown behavior for the instance. Can be
stoporterminate. (Default:stop).- Instance
Market LaunchOptions Template Instance Market Options The market (purchasing) option for the instance. See Market Options below for details.
- Instance
Type string The type of the instance.
- Kernel
Id string The kernel ID.
- Key
Name string The key name to use for the instance.
- Latest
Version int The latest version of the launch template.
- License
Specifications []LaunchTemplate License Specification A list of license specifications to associate with. See License Specification below for more details.
- Metadata
Options LaunchTemplate Metadata Options Customize the metadata options for the instance. See Metadata Options below for more details.
- Monitoring
Launch
Template Monitoring 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Network
Interfaces []LaunchTemplate Network Interface Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- Placement
Launch
Template Placement The placement of the instance. See Placement below for more details.
- Ram
Disk stringId The ID of the RAM disk.
- Security
Group []stringNames A list of security group names to associate with. If you are creating Instances in a VPC, use
vpc_security_group_idsinstead.-
[]Launch
Template Tag Specification The tags to apply to the resources during launch. See Tag Specifications below for more details.
- map[string]string
A map of tags to assign to the launch template.
- User
Data string The Base64-encoded user data to provide when launching the instance.
- Vpc
Security []stringGroup Ids A list of security group IDs to associate with.
- arn string
The Amazon Resource Name (ARN) of the instance profile.
- block
Device LaunchMappings Template Block Device Mapping[] Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
- capacity
Reservation LaunchSpecification Template Capacity Reservation Specification Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
- cpu
Options LaunchTemplate Cpu Options The CPU options for the instance. See CPU Options below for more details.
- credit
Specification LaunchTemplate Credit Specification Customize the credit specification of the instance. See Credit Specification below for more details.
- default
Version number The default version of the launch template.
- description string
Description of the launch template.
- disable
Api booleanTermination If
true, enables EC2 Instance Termination Protection- ebs
Optimized string If
true, the launched EC2 instance will be EBS-optimized.- elastic
Gpu LaunchSpecifications Template Elastic Gpu Specification[] The elastic GPU to attach to the instance. See Elastic GPU below for more details.
- elastic
Inference LaunchAccelerator Template Elastic Inference Accelerator Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
- hibernation
Options LaunchTemplate Hibernation Options The hibernation options for the instance. See Hibernation Options below for more details.
- iam
Instance LaunchProfile Template Iam Instance Profile The IAM Instance Profile to launch the instance with. See Instance Profile below for more details.
- image
Id string The AMI from which to launch the instance.
- instance
Initiated stringShutdown Behavior Shutdown behavior for the instance. Can be
stoporterminate. (Default:stop).- instance
Market LaunchOptions Template Instance Market Options The market (purchasing) option for the instance. See Market Options below for details.
- instance
Type string The type of the instance.
- kernel
Id string The kernel ID.
- key
Name string The key name to use for the instance.
- latest
Version number The latest version of the launch template.
- license
Specifications LaunchTemplate License Specification[] A list of license specifications to associate with. See License Specification below for more details.
- metadata
Options LaunchTemplate Metadata Options Customize the metadata options for the instance. See Metadata Options below for more details.
- monitoring
Launch
Template Monitoring 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.
- name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- network
Interfaces LaunchTemplate Network Interface[] Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- placement
Launch
Template Placement The placement of the instance. See Placement below for more details.
- ram
Disk stringId The ID of the RAM disk.
- security
Group string[]Names A list of security group names to associate with. If you are creating Instances in a VPC, use
vpc_security_group_idsinstead.-
Launch
Template Tag Specification[] The tags to apply to the resources during launch. See Tag Specifications below for more details.
- {[key: string]: string}
A map of tags to assign to the launch template.
- user
Data string The Base64-encoded user data to provide when launching the instance.
- vpc
Security string[]Group Ids A list of security group IDs to associate with.
- arn str
The Amazon Resource Name (ARN) of the instance profile.
- block_
device_ List[Launchmappings Template Block Device Mapping] Specify volumes to attach to the instance besides the volumes specified by the AMI. See Block Devices below for details.
- capacity_
reservation_ Dict[Launchspecification Template Capacity Reservation Specification] Targeting for EC2 capacity reservations. See Capacity Reservation Specification below for more details.
- cpu_
options Dict[LaunchTemplate Cpu Options] The CPU options for the instance. See CPU Options below for more details.
- credit_
specification Dict[LaunchTemplate Credit Specification] Customize the credit specification of the instance. See Credit Specification below for more details.
- default_
version float The default version of the launch template.
- description str
Description of the launch template.
- disable_
api_ booltermination If
true, enables EC2 Instance Termination Protection- ebs_
optimized str If
true, the launched EC2 instance will be EBS-optimized.- elastic_
gpu_ List[Launchspecifications Template Elastic Gpu Specification] The elastic GPU to attach to the instance. See Elastic GPU below for more details.
- elastic_
inference_ Dict[Launchaccelerator Template Elastic Inference Accelerator] Configuration block containing an Elastic Inference Accelerator to attach to the instance. See Elastic Inference Accelerator below for more details.
- hibernation_
options Dict[LaunchTemplate Hibernation Options] The hibernation options for the instance. See Hibernation Options below for more details.
- iam_
instance_ Dict[Launchprofile Template Iam Instance Profile] 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_ strshutdown_ behavior Shutdown behavior for the instance. Can be
stoporterminate. (Default:stop).- instance_
market_ Dict[Launchoptions Template Instance Market Options] 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 float The latest version of the launch template.
- license_
specifications List[LaunchTemplate License Specification] A list of license specifications to associate with. See License Specification below for more details.
- metadata_
options Dict[LaunchTemplate Metadata Options] Customize the metadata options for the instance. See Metadata Options below for more details.
- monitoring
Dict[Launch
Template Monitoring] 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 List[LaunchTemplate Network Interface] Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
- placement
Dict[Launch
Template Placement] The placement of the instance. See Placement below for more details.
- ram_
disk_ strid The ID of the RAM disk.
- security_
group_ List[str]names A list of security group names to associate with. If you are creating Instances in a VPC, use
vpc_security_group_idsinstead.- tag_
specifications List[LaunchTemplate Tag Specification] The tags to apply to the resources during launch. See Tag Specifications below for more details.
- Dict[str, str]
A map of tags to assign to the launch template.
- user_
data str The Base64-encoded user data to provide when launching the instance.
- vpc_
security_ List[str]group_ ids A list of security group IDs to associate with.
Supporting Types
LaunchTemplateBlockDeviceMapping
- Device
Name string The name of the device to mount.
- Ebs
Launch
Template Block Device Mapping Ebs Args Configure EBS volume properties.
- No
Device string Suppresses the specified device included in the AMI’s block device mapping.
- Virtual
Name string The Instance Store Device Name (e.g.
"ephemeral0").
- Device
Name string The name of the device to mount.
- Ebs
Launch
Template Block Device Mapping Ebs Configure EBS volume properties.
- No
Device string Suppresses the specified device included in the AMI’s block device mapping.
- Virtual
Name string The Instance Store Device Name (e.g.
"ephemeral0").
- device
Name string The name of the device to mount.
- ebs
Launch
Template Block Device Mapping Ebs Configure EBS volume properties.
- no
Device string Suppresses the specified device included in the AMI’s block device mapping.
- virtual
Name string The Instance Store Device Name (e.g.
"ephemeral0").
- device_
name str The name of the device to mount.
- ebs
Dict[Launch
Template Block Device Mapping Ebs] 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
- Delete
On stringTermination Whether the volume should be destroyed on instance termination. Defaults to
falseif 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 withsnapshot_id.- Iops int
The amount of provisioned IOPS. This must be set with a
volume_typeof"io1".- Kms
Key stringId The ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume.
encryptedmust be set totruewhen this is set.- Snapshot
Id string The Snapshot ID to mount.
- Volume
Size int The size of the volume in gigabytes.
- Volume
Type string The type of volume. Can be
"standard","gp2", or"io1". (Default:"standard").
- Delete
On stringTermination Whether the volume should be destroyed on instance termination. Defaults to
falseif 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 withsnapshot_id.- Iops int
The amount of provisioned IOPS. This must be set with a
volume_typeof"io1".- Kms
Key stringId The ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume.
encryptedmust be set totruewhen this is set.- Snapshot
Id string The Snapshot ID to mount.
- Volume
Size int The size of the volume in gigabytes.
- Volume
Type string The type of volume. Can be
"standard","gp2", or"io1". (Default:"standard").
- delete
On stringTermination Whether the volume should be destroyed on instance termination. Defaults to
falseif 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 withsnapshot_id.- iops number
The amount of provisioned IOPS. This must be set with a
volume_typeof"io1".- kms
Key stringId The ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume.
encryptedmust be set totruewhen this is set.- snapshot
Id string The Snapshot ID to mount.
- volume
Size number The size of the volume in gigabytes.
- volume
Type string The type of volume. Can be
"standard","gp2", or"io1". (Default:"standard").
- delete
On strTermination Whether the volume should be destroyed on instance termination. Defaults to
falseif 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 withsnapshot_id.- iops float
The amount of provisioned IOPS. This must be set with a
volume_typeof"io1".- kms_
key_ strid The ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume.
encryptedmust be set totruewhen this is set.- snapshot_
id str The Snapshot ID to mount.
- volume
Type str The type of volume. Can be
"standard","gp2", or"io1". (Default:"standard").- volume_
size float The size of the volume in gigabytes.
LaunchTemplateCapacityReservationSpecification
- Capacity
Reservation stringPreference Indicates the instance’s Capacity Reservation preferences. Can be
openornone. (Defaultnone).- Capacity
Reservation LaunchTarget Template Capacity Reservation Specification Capacity Reservation Target Args Used to target a specific Capacity Reservation:
- Capacity
Reservation stringPreference Indicates the instance’s Capacity Reservation preferences. Can be
openornone. (Defaultnone).- Capacity
Reservation LaunchTarget Template Capacity Reservation Specification Capacity Reservation Target Used to target a specific Capacity Reservation:
- capacity
Reservation stringPreference Indicates the instance’s Capacity Reservation preferences. Can be
openornone. (Defaultnone).- capacity
Reservation LaunchTarget Template Capacity Reservation Specification Capacity Reservation Target Used to target a specific Capacity Reservation:
- capacity
Reservation strPreference Indicates the instance’s Capacity Reservation preferences. Can be
openornone. (Defaultnone).- capacity
Reservation Dict[LaunchTarget Template Capacity Reservation Specification Capacity Reservation Target] Used to target a specific Capacity Reservation:
LaunchTemplateCapacityReservationSpecificationCapacityReservationTarget
- Capacity
Reservation stringId The ID of the Capacity Reservation to target.
- Capacity
Reservation stringId The ID of the Capacity Reservation to target.
- capacity
Reservation stringId The ID of the Capacity Reservation to target.
- capacity
Reservation strId The ID of the Capacity Reservation to target.
LaunchTemplateCpuOptions
- Core
Count int The number of CPU cores for the instance.
- Threads
Per intCore 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 intCore 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 number The number of CPU cores for the instance.
- threads
Per numberCore 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 float The number of CPU cores for the instance.
- threads
Per floatCore 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
- Cpu
Credits 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 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 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
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
LaunchTemplateInstanceMarketOptions
- Market
Type string The market type. Can be
spot.- Spot
Options LaunchTemplate Instance Market Options Spot Options Args The options for Spot Instance
- Market
Type string The market type. Can be
spot.- Spot
Options LaunchTemplate Instance Market Options Spot Options The options for Spot Instance
- market
Type string The market type. Can be
spot.- spot
Options LaunchTemplate Instance Market Options Spot Options The options for Spot Instance
- market
Type str The market type. Can be
spot.- spot_
options Dict[LaunchTemplate Instance Market Options Spot Options] The options for Spot Instance
LaunchTemplateInstanceMarketOptionsSpotOptions
- Block
Duration intMinutes The required duration in minutes. This value must be a multiple of 60.
- Instance
Interruption stringBehavior The behavior when a Spot Instance is interrupted. Can be
hibernate,stop, orterminate. (Default:terminate).- Max
Price string The maximum hourly price you’re willing to pay for the Spot Instances.
- Spot
Instance stringType The Spot Instance request type. Can be
one-time, orpersistent.- Valid
Until string The end date of the request.
- Block
Duration intMinutes The required duration in minutes. This value must be a multiple of 60.
- Instance
Interruption stringBehavior The behavior when a Spot Instance is interrupted. Can be
hibernate,stop, orterminate. (Default:terminate).- Max
Price string The maximum hourly price you’re willing to pay for the Spot Instances.
- Spot
Instance stringType The Spot Instance request type. Can be
one-time, orpersistent.- Valid
Until string The end date of the request.
- block
Duration numberMinutes The required duration in minutes. This value must be a multiple of 60.
- instance
Interruption stringBehavior The behavior when a Spot Instance is interrupted. Can be
hibernate,stop, orterminate. (Default:terminate).- max
Price string The maximum hourly price you’re willing to pay for the Spot Instances.
- spot
Instance stringType The Spot Instance request type. Can be
one-time, orpersistent.- valid
Until string The end date of the request.
- block_
duration_ floatminutes The required duration in minutes. This value must be a multiple of 60.
- instance
Interruption strBehavior The behavior when a Spot Instance is interrupted. Can be
hibernate,stop, orterminate. (Default:terminate).- max
Price str The maximum hourly price you’re willing to pay for the Spot Instances.
- spot
Instance strType The Spot Instance request type. Can be
one-time, orpersistent.- valid_
until str The end date of the request.
LaunchTemplateLicenseSpecification
- License
Configuration stringArn ARN of the license configuration.
- License
Configuration stringArn ARN of the license configuration.
- license
Configuration stringArn ARN of the license configuration.
- license_
configuration_ strarn ARN of the license configuration.
LaunchTemplateMetadataOptions
- Http
Endpoint string Whether the metadata service is available. Can be
"enabled"or"disabled". (Default:"enabled").- Http
Put intResponse Hop Limit 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
1to64. (Default:1).- Http
Tokens string Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2. Can be
"optional"or"required". (Default:"optional").
- Http
Endpoint string Whether the metadata service is available. Can be
"enabled"or"disabled". (Default:"enabled").- Http
Put intResponse Hop Limit 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
1to64. (Default:1).- Http
Tokens string Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2. Can be
"optional"or"required". (Default:"optional").
- http
Endpoint string Whether the metadata service is available. Can be
"enabled"or"disabled". (Default:"enabled").- http
Put numberResponse Hop Limit 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
1to64. (Default:1).- http
Tokens string Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2. 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 floatResponse Hop Limit 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
1to64. (Default:1).- http
Tokens str Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2. Can be
"optional"or"required". (Default:"optional").
LaunchTemplateMonitoring
LaunchTemplateNetworkInterface
- Associate
Public stringIp Address Associate a public ip address with the network interface. Boolean value.
- Delete
On boolTermination Whether the network interface should be destroyed on instance termination. Defaults to
falseif not set.- Description string
Description of the network interface.
- Device
Index int The integer index of the network interface attachment.
- Ipv4Address
Count 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- Ipv6Address
Count 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- Network
Interface stringId The ID of the network interface to attach.
- Private
Ip stringAddress The primary private IPv4 address.
- Security
Groups List<string> A list of security group IDs to associate.
- Subnet
Id string The VPC Subnet ID to associate.
- Associate
Public stringIp Address Associate a public ip address with the network interface. Boolean value.
- Delete
On boolTermination Whether the network interface should be destroyed on instance termination. Defaults to
falseif not set.- Description string
Description of the network interface.
- Device
Index int The integer index of the network interface attachment.
- Ipv4Address
Count 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- Ipv6Address
Count 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- Network
Interface stringId The ID of the network interface to attach.
- Private
Ip stringAddress The primary private IPv4 address.
- Security
Groups []string A list of security group IDs to associate.
- Subnet
Id string The VPC Subnet ID to associate.
- associate
Public stringIp Address Associate a public ip address with the network interface. Boolean value.
- delete
On booleanTermination Whether the network interface should be destroyed on instance termination. Defaults to
falseif not set.- description string
Description of the network interface.
- device
Index number The integer index of the network interface attachment.
- ipv4Address
Count 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- ipv6Address
Count 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- network
Interface stringId The ID of the network interface to attach.
- private
Ip stringAddress The primary private IPv4 address.
- security
Groups string[] A list of security group IDs to associate.
- subnet
Id string The VPC Subnet ID to associate.
- associate_
public_ strip_ address Associate a public ip address with the network interface. Boolean value.
- delete
On boolTermination Whether the network interface should be destroyed on instance termination. Defaults to
falseif not set.- description str
Description of the network interface.
- device_
index float The integer index of the network interface attachment.
- ipv4Address
Count float The number of secondary private IPv4 addresses to assign to a network interface. Conflicts with
ipv4_addresses- ipv4Addresses List[str]
One or more private IPv4 addresses to associate. Conflicts with
ipv4_address_count- ipv6_
address_ floatcount The number of IPv6 addresses to assign to a network interface. Conflicts with
ipv6_addresses- ipv6_
addresses List[str] One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with
ipv6_address_count- network_
interface_ strid The ID of the network interface to attach.
- private_
ip_ straddress The primary private IPv4 address.
- security_
groups List[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.
- Availability
Zone string The Availability Zone for the instance.
- Group
Name string The name of the placement group for the instance.
- Host
Id string The ID of the Dedicated Host for the instance.
- 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 string Reserved for future use.
- Tenancy string
The tenancy of the instance (if the instance is running in a VPC). Can be
default,dedicated, orhost.
- Affinity string
The affinity setting for an instance on a Dedicated Host.
- Availability
Zone string The Availability Zone for the instance.
- Group
Name string The name of the placement group for the instance.
- Host
Id string The ID of the Dedicated Host for the instance.
- 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 string Reserved for future use.
- Tenancy string
The tenancy of the instance (if the instance is running in a VPC). Can be
default,dedicated, orhost.
- affinity string
The affinity setting for an instance on a Dedicated Host.
- availability
Zone string The Availability Zone for the instance.
- group
Name string The name of the placement group for the instance.
- host
Id string The ID of the Dedicated Host for the instance.
- 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 (if the instance is running in a VPC). Can be
default,dedicated, orhost.
- 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.
- partition
Number float 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, orhost.
LaunchTemplateTagSpecification
- Resource
Type string The type of resource to tag. Valid values are
instanceandvolume.- Dictionary<string, string>
A map of tags to assign to the resource.
- Resource
Type string The type of resource to tag. Valid values are
instanceandvolume.- map[string]string
A map of tags to assign to the resource.
- resource
Type string The type of resource to tag. Valid values are
instanceandvolume.- {[key: string]: string}
A map of tags to assign to the resource.
- resource_
type str The type of resource to tag. Valid values are
instanceandvolume.- Dict[str, str]
A map of tags to assign to the resource.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.