Skip to content

Commit c7ff112

Browse files
authored
fix: set staging and temp bucket for phs cluster (#88)
1 parent 9f42b95 commit c7ff112

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

dataproc.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ resource "google_dataproc_cluster" "phs" {
109109
project = module.project-services.project_id
110110
region = var.region
111111
cluster_config {
112+
staging_bucket = google_storage_bucket.phs-staging-bucket.name
113+
temp_bucket = google_storage_bucket.phs-temp-bucket.name
112114
gce_cluster_config {
113115
service_account = google_service_account.dataproc_service_account.email
114116
subnetwork = google_compute_subnetwork.subnet.name

main.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,19 @@ resource "google_storage_bucket" "spark-log-directory" {
171171
uniform_bucket_level_access = true
172172
force_destroy = var.force_destroy
173173
}
174+
175+
resource "google_storage_bucket" "phs-staging-bucket" {
176+
name = "gcp-${var.use_case_short}-phs-staging-${random_id.id.hex}"
177+
project = module.project-services.project_id
178+
location = var.region
179+
uniform_bucket_level_access = true
180+
force_destroy = var.force_destroy
181+
}
182+
183+
resource "google_storage_bucket" "phs-temp-bucket" {
184+
name = "gcp-${var.use_case_short}-phs-temp-${random_id.id.hex}"
185+
project = module.project-services.project_id
186+
location = var.region
187+
uniform_bucket_level_access = true
188+
force_destroy = var.force_destroy
189+
}

0 commit comments

Comments
 (0)