Skip to content

Commit

Permalink
fix: spot termination watcher output multi runner (#4194)
Browse files Browse the repository at this point in the history
## Problem

Output to termination watcher not updated in PR #4176

---------

Co-authored-by: philips-labs-pr|bot <philips-labs-pr[bot]@users.noreply.github.com>
  • Loading branch information
npalm and philips-labs-pr|bot authored Oct 21, 2024
1 parent 4708125 commit 367b1b3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions modules/multi-runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ module "multi-runner" {
| Name | Description |
|------|-------------|
| <a name="output_binaries_syncer_map"></a> [binaries\_syncer\_map](#output\_binaries\_syncer\_map) | n/a |
| <a name="output_instance_termination_handler"></a> [instance\_termination\_handler](#output\_instance\_termination\_handler) | n/a |
| <a name="output_instance_termination_watcher"></a> [instance\_termination\_watcher](#output\_instance\_termination\_watcher) | n/a |
| <a name="output_queues"></a> [queues](#output\_queues) | SQS queues. |
| <a name="output_runners_map"></a> [runners\_map](#output\_runners\_map) | n/a |
Expand Down
16 changes: 12 additions & 4 deletions modules/multi-runner/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,17 @@ output "queues" {
}

output "instance_termination_watcher" {
value = var.instance_termination_watcher.enable ? {
lambda = module.instance_termination_watcher[0].lambda.function
lambda_log_group = module.instance_termination_watcher[0].lambda.log_group
lambda_role = module.instance_termination_watcher[0].lambda.role
value = var.instance_termination_watcher.enable && var.instance_termination_watcher.features.enable_spot_termination_notification_watcher ? {
lambda = module.instance_termination_watcher[0].spot_termination_notification.lambda
lambda_log_group = module.instance_termination_watcher[0].spot_termination_notification.lambda_log_group
lambda_role = module.instance_termination_watcher[0].spot_termination_notification.lambda_role
} : null
}

output "instance_termination_handler" {
value = var.instance_termination_watcher.enable && var.instance_termination_watcher.features.enable_spot_termination_handler ? {
lambda = module.instance_termination_watcher[0].spot_termination_handler.lambda
lambda_log_group = module.instance_termination_watcher[0].spot_termination_handler.lambda_log_group
lambda_role = module.instance_termination_watcher[0].spot_termination_handler.lambda_role
} : null
}

0 comments on commit 367b1b3

Please sign in to comment.