Secret Manager에서는 직접 또는 애플리케이션에서 보안 비밀을 사용 및 관리할 수 있도록 REST API 및 gRPC API를 노출합니다. 이 페이지에서는 Secret Manager API를 사용 설정하고 Secret Manager를 처음 사용하도록 Google Cloud 프로젝트를 구성하는 방법을 설명합니다.
이 단계는 빠른 시작을 포함하여 Secret Manager의 모든 태스크를 위한 기본 요건입니다.
Secret Manager에 익숙해지면 별도의 Google Cloud 프로젝트를 사용하는 것이 좋습니다. 프로젝트를 삭제하면 결제 가능한 리소스 등 테스트 중에 생성된 모든 리소스도 삭제됩니다.
Cloud Code가 설치된 IDE에서 애플리케이션을 개발하는 경우 Secret Manager가 확장 프로그램에 통합됩니다. 즉, IDE에서 나가지 않고도 보안 비밀을 만들고, 보고, 업데이트하고, 사용할 수 있습니다. Cloud Code에 Secret Manager를 사용하는 방법에 대한 자세한 내용은 원하는 IDE, VS Code, IntelliJ 또는 Cloud Shell 편집기를 위한 보안 비밀 관리 가이드를 참조하세요.
시작하기 전에
In the Google Cloud console, go to the project selector page.
At the bottom of the Google Cloud console, a
Cloud Shell
session starts and displays a command-line prompt. Cloud Shell is a shell environment
with the Google Cloud CLI
already installed and with values already set for
your current project. It can take a few seconds for the session to initialize.
gcloud 세션에서 Google Cloud 프로젝트를 설정하려면 gcloud config set project 명령어를 실행합니다. PROJECT_ID를 Google Cloud 프로젝트 ID로 바꿉니다.
Secret Manager를 설정하는 데 필요한 권한을 얻으려면 관리자에게 프로젝트에 대한 Secret Manager 관리자 (roles/secretmanager.admin) IAM 역할을 부여해 달라고 요청하세요.
역할 부여에 대한 자세한 내용은 프로젝트, 폴더, 조직에 대한 액세스 관리를 참조하세요.
[[["이해하기 쉬움","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)"],[],[],null,["# Enable the Secret Manager API\n\nSecret Manager exposes a REST API and a gRPC API for using and managing secrets\ndirectly or in your applications. This page describes how to enable the\nSecret Manager API and configure your Google Cloud project to use\nSecret Manager for the first time.\n\nThis step is a prerequisite for all tasks in Secret Manager, including the\n[quickstart](/secret-manager/docs/quickstart).\n\nWhen you are becoming familiar with Secret Manager, we recommend using a\nseparate Google Cloud project. Deleting the project also deletes all\nresources created during testing, including billable resources.\n\nIf you are developing an application in an IDE with [Cloud Code](https://cloud.google.com/code) installed,\nSecret Manager comes integrated into the extension. This means that you\ncan create, view, update, and use secrets without having to leave your IDE. For\nmore on using Secret Manager with Cloud Code, refer to the secret\nmanaging guide for your preferred IDE,\n[VS Code](/code/docs/vscode/secret-manager),\n[IntelliJ](/code/docs/intellij/secret-manager),\nor [Cloud Shell Editor](/code/docs/shell/secret-manager).\n\nBefore you begin\n----------------\n\n1. In the Google Cloud console, go to the project selector page.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n2. Select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\nEnable the Secret Manager API\n-----------------------------\n\n### Console\n\n1. In the Google Cloud console, go to the **Secret Manager API** page.\n\n [Go to Secret Manager API](https://console.cloud.google.com/apis/library/secretmanager.googleapis.com)\n2. Verify that the name of your project appears in the project selector at the top of the page.\n\n If you don't see the name of your project, click the project selector, and then select your project.\n3. Click **Enable**.\n\n### gcloud\n\n1. In the Google Cloud console, activate Cloud Shell.\n\n [Activate Cloud Shell](https://console.cloud.google.com/?cloudshell=true)\n\n\n At the bottom of the Google Cloud console, a\n [Cloud Shell](/shell/docs/how-cloud-shell-works)\n session starts and displays a command-line prompt. Cloud Shell is a shell environment\n with the Google Cloud CLI\n already installed and with values already set for\n your current project. It can take a few seconds for the session to initialize.\n2. To set your Google Cloud project in the gcloud session, run the [`gcloud config set project`](/sdk/gcloud/reference/config/set) command. Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with your Google Cloud project ID. \n\n ```scdoc\n gcloud config set project PROJECT_ID\n ```\n3. To enable the Secret Manager API, run the [`gcloud services enable`](/sdk/gcloud/reference/services/enable) command: \n\n ```text\n gcloud services enable secretmanager.googleapis.com\n ```\n4. To verify that the Secret Manager API is enabled, run the [`gcloud services list`](/sdk/gcloud/reference/services/list) command: \n\n ```text\n gcloud services list --enabled\n ```\n\n Verify that the Secret Manager API is listed in the list of enabled APIs.\n\nConfigure roles and permissions\n-------------------------------\n\n\nTo get the permissions that\nyou need to set up Secret Manager,\n\nask your administrator to grant you the\n\n\n[Secret Manager Admin](/iam/docs/roles-permissions/secretmanager#secretmanager.admin) (`roles/secretmanager.admin`)\nIAM role on the project.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nFor more information about the access control for Secret Manager, see\n[Access control with IAM](/secret-manager/docs/access-control).\n\nWhat's next\n-----------\n\n- Learn more about [authentication and access](/secret-manager/docs/authentication) to the Secret Manager API.\n- Learn more about [creating secrets](/secret-manager/docs/creating-and-accessing-secrets).\n- Learn more about [adding a secret version](/secret-manager/docs/add-secret-version)."]]