Skip to content

Commit

Permalink
strip bucket name from bundle URI (GoogleCloudPlatform#2362)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoo authored and Alberto Geniola committed Jun 19, 2024
1 parent 1529a14 commit 7c75fcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/cloud-function-v1/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ resource "google_cloudfunctions_function" "function" {
source_archive_bucket = local.bucket
source_archive_object = (
local.bundle_type == "gcs"
? var.bundle_config.path
? replace(var.bundle_config.path, "/^gs:\\/\\/[^\\/]+\\//", "")
: google_storage_bucket_object.bundle[0].name
)
labels = var.labels
Expand Down
2 changes: 1 addition & 1 deletion modules/cloud-function-v2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ resource "google_cloudfunctions2_function" "function" {
bucket = local.bucket
object = (
local.bundle_type == "gcs"
? var.bundle_config.path
? replace(var.bundle_config.path, "/^gs:\\/\\/[^\\/]+\\//", "")
: google_storage_bucket_object.bundle[0].name
)
}
Expand Down

0 comments on commit 7c75fcc

Please sign in to comment.