Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Installa lo strumento config-connector CLI
Questa pagina spiega come installare lo strumento CLI config-connector.
Con lo strumento CLI config-connector, puoi esportare le risorse Google Cloud esistenti in file YAML, che sono necessari per l'acquisizione di queste risorse da parte di Config Connector.
Lo strumento CLI config-connector non viene installato per impostazione predefinita quando installi Config Connector.
Scarica il file tar binario config-connector più recente:
gcloudstoragecpgs://cnrm/latest/cli.tar.gz.
Estrai il file tar:
tarzxfcli.tar.gz
Il file tar include un file eseguibile binario per Linux, macOS e Windows.
Scegli il file binario appropriato per il tuo sistema operativo:
Linux: ./linux/amd64/config-connector
macOS: ./darwin/amd64/config-connector
Windows: ./windows/amd64/config-connector
Copia il file binario in una posizione sul tuo ${PATH}. Ad esempio, su Linux
e macOS, puoi utilizzare mv per inserirlo in /usr/local/bin.
mvlinux/amd64/config-connector/usr/local/bin
Se vuoi utilizzare lo strumento CLI config-connector per esportare direttamente da Cloud Asset Inventory, abilita l'API Cloud Asset Inventory nel progetto della tua identità con gcloud. Google Cloud
gcloudservicesenablecloudasset.googleapis.com
Esegui l'upgrade di config-connector
Per eseguire l'upgrade dello strumento CLI di config-connector alla versione più recente, ripeti i passaggi di installazione e sovrascrivi l'eseguibile.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003econfig-connector\u003c/code\u003e tool allows you to export existing resources to Config Connector YAML files, which can then be imported using \u003ccode\u003ekubectl\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eInstallation of \u003ccode\u003econfig-connector\u003c/code\u003e involves downloading the appropriate binary from \u003ccode\u003egs://cnrm/latest/cli.tar.gz\u003c/code\u003e, extracting it, and placing it in a location on your \u003ccode\u003e${PATH}\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe tool utilizes Google Cloud CLI's \u003ccode\u003eapplication-default\u003c/code\u003e credentials for authentication, obtainable via the command \u003ccode\u003egcloud auth application-default login\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eTo use the \u003ccode\u003econfig-connector\u003c/code\u003e tool for direct export from Cloud Asset Inventory, you must first enable the Cloud Asset Inventory API with \u003ccode\u003egcloud services enable cloudasset.googleapis.com\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eUpgrading the \u003ccode\u003econfig-connector\u003c/code\u003e tool to the most recent release entails repeating the installation instructions and overwriting the existing executable.\u003c/p\u003e\n"]]],[],null,["# Install the config-connector CLI tool\n\nInstall the `config-connector` CLI tool\n=======================================\n\n*** ** * ** ***\n\nThis page explains how to install the `config-connector` CLI tool.\n\nWith the `config-connector` CLI tool, you can export existing Google Cloud resources into\nYAML files, which are required for Config Connector to acquire those resources.\n\nThe `config-connector` CLI tool is not installed by default when you install Config Connector.\n\nBefore you begin\n----------------\n\n[Install Config Connector with a supported installation method](/config-connector/docs/concepts/installation-types).\n\nInstall `config-connector` CLI tool\n-----------------------------------\n\n1. Download the latest `config-connector` binary tar file:\n\n gcloud storage cp gs://cnrm/latest/cli.tar.gz .\n\n2. Extract the tar file:\n\n tar zxf cli.tar.gz\n\n3. The tar file includes a binary executable for Linux, macOS, and Windows.\n Choose the appropriate binary for your operating system:\n\n - Linux: `./linux/amd64/config-connector`\n - macOS: `./darwin/amd64/config-connector`\n - Windows: `./windows/amd64/config-connector`\n4. Copy the binary to a location on your `${PATH}`. For example, on Linux\n and macOS, you might use `mv` to place it into `/usr/local/bin`.\n\n mv linux/amd64/config-connector /usr/local/bin\n\n5. If you want to use the `config-connector` CLI tool to export directly from\n Cloud Asset Inventory, enable the Cloud Asset Inventory API on your Google Cloud\n Identity's project with `gcloud`.\n\n gcloud services enable cloudasset.googleapis.com\n\nUpgrade config-connector\n------------------------\n\nTo upgrade the `config-connector` CLI tool to the latest version, repeat the installation\nsteps and overwrite the executable.\n\nWhat's next\n-----------\n\n- [Perform an export on individual resources](/config-connector/docs/how-to/import-export/export).\n- [Perform a bulk export for all resources in your project, folder, or organization](/config-connector/docs/how-to/import-export/bulk-export).\n- [Learn about the resources that Config Connector supports](/config-connector/docs/reference/overview)."]]