Terraform module with Launch Template resources on AWS.
module "launch_template" {
source = "git::ssh://git@github.com/<repository>/terraform-aws-launch-template.git?ref=feat/launch-template"
prefix = "example"
environment = "dev"
name = "example"
# user_data = var.user_data
block_device_mappings = [{
device_name = "/dev/sda1"
ebs = {
volume_size = 20
volume_type = "gp3"
}
}]
ami_id = "ami-0c802847a7dd848c0"
key_name = "example-key"
vpc_security_group_ids = ["sg-xxx"]
tags = { workspace = "test-workspace" }
}| Name | Version |
|---|---|
| terraform | >= 1.0.0 |
| aws | >= 4.0.0 |
| Name | Version |
|---|---|
| aws | 4.20.1 |
No modules.
| Name | Type |
|---|---|
| aws_launch_template.this | resource |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| ami_id | The AMI from which to launch the instance. If not supplied, EKS will use its own default image | string |
"" |
no |
| block_device_mappings | Specify volumes to attach to the instance besides the volumes specified by the AMI | any |
{} |
no |
| capacity_reservation_specification | Targeting for EC2 capacity reservations | any |
null |
no |
| cpu_options | The CPU options for the instance | map(string) |
null |
no |
| credit_specification | Customize the credit specification of the instance | map(string) |
null |
no |
| disable_api_termination | If true, enables EC2 instance termination protection | bool |
null |
no |
| ebs_optimized | If true, the launched EC2 instance(s) will be EBS-optimized | bool |
null |
no |
| elastic_gpu_specifications | The elastic GPU to attach to the instance | map(string) |
null |
no |
| elastic_inference_accelerator | Configuration block containing an Elastic Inference Accelerator to attach to the instance | map(string) |
null |
no |
| enable_monitoring | Enables/disables detailed monitoring | bool |
true |
no |
| enclave_options | Enable Nitro Enclaves on launched instances | map(string) |
null |
no |
| environment | To manage a resources with tags | string |
n/a | yes |
| hibernation_options | The hibernation options for the instance | map(string) |
null |
no |
| iam_instance_profile | The IAM Instance Profile to launch the instance with | map(string) |
null |
no |
| instance_initiated_shutdown_behavior | Shutdown behavior for the instance. Can be stop or terminate | string |
"stop" |
no |
| instance_market_options | The market (purchasing) option for the instance | any |
null |
no |
| instance_type | The type of the instance | string |
null |
no |
| kernel_id | The kernel ID | string |
null |
no |
| key_name | The key name that should be used for the instance(s) | string |
null |
no |
| launch_template_default_version | Default version of the launch template | string |
null |
no |
| launch_template_tags | A map of additional tags to add to the tag_specifications of launch template created | map(string) |
{} |
no |
| license_specifications | A list of license specifications to associate with | map(string) |
null |
no |
| metadata_options | Customize the metadata options for the instance | map(string) |
{ |
no |
| name | The Name of luanch teamplate | string |
n/a | yes |
| network_interfaces | Customize network interfaces to be attached at instance boot time | list(any) |
[] |
no |
| placement | The placement of the instance | map(string) |
null |
no |
| prefix | The prefix name of customer to be displayed in AWS console and resource | string |
n/a | yes |
| ram_disk_id | The ID of the ram disk | string |
null |
no |
| tags | A map of tags to add to all resources | map(string) |
{} |
no |
| update_launch_template_default_version | Whether to update the launch templates default version on each update. Conflicts with launch_template_default_version |
bool |
true |
no |
| user_data | The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument | any |
null |
no |
| vpc_security_group_ids | A list of security group IDs to associate | list(string) |
[] |
no |
| Name | Description |
|---|---|
| arn | Amazon Resource Name (ARN) of the launch template |
| id | The ID of the launch template |