olehborysevych commented on code in PR #25793:
URL: https://github.com/apache/beam/pull/25793#discussion_r1176731978


##########
learning/tour-of-beam/terraform/cloud_functions/main.tf:
##########
@@ -0,0 +1,61 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# GCP Cloud Functions that will serve as a part of the backend of Tour of Beam 
infrastructure
+resource "google_cloudfunctions_function" "cloud_function" {
+  count                 = length(var.entry_point_names)
+  name                  = 
"${var.environment}_${var.entry_point_names[count.index]}"
+  runtime               = "go116"
+  available_memory_mb   = 128
+  project               = var.project_id
+  service_account_email = var.service_account_id
+  source_archive_bucket = var.source_archive_bucket
+  source_archive_object = var.source_archive_object
+  region                = var.region
+  ingress_settings      = "ALLOW_ALL"
+  # Get the source code of the cloud function as a Zip compression
+  trigger_http = true
+  # Name of the function that will be executed when the Google Cloud Function 
is triggered
+  entry_point = var.entry_point_names[count.index]
+
+  environment_variables = {
+    DATASTORE_PROJECT_ID=var.project_id
+    GOOGLE_PROJECT_ID=var.project_id
+    PLAYGROUND_ROUTER_HOST=var.pg_router_host

Review Comment:
   @ruslan-ikhsan  we also need to add a DATASTORE_NAMESPACE variable here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to