Skip to content

Commit

Permalink
fix: try() to fix index errors (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
astorozhevsky authored Sep 7, 2022
1 parent 13b9a1c commit f566e8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resource "random_id" "random_role_id_suffix" {

locals {
base_role_id = "osLoginProjectGet"
service_account_email = var.service_account_email == "" ? google_service_account.bastion_host[0].email : var.service_account_email
service_account_email = var.service_account_email == "" ? try(google_service_account.bastion_host[0].email, "") : var.service_account_email
service_account_roles = var.service_account_email == "" ? toset(compact(concat(
var.service_account_roles,
var.service_account_roles_supplemental,
Expand Down

0 comments on commit f566e8d

Please sign in to comment.