Skip to content

Commit f060966

Browse files
authored
Print Terraform output in separate step (#246)
* split output printing * address comments
1 parent 96ce8e4 commit f060966

File tree

1 file changed

+17
-1
lines changed
  • deployment/modules/gcp/cloudbuild/conformance

1 file changed

+17
-1
lines changed

deployment/modules/gcp/cloudbuild/conformance/main.tf

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,22 @@ resource "google_cloudbuild_trigger" "build_trigger" {
124124
name = "alpine/terragrunt"
125125
script = <<EOT
126126
terragrunt --terragrunt-non-interactive --terragrunt-no-color apply -auto-approve -no-color 2>&1
127+
EOT
128+
dir = "deployment/live/gcp/static-ct/logs/ci"
129+
env = [
130+
"GOOGLE_PROJECT=${var.project_id}",
131+
"TF_IN_AUTOMATION=1",
132+
"TF_INPUT=false",
133+
"TF_VAR_project_id=${var.project_id}"
134+
]
135+
wait_for = ["preclean_env", "docker_push_conformance_gcp"]
136+
}
137+
138+
## Print Terragrunt output to files.
139+
step {
140+
id = "terraform_print_output"
141+
name = "alpine/terragrunt"
142+
script = <<EOT
127143
terragrunt --terragrunt-no-color output --raw conformance_url -no-color > /workspace/conformance_url
128144
terragrunt --terragrunt-no-color output --raw conformance_bucket_name -no-color > /workspace/conformance_bucket_name
129145
terragrunt --terragrunt-no-color output --raw ecdsa_p256_public_key_data -no-color > /workspace/conformance_log_public_key.pem
@@ -135,7 +151,7 @@ resource "google_cloudbuild_trigger" "build_trigger" {
135151
"TF_INPUT=false",
136152
"TF_VAR_project_id=${var.project_id}"
137153
]
138-
wait_for = ["preclean_env", "docker_push_conformance_gcp"]
154+
wait_for = ["terraform_apply_conformance_ci"]
139155
}
140156

141157
## Since the conformance infrastructure is not publicly accessible, we need to use

0 commit comments

Comments
 (0)