From c6dfdcc4c53102a28bcb27c067397ec399082a97 Mon Sep 17 00:00:00 2001
From: Roger Ng <rogerng@google.com>
Date: Fri, 4 Apr 2025 09:13:09 +0000
Subject: [PATCH 1/4] Remove unused terragrunt commands in GCP Cloud Build
 preloader trigger

---
 deployment/modules/gcp/cloudbuild/preloaded/main.tf | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/deployment/modules/gcp/cloudbuild/preloaded/main.tf b/deployment/modules/gcp/cloudbuild/preloaded/main.tf
index d1f5545d..95b679a9 100644
--- a/deployment/modules/gcp/cloudbuild/preloaded/main.tf
+++ b/deployment/modules/gcp/cloudbuild/preloaded/main.tf
@@ -109,9 +109,6 @@ resource "google_cloudbuild_trigger" "build_trigger" {
       name   = "alpine/terragrunt"
       script = <<EOT
         terragrunt --terragrunt-non-interactive --terragrunt-no-color apply -auto-approve -no-color 2>&1
-        terragrunt --terragrunt-no-color output --raw conformance_url -no-color > /workspace/conformance_url
-        terragrunt --terragrunt-no-color output --raw conformance_bucket_name -no-color > /workspace/conformance_bucket_name
-        terragrunt --terragrunt-no-color output --raw ecdsa_p256_public_key_data -no-color > /workspace/conformance_log_public_key.pem
       EOT
       dir    = "deployment/live/gcp/static-ct-staging/logs/arche2025h1"
       env = [

From ca2d6d5992fb9f31e402e631bda710c85fbd7c41 Mon Sep 17 00:00:00 2001
From: Roger Ng <rogerng@google.com>
Date: Mon, 7 Apr 2025 15:30:24 +0000
Subject: [PATCH 2/4] Only `terragrunt output ecdsa_p256_public_key_data`

---
 deployment/modules/gcp/cloudbuild/preloaded/main.tf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/deployment/modules/gcp/cloudbuild/preloaded/main.tf b/deployment/modules/gcp/cloudbuild/preloaded/main.tf
index 95b679a9..8fad7605 100644
--- a/deployment/modules/gcp/cloudbuild/preloaded/main.tf
+++ b/deployment/modules/gcp/cloudbuild/preloaded/main.tf
@@ -109,6 +109,7 @@ resource "google_cloudbuild_trigger" "build_trigger" {
       name   = "alpine/terragrunt"
       script = <<EOT
         terragrunt --terragrunt-non-interactive --terragrunt-no-color apply -auto-approve -no-color 2>&1
+        terragrunt output ecdsa_p256_public_key_data
       EOT
       dir    = "deployment/live/gcp/static-ct-staging/logs/arche2025h1"
       env = [

From 60e4fc29d70be865ea58a86500213913a2d78407 Mon Sep 17 00:00:00 2001
From: Roger Ng <rogerng@google.com>
Date: Mon, 7 Apr 2025 15:53:36 +0000
Subject: [PATCH 3/4] Print the terragrunt output to console

---
 deployment/modules/gcp/cloudbuild/preloaded/main.tf | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/deployment/modules/gcp/cloudbuild/preloaded/main.tf b/deployment/modules/gcp/cloudbuild/preloaded/main.tf
index 8fad7605..10f5b18e 100644
--- a/deployment/modules/gcp/cloudbuild/preloaded/main.tf
+++ b/deployment/modules/gcp/cloudbuild/preloaded/main.tf
@@ -109,7 +109,12 @@ resource "google_cloudbuild_trigger" "build_trigger" {
       name   = "alpine/terragrunt"
       script = <<EOT
         terragrunt --terragrunt-non-interactive --terragrunt-no-color apply -auto-approve -no-color 2>&1
-        terragrunt output ecdsa_p256_public_key_data
+        terragrunt --terragrunt-no-color output --raw conformance_url -no-color > /workspace/output
+        terragrunt --terragrunt-no-color output --raw conformance_bucket_name -no-color > /workspace/conformance_bucket_name
+        terragrunt --terragrunt-no-color output --raw ecdsa_p256_public_key_data -no-color > /workspace/conformance_log_public_key.pem
+        cat /workspace/output
+        cat /workspace/conformance_bucket_name
+        cat /workspace/conformance_log_public_key.pem
       EOT
       dir    = "deployment/live/gcp/static-ct-staging/logs/arche2025h1"
       env = [

From d86db918561b329a6909495be25a4e79a41eb136 Mon Sep 17 00:00:00 2001
From: Roger Ng <rogerng@google.com>
Date: Mon, 7 Apr 2025 15:53:58 +0000
Subject: [PATCH 4/4] Print the terragrunt output to console

---
 deployment/modules/gcp/cloudbuild/preloaded/main.tf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/deployment/modules/gcp/cloudbuild/preloaded/main.tf b/deployment/modules/gcp/cloudbuild/preloaded/main.tf
index 10f5b18e..6838b289 100644
--- a/deployment/modules/gcp/cloudbuild/preloaded/main.tf
+++ b/deployment/modules/gcp/cloudbuild/preloaded/main.tf
@@ -109,10 +109,10 @@ resource "google_cloudbuild_trigger" "build_trigger" {
       name   = "alpine/terragrunt"
       script = <<EOT
         terragrunt --terragrunt-non-interactive --terragrunt-no-color apply -auto-approve -no-color 2>&1
-        terragrunt --terragrunt-no-color output --raw conformance_url -no-color > /workspace/output
+        terragrunt --terragrunt-no-color output --raw conformance_url -no-color > /workspace/conformance_url
         terragrunt --terragrunt-no-color output --raw conformance_bucket_name -no-color > /workspace/conformance_bucket_name
         terragrunt --terragrunt-no-color output --raw ecdsa_p256_public_key_data -no-color > /workspace/conformance_log_public_key.pem
-        cat /workspace/output
+        cat /workspace/conformance_url
         cat /workspace/conformance_bucket_name
         cat /workspace/conformance_log_public_key.pem
       EOT