-
Notifications
You must be signed in to change notification settings - Fork 628
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
feat: Add output image id used in launch template #1676
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,13 +1,15 @@ | ||||||
output "runners" { | ||||||
value = { | ||||||
launch_template_name = module.runners.launch_template.name | ||||||
launch_template_id = module.runners.launch_template.id | ||||||
launch_template_version = module.runners.launch_template.latest_version | ||||||
lambda_up = module.runners.lambda_scale_up | ||||||
lambda_down = module.runners.lambda_scale_down | ||||||
role_runner = module.runners.role_runner | ||||||
role_scale_up = module.runners.role_scale_up | ||||||
role_scale_down = module.runners.role_scale_down | ||||||
launch_template_name = module.runners.launch_template.name | ||||||
launch_template_id = module.runners.launch_template.id | ||||||
launch_template_version = module.runners.launch_template.latest_version | ||||||
launch_template_ami_id = module.runners.launch_template.latest_version | ||||||
launch_template_image_id = module.runners.image_id | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For my benefit how can I tell what is already output? I thought it was a case of looking at the attribute references for a given resource? So in this case There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't have a solid answer. One thing you can do is check state. But agree it is not always very clear what is exported. |
||||||
lambda_up = module.runners.lambda_scale_up | ||||||
lambda_down = module.runners.lambda_scale_down | ||||||
role_runner = module.runners.role_runner | ||||||
role_scale_up = module.runners.role_scale_up | ||||||
role_scale_down = module.runners.role_scale_down | ||||||
} | ||||||
} | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks no reason to output, can you remove this aoput. Used image_id is part of the launch templates whic is already outputed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We output the launch template but the launch template doesn't expose anything of its settings so we need to output them as well if we want them exposed? https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template#attributes-reference Apologies if it does, I'm somewhat new to Terraform still.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No there is no need to output the image_id in this way, it is already outputted as part of the object launch_template., see
terraform-aws-github-runner/modules/runners/outputs.tf
Line 1 in db4fc4b