From b9b262f285f5b8d9f584ff6af1672aeba1a9808b Mon Sep 17 00:00:00 2001 From: Scott Guymer Date: Mon, 25 Apr 2022 13:38:37 +0200 Subject: [PATCH 1/2] fix: outputs for pool need to account for complexity As the pool is optional the output needs to take this into account and access the first instance in the list. We also must output null if not set. --- modules/runners/outputs.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/runners/outputs.tf b/modules/runners/outputs.tf index 9fa3223321..21354ce02a 100644 --- a/modules/runners/outputs.tf +++ b/modules/runners/outputs.tf @@ -23,5 +23,5 @@ output "role_scale_down" { } output "role_pool" { - value = length(var.pool_config) == 0 ? {} : module.pool.role_pool + value = length(var.pool_config) == 0 ? null : module.pool[0].role_pool } From ea5f82639943fec90851fb57bf15877e26c9e0be Mon Sep 17 00:00:00 2001 From: Scott Guymer Date: Mon, 25 Apr 2022 13:42:42 +0200 Subject: [PATCH 2/2] Ensure pool role is output from main module --- outputs.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/outputs.tf b/outputs.tf index eab083e259..d72f9acc93 100644 --- a/outputs.tf +++ b/outputs.tf @@ -9,6 +9,7 @@ output "runners" { role_runner = module.runners.role_runner role_scale_up = module.runners.role_scale_up role_scale_down = module.runners.role_scale_down + role_pool = module.runners.role_pool } }