use provided SA for cloud function v2 trigger (#1968)

This commit is contained in:
Julio Castillo
2024-01-08 17:39:01 +01:00
committed by GitHub
parent d1746b8bd1
commit 46f437fd5d

View File

@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,7 +34,9 @@ locals {
try(var.trigger_config.service_account_create, false) == true
)
trigger_sa_email = try(
google_service_account.trigger_service_account[0].email, null
google_service_account.trigger_service_account[0].email,
var.trigger_config.service_account_email,
null
)
vpc_connector = (
var.vpc_connector == null