Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an output for the eks-managed-node-group launch template name #2199

Closed
romogo17 opened this issue Aug 11, 2022 · 2 comments · Fixed by #2205
Closed

Provide an output for the eks-managed-node-group launch template name #2199

romogo17 opened this issue Aug 11, 2022 · 2 comments · Fixed by #2205

Comments

@romogo17
Copy link

Background

Currently, within the eks-managed-node-group submodule, there are output variables for getting the launch template id, arn and latest_version — but not the launch template name

output "launch_template_id" {
description = "The ID of the launch template"
value = try(aws_launch_template.this[0].id, "")
}
output "launch_template_arn" {
description = "The ARN of the launch template"
value = try(aws_launch_template.this[0].arn, "")
}
output "launch_template_latest_version" {
description = "The latest version of the launch template"
value = try(aws_launch_template.this[0].latest_version, "")
}

When we use a prefix for the launch template name, a portion of the resulting name will not be known beforehand, which makes extracting the final name a bit difficult.

resource "aws_launch_template" "this" {
count = var.create && var.create_launch_template ? 1 : 0
name = var.launch_template_use_name_prefix ? null : local.launch_template_name_int
name_prefix = var.launch_template_use_name_prefix ? "${local.launch_template_name_int}-" : null

Describe the solution you'd like.

Adding another output for the launch template name

output "launch_template_name" {
  description = "The name of the launch template"
  value       = try(aws_launch_template.this[0].name, "")
}
@antonbabenko
Copy link
Member

This issue has been resolved in version 18.28.0 🎉

@github-actions
Copy link

github-actions bot commented Nov 9, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants