Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to old nodejs runtimes in Cloud Functions #13321

Merged
merged 3 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resource "google_cloudfunctions2_function" "{{$.PrimaryResourceId}}" {
description = "a new function"

build_config {
runtime = "nodejs16"
runtime = "nodejs20"
entry_point = "helloPubSub" # Set the entry point
environment_variables = {
BUILD_CONFIG_TEST = "build_test"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resource "google_cloudfunctions2_function" "{{$.PrimaryResourceId}}" {
description = "a new function"

build_config {
runtime = "nodejs16"
runtime = "nodejs20"
entry_point = "helloPubSub" # Set the entry point
environment_variables = {
BUILD_CONFIG_TEST = "build_test"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "google_cloudfunctions2_function" "{{$.PrimaryResourceId}}" {
description = "a new function"

build_config {
runtime = "nodejs16"
runtime = "nodejs20"
entry_point = "helloHttp" # Set the entry point
source {
storage_source {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ resource "google_cloudfunctions2_function" "{{$.PrimaryResourceId}}" {
description = "a new function"

build_config {
runtime = "nodejs12"
runtime = "nodejs20"
entry_point = "entryPoint" # Set the entry point in the code
environment_variables = {
BUILD_CONFIG_TEST = "build_test"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ resource "google_cloudfunctions2_function" "{{$.PrimaryResourceId}}" {
description = "a new function"

build_config {
runtime = "nodejs16"
runtime = "nodejs20"
entry_point = "helloHttp" # Set the entry point
source {
storage_source {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ resource "google_cloudfunctions2_function" "{{$.PrimaryResourceId}}" {
description = "a new function"

build_config {
runtime = "nodejs12"
runtime = "nodejs20"
entry_point = "entryPoint" # Set the entry point in the code
environment_variables = {
BUILD_CONFIG_TEST = "build_test"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ resource "google_cloudfunctions2_function" "{{$.PrimaryResourceId}}" {
kms_key_name = "{{index $.Vars "kms_key_name"}}"

build_config {
runtime = "nodejs16"
runtime = "nodejs20"
entry_point = "helloHttp" # Set the entry point
docker_repository = google_artifact_registry_repository.encoded-ar-repo.id

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ resource "google_cloudfunctions2_function" "{{$.PrimaryResourceId}}" {
kms_key_name = "{{index $.Vars "kms_key_name"}}"

build_config {
runtime = "nodejs16"
runtime = "nodejs20"
entry_point = "helloHttp" # Set the entry point
docker_repository = google_artifact_registry_repository.encoded-ar-repo.id

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "google_cloudfunctions2_function" "{{$.PrimaryResourceId}}" {
description = "a new function"

build_config {
runtime = "nodejs16"
runtime = "nodejs20"
entry_point = "helloPubSub" # Set the entry point
environment_variables = {
BUILD_CONFIG_TEST = "build_test"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ resource "google_cloudfunctions2_function" "{{$.PrimaryResourceId}}" {
description = "a new function"

build_config {
runtime = "nodejs16"
runtime = "nodejs20"
entry_point = "helloHttp" # Set the entry point
source {
storage_source {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resource "google_cloudfunctions2_function" "{{$.PrimaryResourceId}}" {
description = "a new function"

build_config {
runtime = "nodejs16"
runtime = "nodejs20"
entry_point = "helloHttp" # Set the entry point
source {
storage_source {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "google_cloudfunctions2_function" "{{$.PrimaryResourceId}}" {
description = "a new function"

build_config {
runtime = "nodejs16"
runtime = "nodejs20"
entry_point = "helloHttp" # Set the entry point
source {
storage_source {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "google_cloudfunctions2_function" "{{$.PrimaryResourceId}}" {
description = "a new function"

build_config {
runtime = "nodejs16"
runtime = "nodejs20"
entry_point = "helloHttp" # Set the entry point
source {
storage_source {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ resource "google_storage_bucket_object" "archive" {
resource "google_cloudfunctions_function" "{{$.PrimaryResourceId}}" {
name = "{{index $.Vars "function_name"}}"
description = "My function"
runtime = "nodejs10"
runtime = "nodejs20"

available_memory_mb = 128
source_archive_bucket = google_storage_bucket.bucket.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resource "google_cloudfunctions_function" "function" {

name = "{{index $.Vars "cloud_function_id"}}"
description = "A Cloud Function connected to Firebase Hosing"
runtime = "nodejs16"
runtime = "nodejs20"

available_memory_mb = 128
source_archive_bucket = google_storage_bucket.bucket.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resource "google_compute_region_network_endpoint_group" "{{$.PrimaryResourceId}}
resource "google_cloudfunctions_function" "{{$.PrimaryResourceId}}" {
name = "{{index $.Vars "neg_name"}}"
description = "My function"
runtime = "nodejs10"
runtime = "nodejs20"

available_memory_mb = 128
source_archive_bucket = google_storage_bucket.bucket.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resource "google_cloudfunctions2_function" "function" {
location = "us-central1"

build_config {
runtime = "nodejs16"
runtime = "nodejs20"
entry_point = "SyntheticFunction" # Set the entry point
source {
storage_source {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ resource "google_storage_bucket_object" "archive" {

resource "google_cloudfunctions_function" "function_http" {
name = "%s-http"
runtime = "nodejs14"
runtime = "nodejs20"
description = "test function"
available_memory_mb = 128
source_archive_bucket = google_storage_bucket.bucket.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func ResourceCloudFunctionsFunction() *schema.Resource {
"runtime": {
Type: schema.TypeString,
Required: true,
Description: `The runtime in which the function is going to run. Eg. "nodejs12", "nodejs14", "python37", "go111".`,
Description: `The runtime in which the function is going to run. Eg. "nodejs20", "python37", "go111".`,
},

"service_account_email": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ resource "google_storage_bucket_object" "cloud_function_zip_object" {

resource "google_cloudfunctions_function" "function" {
name = "%s"
runtime = "nodejs14"
runtime = "nodejs20"
service_account_email = google_service_account.cloud_function_runner.email
entry_point = "echoSecret"
source_archive_bucket = google_storage_bucket.cloud_functions.id
Expand Down Expand Up @@ -1420,7 +1420,7 @@ resource "google_storage_bucket_object" "cloud_function_zip_object" {

resource "google_cloudfunctions_function" "function" {
name = "%s"
runtime = "nodejs14"
runtime = "nodejs20"
service_account_email = google_service_account.cloud_function_runner.email
entry_point = "echoSecret"
source_archive_bucket = google_storage_bucket.cloud_functions.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ resource "google_cloudfunctions2_function" "my-function" {
location = "us-central1"
description = "a new function"
build_config {
runtime = "nodejs12"
runtime = "nodejs20"
entry_point = "helloHttp"
source {
storage_source {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ resource "google_storage_bucket_object" "archive" {
resource "google_cloudfunctions_function" "function" {
name = "function-test"
description = "My function"
runtime = "nodejs16"
runtime = "nodejs20"

available_memory_mb = 128
source_archive_bucket = google_storage_bucket.bucket.name
Expand Down Expand Up @@ -73,7 +73,7 @@ resource "google_storage_bucket_object" "archive" {
resource "google_cloudfunctions_function" "function" {
name = "function-test"
description = "My function"
runtime = "nodejs16"
runtime = "nodejs20"

available_memory_mb = 128
source_archive_bucket = google_storage_bucket.bucket.name
Expand Down Expand Up @@ -109,7 +109,7 @@ The following arguments are supported:
* `name` - (Required) A user-defined name of the function. Function names must be unique globally.

* `runtime` - (Required) The runtime in which the function is going to run.
Eg. `"nodejs16"`, `"python39"`, `"dotnet3"`, `"go116"`, `"java11"`, `"ruby30"`, `"php74"`, etc. Check the [official doc](https://cloud.google.com/functions/docs/concepts/exec#runtimes) for the up-to-date list.
Eg. `"nodejs20"`, `"python39"`, `"dotnet3"`, `"go116"`, `"java11"`, `"ruby30"`, `"php74"`, etc. Check the [official doc](https://cloud.google.com/functions/docs/concepts/exec#runtimes) for the up-to-date list.

- - -

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"location": "us-east1",
"name": "my-cf",
"runtime": "nodejs14",
"runtime": "nodejs20",
"timeout": 60,
"trigger_http": true,
"vpcConnector": "vpc-con-cf",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "google_vpc_access_connector" "connector" {
resource "google_cloudfunctions_function" "function" {
name = "my-cf"
description = "My CloudFunction"
runtime = "nodejs14"
runtime = "nodejs20"

available_memory_mb = 128
source_archive_bucket = "validator_bucket_local"
Expand Down
Loading