From c95056c5236d7faba1497e1eb54e3938a0c35ba1 Mon Sep 17 00:00:00 2001 From: Shabir Mohamed Abdul Samadh <7249208+Shabirmean@users.noreply.github.com> Date: Tue, 20 Sep 2022 11:06:14 -0400 Subject: [PATCH] fix: allow null service_account (#262) --- modules/instance_template/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/instance_template/main.tf b/modules/instance_template/main.tf index 8b076508..fe202049 100644 --- a/modules/instance_template/main.tf +++ b/modules/instance_template/main.tf @@ -96,7 +96,7 @@ resource "google_compute_instance_template" "tpl" { } dynamic "service_account" { - for_each = [var.service_account] + for_each = var.service_account == null ? [] : [var.service_account] content { email = lookup(service_account.value, "email", null) scopes = lookup(service_account.value, "scopes", null)