Skip to content

Commit

Permalink
use provided SA for cloud function v2 trigger (#1968)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliocc authored Jan 8, 2024
1 parent d1746b8 commit 46f437f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/cloud-function-v2/main.tf
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 46f437f

Please sign in to comment.