gcloud beta resource-config bulk-export

NAME
gcloud beta resource-config bulk-export - export configurations for all assets within the specified project, organization, or folder
SYNOPSIS
gcloud beta resource-config bulk-export[--on-error=ON_ERROR; default="ignore"][--path=PATH; default="-"][--resource-format=RESOURCE_FORMAT][--folder=FOLDER    |--organization=ORGANIZATION    |--project=PROJECT][--storage-path=STORAGE_PATH    |--resource-types=[RESOURCE_TYPE,…]    |--resource-types-file=RESOURCE_TYPE_FILE][GCLOUD_WIDE_FLAG]
DESCRIPTION
(BETA) Export configurations for all assets within the specifiedproject, organization, or folder.
EXAMPLES
To export all resources in a project to a local directory, run:
gcloudbetaresource-configbulk-export--path=/path/to/dir/

To export all resources in a organization to stdout, run:

gcloudbetaresource-configbulk-export--organization=12345--path=-

To export all resources in a folder to stdout in Terraform format, run:

gcloudbetaresource-configbulk-export--folder=12345--resource-format=terraform

To export all resources in a project to stdout, using a custom Google Storagebucket for interim results, run:

gcloudbetaresource-configbulk-export--project=my-project--storage-path='gs://your-bucket-name/your/prefix/path'

To export all Storage Bucket and Compute Instances resources in projectmy-project to stdout, run:

gcloudbetaresource-configbulk-export--project=my-project--resource-types=storage.cnrm.cloud.google.com/StorageBucket,ComputeInstance

To export all resource types in file 'types-file.txt' in project my-project tostdout, run:

gcloudbetaresource-configbulk-export--project=my-project--resource-types-file=types-file.txt
FLAGS
--on-error=ON_ERROR; default="ignore"
Determines behavior when a recoverable error is encountered while exporting aresource. To stop execution when encountering an error, specify "halt". To logerrors when encountered and continue the export, specify "continue". To continuewhen errors are encountered without logging, specify "ignore".ON_ERROR must be one of:continue,halt,ignore.
--path=PATH; default="-"
Path of the directory or file to output configuration(s). To outputconfigurations to stdout, specify "--path=-".
--resource-format=RESOURCE_FORMAT
Format of the configuration to export. Available configuration formats areKubernetes Resource Model YAML (krm) or Terraform HCL (terraform). Commanddefaults to "krm".RESOURCE_FORMAT must be one of:krm,terraform.
RESOURCE PARENT FLAG - specify one of the following to determinethe scope of exported resources.

At most one of these can be specified:

--folder=FOLDER
Folder ID
--organization=ORGANIZATION
Organization ID
--project=PROJECT
Project ID
Selectstorage-path if you want to specify the Google Cloud Storagebucket bulk-export should use for Cloud Asset Inventory Export. Alternatively,you can provide aRESOURCE TYPE FILTER to filter resources.Filtering resourcesdoes not use Google Cloud Storage toexport resources.

At most one of these can be specified:

--storage-path=STORAGE_PATH
Google Cloud Storage path where a Cloud Asset Inventory export will be stored,example:gs://your-bucket-name/your/prefix/path
Or at most one of these can be specified:
RESOURCE TYPE FILTERS - specify resource types to export.
--resource-types=[RESOURCE_TYPE,…]
List of Config Connector KRM Kinds to export. For a full list of supportedresource types for a given parent scope run:
gcloudbetaresource-configlist-resource-types--[project|organization|folder]=<PARENT>
--resource-types-file=RESOURCE_TYPE_FILE
A comma (',') or newline ('\n') separated file containing the list of ConfigConnector KRM Kinds to export. For a full list of supported resource types for agiven parent scope run:
gcloudbetaresource-configlist-resource-types--[project|organization|folder]=<PARENT>

Use a full or relative path to a local file containing the value ofresource_types_file.

GCLOUD WIDE FLAGS
These flags are available to all commands:--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.

Run$gcloud help for details.

NOTES
This command is currently in beta and might change without notice. This variantis also available:
gcloudalpharesource-configbulk-export

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-21 UTC.