damondouglas commented on code in PR #24144:
URL: https://github.com/apache/beam/pull/24144#discussion_r1038653139


##########
playground/terraform/README.md:
##########
@@ -18,6 +18,7 @@
 -->
 # Playground deployment on GCP
 This guide shows you how to deploy full Playground environment on Google Cloud 
Platform (GCP) environment.
+Alternatively, you can automate Playground environment deployment with Cloud 
Build as described in 
[readme](https://github.com/apache/beam/blob/master/playground/terraform/infrastructure/cloudbuild-manual-setup/README.md/README.md).

Review Comment:
   Thank you for doing this.  The link is broken.  I think one can do this to 
avoid referencing an actual branch.  You'll have to experiment with how many 
`../` you'll need.
   ```markdown
   
[playground/terraform/infrastructure/cloudbuild-manual-setup](../../playground/terraform/infrastructure/cloudbuild-manual-setup)
   ```



##########
playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/triggers.tf:
##########
@@ -0,0 +1,83 @@
+# 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.
+
+data "google_service_account" "cloudbuild_sa" {
+  account_id = var.cloudbuild_service_account_id
+}
+
+resource "google_cloudbuild_trigger" "playground_infrastructure" {
+  name     = var.infra_trigger_name
+  location = var.region
+  project  = var.project_id
+
+  description = "Builds the base image and then runs cloud build config file 
to deploy Playground infrastructure"
+
+  github {
+    owner = var.github_repository_owner
+    name  = var.github_repository_name
+    push {
+      branch = var.github_repository_branch
+    }
+  }
+
+  substitutions = {
+    _PLAYGROUND_REGION : var.playground_region
+    _PLAYGROUND_ZONE : var.playground_zone
+    _ENVIRONMENT_NAME : var.playground_environment_name
+    _DNS_NAME : var.playground_dns_name
+    _NETWORK_NAME : var.playground_network_name
+    _GKE_NAME : var.playground_gke_name
+    _STATE_BUCKET : var.state_bucket
+  }
+
+  filename = "playground/infrastructure/cloudbuild/cloudbuild_pg_infra.yaml"
+
+  service_account = data.google_service_account.cloudbuild_sa.id
+}
+
+resource "google_cloudbuild_trigger" "playground_to_gke" {
+  name     = var.gke_trigger_name
+  location = var.region

Review Comment:
   This can be removed.



##########
playground/terraform/infrastructure/cloudbuild-manual-setup/02.builders/triggers.tf:
##########
@@ -0,0 +1,83 @@
+# 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.
+
+data "google_service_account" "cloudbuild_sa" {
+  account_id = var.cloudbuild_service_account_id
+}
+
+resource "google_cloudbuild_trigger" "playground_infrastructure" {
+  name     = var.infra_trigger_name
+  location = var.region

Review Comment:
   This can be removed.



-- 
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