terraform-google-modules / terraform-example-foundation

Shows how the CFT modules can be composed to build a secure cloud foundation
https://cloud.google.com/architecture/security-foundations
Apache License 2.0
1.21k stars 705 forks source link

Upgrade to google-github-actions/setup-gcloud@v2 #1296

Open lpezet opened 1 month ago

lpezet commented 1 month ago

TL;DR

If I'm not mistaken, Github workflow files (e.g. github-tf-apply.yaml) setup in 0-bootstrap (at least), are using v1 of google-github-actions/setup-gcloud. Any particular reasons it's not using v2?

Terraform Resources

No response

Detailed design

Files involved:
- https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/build/github-tf-apply.yaml
- https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/build/github-tf-pull-request.yaml

Additional information

Willing to submit PR if version upgrade OKed. I can't really test it though (besides running it against my own setup)...

eeaton commented 1 month ago

Thanks for flagging @lpezet. No deliberate reason to stay with v1, I have other projects using github-actions/setup-gcloud@v2 that work just fine.

The github actions aren't part of the automated CI set we have that PR must pass before merging, but for a change like this I'd say just running it against your own setup should be sufficient. (I'll do the same before merging)

If you have the availability to make a PR that's great, otherwise I'll add it to the backlog for our next major round of updates, there are a few other issues raised against the github flow that need some review. Probably will configure Dependabot or similar to make sure we're automatically checking for updates to GHA like setup-gcloud

daniel-cit commented 1 month ago

The code is using v1 because it was merged a few weeks before v2 was released.

This is a good opportunity to review all the versions in the github and gitlab build configuration.

lpezet commented 1 month ago

@daniel-cit As you suggested, I went over other github actions and upgraded those. I pasted what I could find from their changelogs in the PR description as well. PR #1297