From f979b4401f5603e9108331a41837c2661adb244e Mon Sep 17 00:00:00 2001 From: Abdullah Zameer <83768838+abdullahzamir@users.noreply.github.com> Date: Mon, 22 Dec 2025 19:55:44 +0500 Subject: [PATCH 1/2] Fixed python and node version error for gcp --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 4c2adb3..08f26da 100644 --- a/main.tf +++ b/main.tf @@ -568,7 +568,7 @@ resource "google_storage_bucket_object" "zip" { # Create the Cloud function triggered by a `Finalize` event on the bucket resource "google_cloudfunctions_function" "backend-function" { name = "backend-function" - runtime = "python37" + runtime = "python39" source_archive_bucket = google_storage_bucket.function_bucket.name source_archive_object = google_storage_bucket_object.zip.name @@ -700,7 +700,7 @@ resource "google_storage_bucket_object" "object" { # Create Cloud Function resource "google_cloudfunctions_function" "function" { name = "blogapp-${random_id.bucket_prefix.hex}" - runtime = "nodejs12" # Switch to a different runtime if needed + runtime = "nodejs20" # Switch to a different runtime if needed project = google_project.my_project.project_id available_memory_mb = 128 source_archive_bucket = google_storage_bucket.bucket.name From ab611cc548d672ca60323673dfe85686493d59bb Mon Sep 17 00:00:00 2001 From: Abdullah Zameer <83768838+abdullahzamir@users.noreply.github.com> Date: Mon, 22 Dec 2025 19:58:30 +0500 Subject: [PATCH 2/2] Fixed Werkzeug importerror Fixed Werkzeug error where `importerror: cannot import name 'url_quote' from 'werkzeug.urls'` --- .../module-1/resources/cloud_function/data/requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/module-1/resources/cloud_function/data/requirements.txt b/modules/module-1/resources/cloud_function/data/requirements.txt index fd75531..8d7c8a1 100644 --- a/modules/module-1/resources/cloud_function/data/requirements.txt +++ b/modules/module-1/resources/cloud_function/data/requirements.txt @@ -2,4 +2,5 @@ google-cloud-storage==2.6.0 google-cloud-firestore==2.7.2 flask==2.2.2 bcrypt==4.0.1 -pyjwt==1.7.1 \ No newline at end of file +pyjwt==1.7.1 +Werkzeug==2.2.2