Secret Manager API を有効にする

Secret Manager は、REST API と gRPC API を公開し、直接またはアプリケーション内でシークレットを使用、管理します。このトピックでは、Secret Manager を初めて使用する際に、Secret Manager API を有効にしGoogle Cloud プロジェクトを構成する方法について説明します。この手順は、クイックスタートを含め、Secret Manager のすべてのタスクの前提条件です。

Secret Manager に慣れたら、個別の Google Cloud プロジェクトを使用することをおすすめします。プロジェクトを削除すると、テスト中に作成されるすべてのリソース(課金対象のリソースを含む)も削除されます。

Cloud Code がインストールされている IDE でアプリケーションを開発している場合、Secret Manager は拡張機能に統合されています。つまり、IDE を終了せずに、シークレットを作成、表示、更新、使用できます。Cloud Code で Secret Manager を使用する方法の詳細については、任意の IDE、VS CodeIntelliJ、または Cloud Shell エディタのシークレット管理ガイドを参照してください。

Secret Manager API と Google Cloud CLI を有効にする

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. Google Cloud Console の [プロジェクト セレクタ] ページで、Google Cloud プロジェクトを選択または作成します。

    プロジェクト セレクタに移動

  3. Google Cloud プロジェクトで課金が有効になっていることを確認します

  4. 必要な API を有効にします。

    API を有効にする

  5. Install the Google Cloud CLI.
  6. To initialize the gcloud CLI, run the following command:

    gcloud init
  7. Google Cloud Console の [プロジェクト セレクタ] ページで、Google Cloud プロジェクトを選択または作成します。

    プロジェクト セレクタに移動

  8. Google Cloud プロジェクトで課金が有効になっていることを確認します

  9. 必要な API を有効にします。

    API を有効にする

  10. Install the Google Cloud CLI.
  11. To initialize the gcloud CLI, run the following command:

    gcloud init

次のステップ