Skip to content

Commit

Permalink
[Custom DC] fix more permissions and file name errors (#180)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Chen <alexyfchen@google.com>
  • Loading branch information
Fructokinase and Alex Chen authored Jan 21, 2023
1 parent 3fbd85c commit d2d3fdd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion bigtable_automation/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ data "archive_file" "bt_automation_go_source" {
# Upload zipped go source. Consumed by gcf.
resource "google_storage_bucket_object" "bt_automation_archieve" {
# Relative path in the resource bucket to upload the archieve.
name = "cloud_functions/bt_automation_go_source_${data.archive_file.bt_automation_go_source.output_base64sha256}.zip"
name = "cloud_functions/bt_automation_go_source_${data.archive_file.bt_automation_go_source.output_md5}.zip"
source = "${path.module}/source/bt_automation_go_source.zip"
bucket = var.dc_resource_bucket

Expand Down Expand Up @@ -123,3 +123,14 @@ resource "google_project_iam_member" "dataflow_worker_iam" {
member = "serviceAccount:${data.google_compute_default_service_account.default.email}"
project = var.project_id
}

# Permissions needed to communicate with graph processor.
resource "google_project_iam_member" "bt_automation_iam" {
for_each = toset([
"roles/pubsub.editor",
"roles/storage.admin"
])
role = each.key
member = "serviceAccount:datcom@system.gserviceaccount.com"
project = var.project_id
}

0 comments on commit d2d3fdd

Please sign in to comment.