Skip to content

Commit

Permalink
Update gcpprojects.py
Browse files Browse the repository at this point in the history
Comment out trouble shooting code
  • Loading branch information
WCierkowski authored Jun 26, 2024
1 parent c02b9ef commit 6f70412
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tools/c7n_org/scripts/gcpprojects.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ def main(output, exclude, buid, appscript):
Generate a c7n-org gcp projects config file
"""
client = Session().client('cloudresourcemanager', 'v1', 'projects')
print("Client:", client)
print("**********************************************")
# print("Client:", client)
# print("**********************************************")


query_params = {'filter': f"parent.type:folder parent.id:{buid}"} if buid else {}
print("Query Params:", query_params)
print("**********************************************")
# print("Query Params:", query_params)
# print("**********************************************")

results = []
for page in client.execute_paged_query('list', query_params):
print("Page:", page)
print("**********************************************")
# print("Page:", page)
# print("**********************************************")

for project in page.get('projects', []):
print("Project:", project)
print("**********************************************")
# print("Project:", project)
# print("**********************************************")

# Exclude App Script GCP Projects
if appscript == False:
Expand Down

0 comments on commit 6f70412

Please sign in to comment.