-
Notifications
You must be signed in to change notification settings - Fork 835
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
audit: refactor for easier local development #2100
Conversation
mechanical refactor into functions: - remove_all_gcp_project_audit_files - audit_gcp_organization - audit_all_gcp_projects_with_parent_id - audit_gcp_project - audit_gcp_project_service - main ensure each function removes whichever folder it is about to populate, instead of deleting everything up front (to support targeted audits), except for audit_all_gcp_projects_with_parent_id, since it's populating a flat/non-hiearchical folder that may contain projects with other parent id's touch up logging for consistency
- pull in infra/gcp/lib.sh - use indent for logging instead of manual "###" headers - drop use of CLOUDSDK_CORE_PROJECT and prefer explicit `--project` flag - lowercase function-local vars
For faster local dev, `audit-gcp.sh k8s-infra-foo` will delete and re-export audit files just for the k8s-infra-foo project
This should allow for: - `bq` to actually work the first time it is used to dump bigquery resources - the `audit-gcp.sh` script to be invokved from anywhere
/hold cancel |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dims, spiffxp The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
late /lgtm |
See individual commits for details. The tl;dr summary is:
./audit-gcp.sh k8s-infra-foo k8s-infra-bar
to regenerate audit files just for those projects/hold
Using this to verify #2099