create-service-account

You are currently viewing version 1.2 of the Apigee hybrid documentation.This version is end of life. You should upgrade to a newer version. For more information, seeSupported versions.

Creates Google Cloud Platform (GCP) service accounts with roles that allowindividual Apigee hybrid components to make authorized API calls and downloads the associated service account key files. You can usethe service account key files generated by this command in your configuration overrides file.

Thecreate-service-account tool is located inhybrid_root_dir/tools directory.

Prerequisites

Thecreate-service-account tool requires that thegcloud CLI beinstalled. Users invoking the utility should have the roleService Account Admin.

To get started, be sure yourgcloud projectconfiguration is set to the project you created inStep 2: Create a Google Cloud project:

gcloud config list project

If you need to change the current project ID, use this command:

gcloud config set projectgcp_project_id

Wheregcp_project_id is the project created inStep 2: Create a Google Cloud project.

create-service-account syntax

Thecreate-service-account tool uses the following syntax:

create-service-accountcomponent_nameoutput_dir [gcp_project_id]

Where:

  • component_name: Specifies the hybrid service that uses the service account. Valid values are:
    • apigee-cassandra
    • apigee-logger
    • apigee-mart
    • apigee-metrics
    • apigee-synchronizer
    • apigee-udca

    Note that thecreate-service-account tool cannot create theapigee-org-admin service account. You must create that either with the GCP or gCloud APIs, as described inCreate service accounts.

  • output_dir: The output directory in which to store the downloaded service account key.
  • gcp_project_id: (Optional) Specifies the GCP project ID of the project that is bound to your hybrid-enabled organization. If the GCP project ID is not provided, the tool attempts to retrieve it from the current gcloud configuration.
NOTE: When you generate a service account forapigee-mart you'll see this error:
[ERROR]: No roles found for component apigee-mart

You can ignore the error—the service account for MART does not need a role and is created with no role assigned to it.

Detailed description

Thecreate-service-account tool:

  • CreatesGCP service accounts used by hybrid components. The created service account is granted the role required by the specific component to operate.
  • Downloads the service account key to your system. You place the service account keys in your hybrid configuration overrides file, as explained in the hybridinstallation instructions.

The tool creates service accounts for the following components:

Component*RoleRequired for basic install?Description
apigee-cassandraStorage Object AdminAllows Cassandra backups to Google Cloud Storage, as described inBackup and recovery.
apigee-loggerLogs WriterAllows logging data collection, as described inLogging. Only required for non-GKE cluster installations.
apigee-martNo roleAllows MART service authentication. This service account should not have a role associated with it; as a result, when you create this service account, do not assign a role to it.
apigee-metricsMonitoring Metric WriterAllows metrics data collection, as described inMetrics collection
apigee-org-adminApigee Organization AdminLets you call thegetSyncAuthorization API andsetSyncAuthorization API. You cannot create this service account with thecreate-service-account tool.
apigee-synchronizerApigee Synchronizer ManagerAllows the synchronizer to download proxy bundles and environment configuration data. Also enables operation of the trace feature.
apigee-udcaApigee Analytics AgentAllows the transfer of trace, analytics and deployment status data to the management plane.
* This name is used in the downloaded service account key's filename.

You can also create service accounts in the GCP Console. See alsoCreating and managing service accounts.

Example

The following example creates a new service account for theapigee-loggerservice and places the downloaded key in the./service-accounts directory.

./my-hybrid-root/tools/create-service-account apigee-logger ./service-accounts

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-02-18 UTC.