[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eCloud Code's Secret Manager integration allows you to manage secrets directly within your IDE without storing them in your codebase.\u003c/p\u003e\n"],["\u003cp\u003eYou can create secrets using the Secret Manager panel, the editor, or the project explorer, specifying project, name, value, region, and labels.\u003c/p\u003e\n"],["\u003cp\u003eExisting secrets can be updated by creating new versions in the Versions tab, where you can choose to disable all previous versions.\u003c/p\u003e\n"],["\u003cp\u003eSecrets and their versions can be viewed within the Secret Manager panel, with options to view details, open in the Cloud console, or take actions on specific versions.\u003c/p\u003e\n"],["\u003cp\u003eTo access secrets in your application, install the Secret Manager client library and follow the appropriate authentication setup for local or remote development.\u003c/p\u003e\n"]]],[],null,["# Manage secrets with Secret Manager in Cloud Code for IntelliJ\n\nWith Cloud Code's Secret Manager integration, you\ncan create, view, update, and use secrets within your IDE and without having\nthem in your codebase.\n\nThis page describes how to access Secret Manager within your IDE and how\nyou can get started creating and managing secrets.\n\nEnabling Secret Manager\n-----------------------\n\nWhen managing secrets with Cloud Code, secrets are securely stored\nin Secret Manager and can be programmatically fetched when you need\nthem. All you need is the Secret Manager API enabled and the right\npermissions to manage secrets:\n\n1. To launch Secret Manager, click on the Secret Manager tab in the\n right Cloud Code sidebar.\n\n2. If you haven't enabled the Secret Manager API, Cloud Code prompts\n you to enable it within the Secret Manager panel by clicking **Enable API**.\n\n Your secret also needs to be in the same project as your application code; ensure\n you have the right project selected or switch using the project selector in the\n Secret Manager panel.\n\nCreating and viewing secrets\n----------------------------\n\n### Creating secrets\n\nYou can create a secret with one of the following methods:\n\n#### Using the Secret Manager panel\n\n1. Navigate to the Secret Manager panel.\n\n2. Click the **Add** icon.\n\n This launches a Create Secret dialog where you can set your secret's project,\n name, and value, as well as choose a region to store your secret and labels to\n organize your secrets.\n\n#### Using the editor\n\n1. Open a file containing text you would like to store as a secret in the editor.\n2. Highlight and right-click this text.\n\n From the menu, select the `Create Secret in Secret Manager...` menu item.\n This opens the Create Secret dialog with the secret value filled in with\n the highlighted text. You can customize the secret's project,\n name, value, region, and labels here.\n\n#### Using the project explorer\n\n1. In the project explorer, without highlighting any text, right-click.\n2. From the menu, select the `Create Secret in Secret Manager...` menu item. This opens the Create Secret dialog. Choose your secret's project, name, value, region, and labels here, and click **OK** when done.\n\n### Creating new versions of secrets\n\nIf you have an existing secret and would like to update it, you can do so by\nnavigating to the **Versions** tab of the Secret Manager panel:\n\n1. Click the **Add** icon within the **Versions** tab.\n\n This launches a Add new version dialog where you can set the value of your\n existing secret either using the Secret value field or by importing a file.\n\n2. If you'd prefer to remove all previous versions of your secret and keep just\n the new version being created, choose **Disable all past versions**.\n\n3. Once you click **OK** and your version is added, you can see your latest secret\n version, and if applicable, all the versions of your secret listed under\n the **Versions** tab.\n\n### Viewing secrets\n\nTo view secrets, within the Secret Manager panel, select a secret from the list\ndisplayed in the Secret Name section. Its details such as name, replication\npolicy, creation timestamp, and resource ID are listed in the **Overview** tab.\n\nYou can also right-click the secret and choose **Open in Cloud console** to view and\nmanage the secret in your browser.\n\n### Viewing secret versions\n\nTo view versions of a secret, select a secret from the list displayed in the\nSecret Name section and select the **Versions** tab.\n\nRight-click the secret version you'd like to take action on and choose from\nthe available options; viewing the secret value, copying the version ID,\nenabling or disabling the version, and destroying the selected version.\n\nAccessing secrets from your application\n---------------------------------------\n\nOnce your secret is created, you can include it in your code and set up\nauthentication.\n\nTo access your newly created secret from your application, follow these steps:\n\n1. Install the Secret Manager client library.\n\n Navigate to **Tools** \\\u003e **Cloud Code** \\\u003e **Add Cloud Libraries and Manage\n Cloud APIs** and select **Secret Manager** \\\u003e **Secret Manager API** from the\n Google Cloud APIs explorer tree. Follow the language-specific instructions\n laid out in the Install Client Library section.\n2. Customize and include the [relevant code snippet](/secret-manager/docs/access-secret-version)\n in your application's code.\n\n3. Finally, to complete your authentication setup, you need to follow the\n Client libraries authentication guide:\n\n - **Local development** : If you're developing on a local cluster (like minikube, Docker Desktop) or a local emulator, you should complete the steps illustrated in the [Local development section](/code/docs/intellij/client-libraries#local_development) relevant to your workflow.\n - **Remote development** : If you're using a GKE cluster or a Cloud Run service in your application, you should complete the steps illustrated in the [Remote development section](/code/docs/intellij/client-libraries#remote_development) relevant to your workflow, including the Secret Manager-specific instructions for setting up the required roles on your service account.\n\nGet support\n-----------\n\nTo submit feedback or report an issue in your IntelliJ IDE, go to **Tools** \\\u003e **Cloud Code** \\\u003e **Help / About** \\\u003e **Submit\nfeedback or report an issue** to report an issue on [GitHub](https://github.com/GoogleCloudPlatform/cloud-code-intellij/issues)."]]