2.8 KiB
2.8 KiB
LaunchTemplate
This module created EC2 launch template. If a single instance type is specified it will create launch template with that instance type. If multiple types are specified then a launch template with instance_requirements will be created.
Root ebs volume is always encrypted - either with the aws/ebs key or a customer managed key
Requirements
| Name | Version |
|---|---|
| terraform | >= 1.3.0 |
| aws | >= 5.0 |
Providers
| Name | Version |
|---|---|
| aws | >= 5.0 |
Modules
No modules.
Resources
| Name | Type |
|---|---|
| aws_launch_template.lt | resource |
| aws_ami.this | data source |
Inputs
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| cpu_count_max | Maximum vcpu count for setting up instance_requirements | number |
null |
no |
| cpu_count_min | Minimum vcpu count for setting up instance_requirements | number |
null |
no |
| description | Description of launch template | string |
n/a | yes |
| ebs_volume_kms_key_id | KMS key id for EBS encryption - a default key will be used if not specified | string |
null |
no |
| image_id | AMI id of launch template | string |
n/a | yes |
| imdsv2_required | Use IMDSv2 for ec2 instance | bool |
true |
no |
| instance_initiated_shutdown_behavior | Shutdown behavior for the instance - stop (default) or terminate | string |
"stop" |
no |
| instance_profile_name | Name of iam instance profile | string |
null |
no |
| instance_types | Types of instances allowed for this launch template | list(string) |
n/a | yes |
| key_name | Name of keypair | string |
null |
no |
| mem_mib_max | Maximum memory size (mib) for setting up instance_requirements | number |
null |
no |
| mem_mib_min | Minimum memory size (mib) for setting up instance_requirements | number |
null |
no |
| name | Name of launch template | string |
n/a | yes |
| root_volume_size | Size of root volume in GB | number |
n/a | yes |
| root_volume_type | Root volume type - default gp3 | string |
"gp3" |
no |
| security_grouo_ids | List of security group ids | list(string) |
[] |
no |
| tag_specifications | Tags to be added to instance and volume | map(string) |
n/a | yes |
| update_default_version | Point default version to the latest | bool |
true |
no |
| userdata_base64 | Base64 encoded userdata | string |
n/a | yes |
Outputs
| Name | Description |
|---|---|
| launch_template_id | ID of launch template |
Authorship
This module was developed by xpk.