Skip to content

Commit

Permalink
added correct credential info
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaus-near committed Nov 14, 2023
1 parent cd8b8dd commit 08d3439
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions infra/mpc-recovery-dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ terraform {
}

locals {
# credentials = var.credentials != null ? var.credentials : file(var.credentials_file)
# client_email = jsondecode(local.credentials).client_email
# client_id = jsondecode(local.credentials).client_id
credentials = var.credentials != null ? var.credentials : file(var.credentials_file)
client_email = jsondecode(local.credentials).client_email
client_id = jsondecode(local.credentials).client_id

env = {
defaults = {
Expand All @@ -38,8 +38,8 @@ data "external" "git_checkout" {
}

provider "google" {
# credentials = local.credentials
credentials = file("~/.config/gcloud/application_default_credentials.json")
credentials = local.credentials
# credentials = file("~/.config/gcloud/application_default_credentials.json")

project = var.project
region = var.region
Expand All @@ -59,8 +59,8 @@ resource "google_service_account_iam_binding" "serivce-account-iam" {
role = "roles/iam.serviceAccountUser"

members = [
# "serviceAccount:${local.client_email}",
"serviceAccount:mpc-recovery@pagoda-discovery-platform-dev.iam.gserviceaccount.com"
"serviceAccount:${local.client_email}",
# "serviceAccount:mpc-recovery@pagoda-discovery-platform-dev.iam.gserviceaccount.com"
]
}

Expand Down

0 comments on commit 08d3439

Please sign in to comment.