mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-11 21:11:32 +01:00
feat: Add launch_template_tags variable for additional launch template tags (#1835)
This commit is contained in:
@@ -129,6 +129,7 @@ module "eks_managed_node_group" {
|
||||
| <a name="input_launch_template_default_version"></a> [launch\_template\_default\_version](#input\_launch\_template\_default\_version) | Default version of the launch template | `string` | `null` | no |
|
||||
| <a name="input_launch_template_description"></a> [launch\_template\_description](#input\_launch\_template\_description) | Description of the launch template | `string` | `null` | no |
|
||||
| <a name="input_launch_template_name"></a> [launch\_template\_name](#input\_launch\_template\_name) | Launch template name - either to be created (`var.create_launch_template` = `true`) or existing (`var.create_launch_template` = `false`) | `string` | `""` | no |
|
||||
| <a name="input_launch_template_tags"></a> [launch\_template\_tags](#input\_launch\_template\_tags) | A map of additional tags to add to the tag\_specifications of launch template created | `map(string)` | `{}` | no |
|
||||
| <a name="input_launch_template_use_name_prefix"></a> [launch\_template\_use\_name\_prefix](#input\_launch\_template\_use\_name\_prefix) | Determines whether to use `launch_template_name` as is or create a unique name beginning with the `launch_template_name` as the prefix | `bool` | `true` | no |
|
||||
| <a name="input_launch_template_version"></a> [launch\_template\_version](#input\_launch\_template\_version) | Launch template version number. The default is `$Default` | `string` | `null` | no |
|
||||
| <a name="input_license_specifications"></a> [license\_specifications](#input\_license\_specifications) | A list of license specifications to associate with | `map(string)` | `null` | no |
|
||||
|
||||
@@ -238,7 +238,7 @@ resource "aws_launch_template" "this" {
|
||||
for_each = toset(["instance", "volume", "network-interface"])
|
||||
content {
|
||||
resource_type = tag_specifications.key
|
||||
tags = merge(var.tags, { Name = var.name })
|
||||
tags = merge(var.tags, { Name = var.name }, var.launch_template_tags)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -238,6 +238,12 @@ variable "placement" {
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "launch_template_tags" {
|
||||
description = "A map of additional tags to add to the tag_specifications of launch template created"
|
||||
type = map(string)
|
||||
default = {}
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# EKS Managed Node Group
|
||||
################################################################################
|
||||
|
||||
Reference in New Issue
Block a user