Skip to content
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

Print terragrunt output to console in GCP Cloud Build preloader trigger #233

Merged

Conversation

roger2hk
Copy link
Contributor

@roger2hk roger2hk commented Apr 4, 2025

Removing these 3 lines as they don't seem to be used anywhere.

@roger2hk roger2hk requested a review from phbnf April 4, 2025 09:14
phbnf
phbnf previously approved these changes Apr 7, 2025
@phbnf phbnf dismissed their stale review April 7, 2025 13:33

we actually need this

@phbnf
Copy link
Collaborator

phbnf commented Apr 7, 2025

I never sent the followup PR because I was still working on it, but we'll some of these in the next PR.

@phbnf
Copy link
Collaborator

phbnf commented Apr 7, 2025

Actually, how about we just print them for future reference? Long run, I think we'll be able to remove them once we have changed how key provisioning and the preloader work, but it should do the job for now.

@roger2hk
Copy link
Contributor Author

roger2hk commented Apr 7, 2025

Actually, how about we just print them for future reference? Long run, I think we'll be able to remove them once we have changed how key provisioning and the preloader work, but it should do the job for now.

I've updated the code to only output the hidden sensitive ecdsa_p256_public_key_data. It would not be handy to find out the values if they're all printed. Here is what you're going to see if you print three of them out.

09:58:17.380 WARN   The `--terragrunt-no-color` flag is deprecated and will be removed in a future version of Terragrunt. Use `--no-color` instead.
--
169 | 09:58:17.380 WARN   The `TF_INPUT` environment variable is deprecated and will be removed in a future version of Terragrunt. Use `TG_NON_INTERACTIVE=true` instead.
170 | 09:58:17.382 WARN   Using `terragrunt.hcl` as the root of Terragrunt configurations is an anti-pattern, and no longer recommended. In a future version of Terragrunt, this will result in an error. You are advised to use a differently named file like `root.hcl` instead. For more information, see https://terragrunt.gruntwork.io/docs/migrate/migrating-from-root-terragrunt-hcl
171 | 09:58:17.472 WARN   Bootstrapping backend resources by default is deprecated functionality, and will not be the default behavior in a future version of Terragrunt. Use the explicit `--backend-bootstrap` flag to automatically provision backend resources before they're needed.
172 | 09:58:17.605 INFO   terraform: Initializing the backend...
173 | 09:58:18.327 INFO   terraform: Initializing modules...
174 | 09:58:18.333 INFO   terraform: Initializing provider plugins...
175 | 09:58:18.333 INFO   terraform: - Reusing previous version of hashicorp/google from the dependency lock file
176 | 09:58:18.455 INFO   terraform: - Reusing previous version of hashicorp/tls from the dependency lock file
177 | 09:58:18.881 INFO   terraform: - Using previously-installed hashicorp/google v6.12.0
178 | 09:58:18.936 INFO   terraform: - Using previously-installed hashicorp/tls v4.0.6
179 | 09:58:18.936 INFO   terraform: Terraform has made some changes to the provider dependency selections recorded
180 | 09:58:18.936 INFO   terraform: in the .terraform.lock.hcl file. Review those changes and commit them to your
181 | 09:58:18.936 INFO   terraform: version control system if they represent changes you intended to make.
182 | 09:58:18.937 INFO   terraform: Terraform has been successfully initialized!
183 | 09:58:19.692 WARN   The `--terragrunt-no-color` flag is deprecated and will be removed in a future version of Terragrunt. Use `--no-color` instead.
184 | 09:58:19.692 WARN   The `TF_INPUT` environment variable is deprecated and will be removed in a future version of Terragrunt. Use `TG_NON_INTERACTIVE=true` instead.
185 | 09:58:19.695 WARN   Using `terragrunt.hcl` as the root of Terragrunt configurations is an anti-pattern, and no longer recommended. In a future version of Terragrunt, this will result in an error. You are advised to use a differently named file like `root.hcl` instead. For more information, see https://terragrunt.gruntwork.io/docs/migrate/migrating-from-root-terragrunt-hcl
186 | 09:58:19.792 WARN   Bootstrapping backend resources by default is deprecated functionality, and will not be the default behavior in a future version of Terragrunt. Use the explicit `--backend-bootstrap` flag to automatically provision backend resources before they're needed.
187 | 09:58:19.932 INFO   terraform: Initializing the backend...
188 | 09:58:20.539 INFO   terraform: Initializing modules...
189 | 09:58:20.547 INFO   terraform: Initializing provider plugins...
190 | 09:58:20.547 INFO   terraform: - Reusing previous version of hashicorp/google from the dependency lock file
191 | 09:58:20.628 INFO   terraform: - Reusing previous version of hashicorp/tls from the dependency lock file
192 | 09:58:21.064 INFO   terraform: - Using previously-installed hashicorp/google v6.12.0
193 | 09:58:21.119 INFO   terraform: - Using previously-installed hashicorp/tls v4.0.6
194 | 09:58:21.119 INFO   terraform: Terraform has been successfully initialized!
195 | 09:58:21.883 WARN   The `--terragrunt-no-color` flag is deprecated and will be removed in a future version of Terragrunt. Use `--no-color` instead.
196 | 09:58:21.883 WARN   The `TF_INPUT` environment variable is deprecated and will be removed in a future version of Terragrunt. Use `TG_NON_INTERACTIVE=true` instead.
197 | 09:58:21.885 WARN   Using `terragrunt.hcl` as the root of Terragrunt configurations is an anti-pattern, and no longer recommended. In a future version of Terragrunt, this will result in an error. You are advised to use a differently named file like `root.hcl` instead. For more information, see https://terragrunt.gruntwork.io/docs/migrate/migrating-from-root-terragrunt-hcl
198 | 09:58:21.981 WARN   Bootstrapping backend resources by default is deprecated functionality, and will not be the default behavior in a future version of Terragrunt. Use the explicit `--backend-bootstrap` flag to automatically provision backend resources before they're needed.
199 | 09:58:22.108 INFO   terraform: Initializing the backend...
200 | 09:58:22.728 INFO   terraform: Initializing modules...
201 | 09:58:22.733 INFO   terraform: Initializing provider plugins...
202 | 09:58:22.733 INFO   terraform: - Reusing previous version of hashicorp/google from the dependency lock file
203 | 09:58:22.812 INFO   terraform: - Reusing previous version of hashicorp/tls from the dependency lock file
204 | 09:58:23.228 INFO   terraform: - Using previously-installed hashicorp/google v6.12.0
205 | 09:58:23.282 INFO   terraform: - Using previously-installed hashicorp/tls v4.0.6
206 | 09:58:23.282 INFO   terraform: Terraform has been successfully initialized!

@roger2hk roger2hk requested a review from phbnf April 7, 2025 15:42
@roger2hk
Copy link
Contributor Author

roger2hk commented Apr 7, 2025

Updated the steps to print the outputs to the console at the end.

@roger2hk roger2hk changed the title Remove unused terragrunt commands in GCP Cloud Build preloader trigger Print terragrunt output to console in GCP Cloud Build preloader trigger Apr 7, 2025
@roger2hk roger2hk merged commit fd34aba into transparency-dev:main Apr 7, 2025
7 checks passed
@roger2hk roger2hk deleted the gcp-preloader-remove-unused branch April 7, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants