Skip to content

Commit db7e268

Browse files
npalmCopilot
andauthored
Update modules/runners/main.tf
Co-authored-by: Copilot <[email protected]>
1 parent 9d3ed69 commit db7e268

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/runners/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ locals {
4848
ami_filter = merge(local.default_ami[var.runner_os], local.ami_config.filter)
4949
ami_id_ssm_module_managed = local.ami_config.id_ssm_parameter_arn == null
5050
# Extract parameter name from ARN (format: arn:aws:ssm:region:account:parameter/path/to/param)
51-
ami_id_ssm_parameter_name = local.ami_id_ssm_module_managed ? null : regex("parameter/(.+)$", local.ami_config.id_ssm_parameter_arn)[0]
51+
ami_id_ssm_parameter_name = local.ami_id_ssm_module_managed ? null : try(regex("parameter/(.+)$", local.ami_config.id_ssm_parameter_arn)[0], null)
5252

5353
enable_job_queued_check = var.enable_job_queued_check == null ? !var.enable_ephemeral_runners : var.enable_job_queued_check
5454

0 commit comments

Comments
 (0)