Skip to content

Print Terraform output in separate step #246

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

Merged
merged 2 commits into from
Apr 9, 2025
Merged
Changes from 1 commit
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
18 changes: 17 additions & 1 deletion deployment/modules/gcp/cloudbuild/conformance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,22 @@ 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
EOT
dir = "deployment/live/gcp/static-ct/logs/ci"
env = [
"GOOGLE_PROJECT=${var.project_id}",
"TF_IN_AUTOMATION=1",
"TF_INPUT=false",
"TF_VAR_project_id=${var.project_id}"
]
wait_for = ["preclean_env", "docker_push_conformance_gcp"]
}

## Print Terragrunt output.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Print Terragrunt output.
## Print Terragrunt output to files.

step {
id = "terraform_print_output"
name = "alpine/terragrunt"
script = <<EOT
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
Expand All @@ -135,7 +151,7 @@ resource "google_cloudbuild_trigger" "build_trigger" {
"TF_INPUT=false",
"TF_VAR_project_id=${var.project_id}"
]
wait_for = ["preclean_env", "docker_push_conformance_gcp"]
wait_for = ["terraform_apply_conformance_ci"]
}

## Since the conformance infrastructure is not publicly accessible, we need to use
Expand Down
Loading