-
- Always look for the official documentation, this tutorial may not suit you as there are new updates to the installation process.
- References are at the end of the document.
-
- Windows 11 (
x64) - WSL 2 (
Ubuntu 22.04.2 LTS)
- Windows 11 (
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Context: Given a GCP organisation node (the organisation itself or one of its subfolder) I need to get all the gcp project ids under this node, flattened in a single list. | |
| # Terraform lacks of support to run trough graph structures like a tree. | |
| # The below code is a breadth first search run. Depth first search would require recursivity, smthg that I didn't find on HCL. | |
| # Last but not least, once I managed to get a working code after one hour of several tries I found the terraform resource which encapsulate what I needed first. | |
| # https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/cloud_asset_resources_search_all#argument-reference | |
| provider "google" { | |
| user_project_override = true | |
| billing_project = <TO-REPLACE> | |
| } |
OlderNewer