Created
March 11, 2022 20:28
-
-
Save Intelrunner/1b46309e6cd88e5f898cc0b6008918da to your computer and use it in GitHub Desktop.
This is is a simple set of shell commands that transfers an existing GCP Asset Inventory to Bigquery
This file contains 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
#!/bin/sh | |
# more information: https://cloud.google.com/asset-inventory/docs/exporting-to-bigquery | |
# must have gcloud cli installed | |
gcloud asset export \ | |
# must provide a dataset | |
--bigquery-dataset $DATASET \ | |
# this is for a resource based output | |
--content-type resource \ | |
--project $PROJECT \ | |
--bigquery-table $DATASET_TABLE \ | |
# if the above table does not exist, this command creates it | |
--output-bigquery-force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment