Skip to content

Commit 8270f55

Browse files
committed
Fix potential error if 'zone' is missing in 'provider'
1 parent b54d462 commit 8270f55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ locals {
1818
projectId = data.google_client_config.current.project
1919
projectNumber = data.google_project.current.number
2020
region = data.google_client_config.current.region
21-
zones = distinct(concat(var.machine_zones, [data.google_client_config.current.zone]))
21+
zones = distinct(concat(var.machine_zones, data.google_client_config.current.zone != null ? [data.google_client_config.current.zone] : [] ))
2222
runnerLabel = join(",", var.github_runner_labels)
2323
runnerLabelInstanceTemplate = length(var.github_runner_labels) == 0 ? "" : format("--no-default-labels --labels '%s'", local.runnerLabel)
2424
hasEnterprise = length(var.github_enterprise) > 0

0 commit comments

Comments
 (0)