@ -34,13 +34,16 @@ options:
description :
description :
- The ID for the launch template , can be used for all cases except creating a new Launch Template .
- The ID for the launch template , can be used for all cases except creating a new Launch Template .
aliases : [ id ]
aliases : [ id ]
type : str
template_name :
template_name :
description :
description :
- The template name . This must be unique in the region - account combination you are using .
- The template name . This must be unique in the region - account combination you are using .
aliases : [ name ]
aliases : [ name ]
type : str
default_version :
default_version :
description :
description :
- Which version should be the default when users spin up new instances based on this template ? By default , the latest version will be made the default .
- Which version should be the default when users spin up new instances based on this template ? By default , the latest version will be made the default .
type : str
default : latest
default : latest
state :
state :
description :
description :
@ -48,6 +51,7 @@ options:
- Deleting specific versions of a launch template is not supported at this time .
- Deleting specific versions of a launch template is not supported at this time .
choices : [ present , absent ]
choices : [ present , absent ]
default : present
default : present
type : str
block_device_mappings :
block_device_mappings :
description :
description :
- The block device mapping . Supplying both a snapshot ID and an encryption
- The block device mapping . Supplying both a snapshot ID and an encryption
@ -56,11 +60,15 @@ options:
created from a snapshot . If a snapshot is the basis for the volume , it
created from a snapshot . If a snapshot is the basis for the volume , it
contains data by definition and its encryption status cannot be changed
contains data by definition and its encryption status cannot be changed
using this action .
using this action .
type : list
elements : dict
suboptions :
suboptions :
device_name :
device_name :
description : The device name ( for example , / dev / sdh or xvdh ) .
description : The device name ( for example , / dev / sdh or xvdh ) .
type : str
no_device :
no_device :
description : Suppresses the specified device included in the block device mapping of the AMI .
description : Suppresses the specified device included in the block device mapping of the AMI .
type : str
virtual_name :
virtual_name :
description : >
description : >
The virtual device name ( ephemeralN ) . Instance store volumes are
The virtual device name ( ephemeralN ) . Instance store volumes are
@ -68,8 +76,10 @@ options:
store volumes can specify mappings for ephemeral0 and ephemeral1 . The
store volumes can specify mappings for ephemeral0 and ephemeral1 . The
number of available instance store volumes depends on the instance
number of available instance store volumes depends on the instance
type . After you connect to the instance , you must mount the volume .
type . After you connect to the instance , you must mount the volume .
type : str
ebs :
ebs :
description : Parameters used to automatically set up EBS volumes when the instance is launched .
description : Parameters used to automatically set up EBS volumes when the instance is launchedself
type : dict
suboptions :
suboptions :
delete_on_termination :
delete_on_termination :
description : Indicates whether the EBS volume is deleted on instance termination .
description : Indicates whether the EBS volume is deleted on instance termination .
@ -80,6 +90,7 @@ options:
can only be attached to instances that support Amazon EBS
can only be attached to instances that support Amazon EBS
encryption . If you are creating a volume from a snapshot , you
encryption . If you are creating a volume from a snapshot , you
can ' t specify an encryption value.
can ' t specify an encryption value.
type : bool
iops :
iops :
description :
description :
- The number of I / O operations per second ( IOPS ) that the volume
- The number of I / O operations per second ( IOPS ) that the volume
@ -94,36 +105,45 @@ options:
Condition : This parameter is required for requests to create io1
Condition : This parameter is required for requests to create io1
volumes ; it is not used in requests to create gp2 , st1 , sc1 , or
volumes ; it is not used in requests to create gp2 , st1 , sc1 , or
standard volumes .
standard volumes .
type : int
kms_key_id :
kms_key_id :
description : The ARN of the AWS Key Management Service ( AWS KMS ) CMK used for encryption .
description : The ARN of the AWS Key Management Service ( AWS KMS ) CMK used for encryption .
type : str
snapshot_id :
snapshot_id :
description : The ID of the snapshot to create the volume from
description : The ID of the snapshot to create the volume from .
type : str
volume_size :
volume_size :
description :
description :
- The size of the volume , in GiB .
- The size of the volume , in GiB .
- " Default: If you ' re creating the volume from a snapshot and don ' t specify a volume size, the default is the snapshot size. "
- " Default: If you ' re creating the volume from a snapshot and don ' t specify a volume size, the default is the snapshot size. "
type : int
volume_type :
volume_type :
description : The volume type
description : The volume type
type : str
cpu_options :
cpu_options :
description :
description :
- Choose CPU settings for the EC2 instances that will be created with this template .
- Choose CPU settings for the EC2 instances that will be created with this template .
- For more information , see U ( http : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / instance - optimize - cpu . html )
- For more information , see U ( http : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / instance - optimize - cpu . html )
type : dict
suboptions :
suboptions :
core_count :
core_count :
description : The number of CPU cores for the instance .
description : The number of CPU cores for the instance .
type : int
threads_per_core :
threads_per_core :
description : >
description : >
The number of threads per CPU core . To disable Intel Hyper - Threading
The number of threads per CPU core . To disable Intel Hyper - Threading
Technology for the instance , specify a value of 1. Otherwise , specify
Technology for the instance , specify a value of 1. Otherwise , specify
the default value of 2.
the default value of 2.
type : int
credit_specification :
credit_specification :
description : The credit option for CPU usage of the instance . Valid for T2 or T3 instances only .
description : The credit option for CPU usage of the instance . Valid for T2 or T3 instances onlyself .
type : dict
suboptions :
suboptions :
cpu_credits :
cpu_credits :
description : >
description : >
The credit option for CPU usage of a T2 or T3 instance . Valid values
The credit option for CPU usage of a T2 or T3 instance . Valid values
are I( standard ) and I ( unlimited ) .
are C( standard ) and C ( unlimited ) .
choices : [ standard , unlimited ]
type : str
disable_api_termination :
disable_api_termination :
description : >
description : >
This helps protect instances from accidental termination . If set to true ,
This helps protect instances from accidental termination . If set to true ,
@ -140,69 +160,86 @@ options:
charges apply when using an EBS - optimized instance .
charges apply when using an EBS - optimized instance .
type : bool
type : bool
elastic_gpu_specifications :
elastic_gpu_specifications :
type : list
elements : dict
description : Settings for Elastic GPU attachments . See U ( https : / / aws . amazon . com / ec2 / elastic - gpus / ) for details .
description : Settings for Elastic GPU attachments . See U ( https : / / aws . amazon . com / ec2 / elastic - gpus / ) for details .
suboptions :
suboptions :
type :
type :
description : The type of Elastic GPU to attach
description : The type of Elastic GPU to attach
type : str
iam_instance_profile :
iam_instance_profile :
description : >
description : >
The name or ARN of an IAM instance profile . Requires permissions to
The name or ARN of an IAM instance profile . Requires permissions to
describe existing instance roles to confirm ARN is properly formed .
describe existing instance roles to confirm ARN is properly formed .
type : str
image_id :
image_id :
description : >
description : >
The AMI ID to use for new instances launched with this template . This
The AMI ID to use for new instances launched with this template . This
value is region - dependent since AMIs are not global resources .
value is region - dependent since AMIs are not global resources .
type : str
instance_initiated_shutdown_behavior :
instance_initiated_shutdown_behavior :
description : >
description : >
Indicates whether an instance stops or terminates when you initiate
Indicates whether an instance stops or terminates when you initiate
shutdown from the instance using the operating system shutdown command .
shutdown from the instance using the operating system shutdown command .
choices : [ stop , terminate ]
choices : [ stop , terminate ]
type : str
instance_market_options :
instance_market_options :
description : Options for alternative instance markets , currently only the spot market is supported .
description : Options for alternative instance markets , currently only the spot market is supported .
type : dict
suboptions :
suboptions :
market_type :
market_type :
description : The market type . This should always be ' spot ' .
description : The market type . This should always be ' spot ' .
type : str
spot_options :
spot_options :
description : Spot - market specific settings
description : Spot - market specific settings .
type : dict
suboptions :
suboptions :
block_duration_minutes :
block_duration_minutes :
description : >
description : >
The required duration for the Spot Instances ( also known as Spot
The required duration for the Spot Instances ( also known as Spot
blocks ) , in minutes . This value must be a multiple of 60 ( 60 ,
blocks ) , in minutes . This value must be a multiple of 60 ( 60 ,
120 , 180 , 240 , 300 , or 360 ) .
120 , 180 , 240 , 300 , or 360 ) .
type : int
instance_interruption_behavior :
instance_interruption_behavior :
description : The behavior when a Spot Instance is interrupted . The default is I( terminate )
description : The behavior when a Spot Instance is interrupted . The default is C( terminate ) .
choices : [ hibernate , stop , terminate ]
choices : [ hibernate , stop , terminate ]
type : str
max_price :
max_price :
description : The highest hourly price you ' re willing to pay for this Spot Instance.
description : The highest hourly price you ' re willing to pay for this Spot Instance.
type : str
spot_instance_type :
spot_instance_type :
description : The request type to send .
description : The request type to send .
choices : [ one - time , persistent ]
choices : [ one - time , persistent ]
type : dict
type : str
instance_type :
instance_type :
description : >
description : >
The instance type , such as I ( c5 .2 xlarge ) . For a full list of instance types , see
The instance type , such as C ( c5 .2 xlarge ) . For a full list of instance types , see
http : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / instance - types . html
http : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / instance - types . html
type : str
kernel_id :
kernel_id :
description : >
description : >
The ID of the kernel . We recommend that you use PV - GRUB instead of
The ID of the kernel . We recommend that you use PV - GRUB instead of
kernels and RAM disks . For more information , see
kernels and RAM disks . For more information , see
U ( http : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / UserProvidedkernels . html )
U ( http : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / UserProvidedkernels . html )
type : str
key_name :
key_name :
description :
description :
- The name of the key pair . You can create a key pair using
- The name of the key pair . You can create a key pair using M ( ec2_key ) .
I ( CreateKeyPair ) or I ( ImportKeyPair ) .
- If you do not specify a key pair , you can ' t connect to the instance
- If you do not specify a key pair , you can ' t connect to the instance
unless you choose an AMI that is configured to allow users another way to
unless you choose an AMI that is configured to allow users another way to
log in .
log in .
type : str
monitoring :
monitoring :
description : Settings for instance monitoring
description : Settings for instance monitoring .
type : dict
suboptions :
suboptions :
enabled :
enabled :
type : bool
type : bool
description : Whether to turn on detailed monitoring for new instances . This will incur extra charges .
description : Whether to turn on detailed monitoring for new instances . This will incur extra charges .
network_interfaces :
network_interfaces :
description : One or more network interfaces .
description : One or more network interfaces .
type : list
elements : dict
suboptions :
suboptions :
associate_public_ip_address :
associate_public_ip_address :
description : Associates a public IPv4 address with eth0 for a new network interface .
description : Associates a public IPv4 address with eth0 for a new network interface .
@ -212,63 +249,71 @@ options:
type : bool
type : bool
description :
description :
description : A description for the network interface .
description : A description for the network interface .
type : str
device_index :
device_index :
description : The device index for the network interface attachment .
description : The device index for the network interface attachment .
type : int
groups :
groups :
description : List of security group IDs to include on this instance
description : List of security group IDs to include on this instance .
type : list
elements : str
ipv6_address_count :
ipv6_address_count :
description : >
description : >
The number of IPv6 addresses to assign to a network interface . Amazon
The number of IPv6 addresses to assign to a network interface . Amazon
EC2 automatically selects the IPv6 addresses from the subnet range .
EC2 automatically selects the IPv6 addresses from the subnet range .
You can ' t use this option if specifying the I(ipv6_addresses) option.
You can ' t use this option if specifying the I(ipv6_addresses) option.
type : int
ipv6_addresses :
ipv6_addresses :
description : >
description : >
A list of one or more specific IPv6 addresses from the IPv6 CIDR
A list of one or more specific IPv6 addresses from the IPv6 CIDR
block range of your subnet . You can ' t use this option if you ' re
block range of your subnet . You can ' t use this option if you ' re
specifying the I ( ipv6_address_count ) option .
specifying the I ( ipv6_address_count ) option .
type : list
elements : int
network_interface_id :
network_interface_id :
description : The eni ID of a network interface to attach .
description : The eni ID of a network interface to attach .
type : str
private_ip_address :
private_ip_address :
description : The primary private IPv4 address of the network interface .
description : The primary private IPv4 address of the network interface .
private_ip_addresses :
type : str
description : One or more private IPv4 addresses .
suboptions :
primary :
description : >
Indicates whether the private IPv4 address is the primary private
IPv4 address . Only one IPv4 address can be designated as primary .
private_ip_address :
description : The primary private IPv4 address of the network interface .
subnet_id :
subnet_id :
description : The ID of the subnet for the network interface .
description : The ID of the subnet for the network interface .
secondary_private_ip_address_count :
type : str
description : The number of secondary private IPv4 addresses to assign to a network interface .
placement :
placement :
description : The placement group settings for the instance .
description : The placement group settings for the instance .
type : dict
suboptions :
suboptions :
affinity :
affinity :
description : The affinity setting for an instance on a Dedicated Host .
description : The affinity setting for an instance on a Dedicated Host .
type : str
availability_zone :
availability_zone :
description : The Availability Zone for the instance .
description : The Availability Zone for the instance .
type : str
group_name :
group_name :
description : The name of the placement group for the instance .
description : The name of the placement group for the instance .
type : str
host_id :
host_id :
description : The ID of the Dedicated Host for the instance .
description : The ID of the Dedicated Host for the instance .
type : str
tenancy :
tenancy :
description : >
description : >
The tenancy of the instance ( if the instance is running in a VPC ) . An
The tenancy of the instance ( if the instance is running in a VPC ) . An
instance with a tenancy of dedicated runs on single - tenant hardware .
instance with a tenancy of dedicated runs on single - tenant hardware .
type : str
ram_disk_id :
ram_disk_id :
description : >
description : >
The ID of the RAM disk to launch the instance with . We recommend that you
The ID of the RAM disk to launch the instance with . We recommend that you
use PV - GRUB instead of kernels and RAM disks . For more information , see
use PV - GRUB instead of kernels and RAM disks . For more information , see
U ( http : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / UserProvidedkernels . html )
U ( http : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / UserProvidedkernels . html )
type : str
security_group_ids :
security_group_ids :
description : A list of security group IDs ( VPC or EC2 - Classic ) that the new instances will be added to .
description : A list of security group IDs ( VPC or EC2 - Classic ) that the new instances will be added to .
type : list
type : list
elements : str
security_groups :
security_groups :
description : A list of security group names ( VPC or EC2 - Classic ) that the new instances will be added to .
description : A list of security group names ( VPC or EC2 - Classic ) that the new instances will be added to .
type : list
type : list
elements : str
tags :
tags :
type : dict
type : dict
description :
description :
@ -281,6 +326,7 @@ options:
U ( http : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / user - data . html ) and Windows
U ( http : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / user - data . html ) and Windows
U ( http : / / docs . aws . amazon . com / AWSEC2 / latest / WindowsGuide / ec2 - instance - metadata . html #instancedata-add-user-data)
U ( http : / / docs . aws . amazon . com / AWSEC2 / latest / WindowsGuide / ec2 - instance - metadata . html #instancedata-add-user-data)
documentation on user - data .
documentation on user - data .
type : str
'''
'''
EXAMPLES = '''
EXAMPLES = '''