[go: nahoru, domu]

Skip to content

Commit

Permalink
added default gcp-sa-aiplatform SA with storage permission.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonchenn committed Sep 9, 2022
1 parent 38a5333 commit a2cd77e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
15 changes: 9 additions & 6 deletions terraform/environments/dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,21 @@ module "project_services" {
services = local.services
}

resource "time_sleep" "wait_for_project_services" {
depends_on = [module.project_services]
create_duration = "60s"
}

module "service_accounts" {
depends_on = [time_sleep.wait_for_project_services]
depends_on = [module.project_services]
source = "../../modules/service_accounts"
project_id = var.project_id
env = var.env
}

resource "time_sleep" "wait_for_project_services" {
depends_on = [
module.project_services,
module.service_accounts
]
create_duration = "60s"
}

module "firebase" {
depends_on = [time_sleep.wait_for_project_services]
source = "../../modules/firebase"
Expand Down
6 changes: 5 additions & 1 deletion terraform/modules/bigquery/bigquery.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ resource "google_bigquery_dataset" "data_set" {
}

resource "google_bigquery_table" "table_id" {
depends_on = [
google_bigquery_dataset.data_set
]

deletion_protection = false
dataset_id = "validation"
table_id = "validation_table"
Expand Down Expand Up @@ -61,4 +65,4 @@ resource "google_bigquery_table" "table_id" {
]
EOF

}
}
1 change: 1 addition & 0 deletions terraform/modules/service_accounts/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ locals {
"serviceAccount:${data.google_project.project.number}@cloudbuild.gserviceaccount.com",
"serviceAccount:${data.google_project.project.number}@cloudservices.gserviceaccount.com",
"serviceAccount:${data.google_project.project.number}-compute@developer.gserviceaccount.com",
"serviceAccount:service-${data.google_project.project.number}@gcp-sa-aiplatform.iam.gserviceaccount.com",
]
}

Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/vertex_ai/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Copying sample model to GCS bucket.
resource "null_resource" "upload_ml_model" {
provisioner "local-exec" {
command = "gsutil cp -r ../../../sample_data/classification_model gs://${var.model_gcs_path}/classification_model"
command = "gsutil cp -r ../../../sample_data/classification_model ${var.model_gcs_path}/classification_model"
}
}

Expand Down

0 comments on commit a2cd77e

Please sign in to comment.